<commit_before>================================
OSE Advanced Enablement Homework
================================

The purpose of this project is to document and demonstrate an OSE 3.2
deployment in an HA configuration using a cloud provider, such as AWS or
OpenStack.


System Requirements
===================

Python 2.7 or higher is required to build the documentation and run the
examples. Python virtualenv is also recommended.

This project has been tested on Fedora 23, but should work on most modern Red
Hat Linuxes.

On recent versions of Fedora, these can be installed using::

    # dnf install python python-virtualenv redhat-rpm-config openssl-devel

On RHEL or older versions of Fedora, install by running::

    # yum install python python-virtualenv redhat-rpm-config openssl-devel

If you simply wish to read the documentation without fancy rendering or running
the examples, only a basic text editor is required.


Installation
============

To build documentation and run the examples, the following Python packages are
installed:

  - Ansible
  - OpenStack Client
  - Shade
  - Sphinx

Follow the steps below to perform the installation.

*Note: Installation does not require root privileges.*

 #. Set up a virtualenv site::

    $ virtualenv ~/py

 #. Activate the virtualenv::

    $ source ~/py/bin/activate

 #. Install tools::

    $ pip install -r requirements.txt


Building the Documentation
==========================

To build the HTML documentation, do the following::

    $ source ~/py/bin/activate
    $ make html

The rendered documentation can now be found in `_build/html/`.

Or to render as a PDF, do::

    $ source ~/py/bin/activate
    $ make latexpdf

*Note: Additional texlive packages may need to be installed for PDF
generation.*


Running the Examples
====================

To run the examples, do the following::

    $ source ~/py/bin/activate
    $ make doctest<commit_msg>Expanded the README section on running the demo.<commit_after>================================
OSE Advanced Enablement Homework
================================

The purpose of this project is to document and demonstrate an OSE 3.2
deployment in an HA configuration using a cloud provider, such as AWS or
OpenStack.


System Requirements
===================

Python 2.7 or higher is required to build the documentation and run the
examples. Python virtualenv is also recommended.

This project has been tested on Fedora 23, but should work on most modern Red
Hat Linuxes.

On recent versions of Fedora, these can be installed using::

    # dnf install python python-virtualenv redhat-rpm-config openssl-devel

On RHEL or older versions of Fedora, install by running::

    # yum install python python-virtualenv redhat-rpm-config openssl-devel

If you simply wish to read the documentation without fancy rendering or running
the examples, only a basic text editor is required.


Installation
============

To build documentation and run the examples, the following Python packages are
installed:

  - Ansible
  - OpenStack Client
  - Shade
  - Sphinx

Follow the steps below to perform the installation.

*Note: Installation does not require root privileges.*

 #. Set up a virtualenv site::

    $ virtualenv ~/py

 #. Activate the virtualenv::

    $ source ~/py/bin/activate

 #. Install tools::

    $ pip install -r requirements.txt


Building the Documentation
==========================

To build the HTML documentation, do the following::

    $ source ~/py/bin/activate
    $ make html

The rendered documentation can now be found in `_build/html/`.

Or to render as a PDF, do::

    $ source ~/py/bin/activate
    $ make latexpdf

*Note: Additional texlive packages may need to be installed for PDF
generation.*


Demo
====

The documentation presented here isn't just for reading. You can run it too!
Running this document will demonstrate the full OSE3 deployment. Aside from a
few manual steps to setup your environment, the deployment is fully automated.

To tell which steps are manual and which are executed:

  - Examples prefixed with `>>>` are executable and will be run as part of the
    demo.

  - Shell instructions (prefixed with `$` or `#`) are *not* executable and must
    be performed manually.


Environment Setup
-----------------

Running the examples depend on your environment being set up to authenticate
with an OpenStack environment. You will need to download your "openrc.sh" file
from the OpenStack dashboard. To do so:

 #. Sign in to the OpenStack Dashboard
 #. Go to the "Access & Security" page
 #. Click on the "API Access" tab
 #. Click the "Download OpenStack RC File" button

Once you've downloaded your RC file, add to your environment::

    $ source myproject-openrc.sh


Running the Demo
================

Once you've performed the installation and environment setup steps above,
you'll be ready to run the demo!

To run the thing, do::

    $ source ~/py/bin/activate
    $ make doctest
{'fraction_non_alphanumeric': 0.1120741785930256, 'fraction_numerical': 0.002620439427534771, 'mean_word_length': 3.81747572815534, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2160761', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1225, 'n_words': 640}