<commit_before><?xml version="1.0" encoding="UTF-8"?>
<chapter xmlns="http://docbook.org/ns/docbook"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
    xml:id="ch_openstack-interfaces">
 
    <title>OpenStack Interfaces</title>

    <para>OpenStack has components that provide a view of the OpenStack installation such as a Django-built website that serves as a dashboard and the ability to connect to running instances using a VNC connection via a VNC Proxy.</para>
    <section xml:id="about-the-dashboard">
        <title>About the Dashboard</title><para>You can use a dashboard interface with an OpenStack Compute installation with a web-based
        console provided by the Openstack-Dashboard project. It provides a reference implementation of a Django site that provides web-based interactions with the OpenStack Compute cloud controller. For more information about the Openstack-Dashboard project,
        please visit: <link xlink:href="http://launchpad.net/openstack-dashboard"
            >http://launchpad.net/openstack-dashboard</link>. These instructions are for a test deployment of an OpenStack Dashboard. They configure your dashboard to use the default Django server. To create a more robust, production-ready installation, you would configure this with an Apache web server. </para>

    
        <section xml:id="dashboard-system-requirements">
        
        <title>System Requirements for the Dashboard</title>
        
        <para>You should have a running OpenStack Compute installation with the Keystone module
            enabled for identity management. Follow these <link xlink:href="http://docs.openstack.org/diablo/">general instructions for installing Identity Management</link>. For a good all-in-one Nova/Glance/Keystone installation there is the <link xlink:href="https://github.com/cloudbuilders/devstack">devstack</link> project.</para>
        <para>The dashboard needs to be installed on the node that can contact the Keystone service.</para>
        <para>You should know the URL of your Identity endpoint and the Compute endpoint. </para>
        <para>You must know the credentials of a valid Keystone tenant.</para>
            <para>You must have git installed. It's straightforward to install it with <code>sudo
                    apt-get install git-core</code>. </para>
        <para>Python 2.6 is required, and these instructions have been tested with Ubuntu 10.10. It
                should run on any system with Python 2.6 or 2.7 that is capable of running Django
                including Mac OS X (installing prerequisites may differ depending on platform). </para>
            <para>Optional components:</para>
            <para>an Image Store (Glance) endpoint </para>
            <para>an Object Store (Swift) endpoint </para>
            <para>a <link xlink:href="http://wiki.openstack.org/Quantum">Quantum</link> (networking)
                endpoint</para>
    </section>
        <section xml:id="installing-openstack-dashboard">

        <title>Installing the OpenStack Dashboard</title>
        <para>Here are the overall steps for building the dashboard.</para>

        <orderedlist>
            <listitem><para>Get the source for the openstack-dashboard project.</para></listitem>
            <listitem>
                    <para>Configure the openstack-dashboard.</para>
                </listitem>
                <listitem>
                    <para>Install.</para>
                </listitem>
            <listitem>
                <para>Run the server that starts the dashboard.</para>
            </listitem>
        </orderedlist>

            
            
            <para>Before you begin, you must have git installed. </para>
        <para>Create a source directory to house the project:</para>
       
            <literallayout class="monospaced">mkdir src
cd src            </literallayout>
        
        <para>Next, get the openstack-dashboard project, which provides all the look and feel for the OpenStack Dashboard.</para>
        
        <literallayout class="monospaced">
git clone https://github.com/4P/horizon
</literallayout>
        <para>You should now have a directory called openstack-dashboard, which contains the OpenStack Dashboard application.</para>
        <section xml:id="build-and-configure-openstack-dashboard">
            <title>Configure Openstack-Dashboard</title>
                <para>Now you can configure the dashboard application. The first step in configuring the application
                is to create your local_settings.py file. An example is provided that you can copy
                to local_settings.py and then modify for your environment.
                </para>
            <para>
                <literallayout class="monospaced">
cd openstack-dashboard/openstack-dashboard/local
cp local_settings.py.example local_settings.py
vi local_settings.py                
</literallayout>
            </para>
            <para>In the new copy of the local_settings.py file, change these important options:</para>
            <itemizedlist>
                <listitem>
                    <para>OPENSTACK_ADMIN_TOKEN : Token for Keystone endpoint.</para>
                </listitem>
                <listitem>
                    <para>OPENSTACK_KEYSTONE_URL : URL for the Keystone endpoint.</para>
                </listitem>
            </itemizedlist>
            <simplesect> <title>Keystone Configuration (required)</title>
            <para>
                
                The admin token can be generated by executing something like the following using the keystone-manage command on the Keystone host:</para>
                
               <literallayout class="monospaced"> keystone-manage token add <PASSWORD> admin admin 2015-02-05T00:00</literallayout>
                
                <para>To use this token you would add the following to local_settings.py:</para>
                
                <literallayout class="monospaced">OPENSTACK_ADMIN_TOKEN = "<PASSWORD>"</literallayout>
                
                <para>The Keystone endpoint setting takes the following form:</para>
                
                <literallayout class="monospaced">OPENSTACK_KEYSTONE_URL = "http://mykeystoneurl:5000/v2.0/".</literallayout></simplesect>
            <simplesect><title>Object Storage Configuration (optional)</title>
                <para>If a Swift endpoint is available and configured in the Keystone service catalog turning on the Swift UI is as simple as adding the following to local_settings.py:
                    
                </para>
                <literallayout class="monospaced">SWIFT_ENABLED = True</literallayout>
            </simplesect>
            <simplesect><title>Quantum Configuration (optional)</title>
            <para>Quantum currently requires the following settings:</para>
            <literallayout class="monospaced">
QUANTUM_ENABLED = True
QUANTUM_URL = '127.0.0.1'
QUANTUM_PORT = '9696'
QUANTUM_TENANT = '1234'
QUANTUM_CLIENT_VERSION='0.1'
            </literallayout></simplesect>
        </section>
            <section xml:id="install-dashboard">
                <title>Install the Dashboard</title>
                <para>After Dashboard has been configured install the Dashboard virtual environment using the terminal commands below:</para>
                    
                    <note><para>Note: the instructions below are for Ubuntu, however, setuptools can be installed on a wide variety of platforms: http://pypi.python.org/pypi/setuptools</para></note>
                    
                    <literallayout class="monospaced">$ apt-get install -y python-setuptools 
                    $ sudo easy_install virtualenv
                    $ python tools/install_venv.py</literallayout>
                    
                    <para>Installing the virtual environment will take some time depending on download speeds. </para>
            </section>
            <section xml:id="run-the-server">
          <title>Run the Server</title>
                <para>Dashboard is run using the standard Django manage.py script from the context
                    of the virtual environment. Be sure you synchronize the database with this
                    command: </para>
                <literallayout class="monospaced">tools/with_venv.sh dashboard/manage.py syncdb</literallayout>
                <para>Run the server on a high port value so that you can validate the
                    installation.</para><para><literallayout class="monospaced">tools/with_venv.sh dashboard/manage.py runserver 0.0.0.0:8000</literallayout></para><para>Make sure that your firewall isn't blocking TCP/8000 and just point your browser at this server on port 8000. If you are running the server on the same machine as your browser, this would be "http://localhost:8000". </para>
            <mediaobject>
                <imageobject role="fo">
                    <imagedata fileref="figures/dashboard-overview.png"
                    format="PNG" scale="60"/>
            </imageobject>
                <imageobject role="html">
                    <imagedata fileref="../figures/dashboard-overview.png"
                        format="PNG" />
                </imageobject>
            </mediaobject></section></section></section>
 <section xml:id="getting-started-with-the-vnc-proxy"><info><title>Getting Started with the VNC Proxy</title></info>
        <commit_msg>Update Openstack Dashboard section : 	# Fixes bug 813072 	# Update formatting<commit_after><?xml version="1.0" encoding="UTF-8"?>
<chapter xmlns="http://docbook.org/ns/docbook"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
    xml:id="ch_openstack-interfaces">
 
    <title>OpenStack Interfaces</title>

    <para>OpenStack has components that provide a view of the OpenStack installation such as a Django-built website that serves as a dashboard and the ability to connect to running instances using a VNC connection via a VNC Proxy.</para>
    <section xml:id="about-the-dashboard">
        <title>About the Dashboard</title><para>You can use a dashboard interface with an OpenStack Compute installation with a web-based
            console provided by the Openstack-Dashboard project. It provides a reference
            implementation of a Django site that provides web-based interactions with the OpenStack
            Compute cloud controller. For more information about the Openstack-Dashboard project,
            please visit: <link xlink:href="https://github.com/4P/horizon/tree/master/openstack-dashboard"
                >https://github.com/4P/horizon/</link>. These instructions are for a test deployment
            of an OpenStack Dashboard. They configure your dashboard to use the default Django
            server. To create a more robust, production-ready installation, you would configure this
            with an Apache web server. </para>

    
        <section xml:id="dashboard-system-requirements">
        
        <title>System Requirements for the Dashboard</title>
        
        <para>You should have a running OpenStack Compute installation with the Keystone module
            enabled for identity management. Follow these <link xlink:href="http://docs.openstack.org/diablo/">general instructions for installing Identity Management</link>. For a good all-in-one Nova/Glance/Keystone installation there is the <link xlink:href="https://github.com/cloudbuilders/devstack">devstack</link> project.</para>
        <para>The dashboard needs to be installed on the node that can contact the Keystone service.</para>
        <para>You should know the URL of your Identity endpoint and the Compute endpoint. </para>
        <para>You must know the credentials of a valid Keystone tenant.</para>
            <para>You must have git installed. It's straightforward to install it with <code>sudo
                    apt-get install git-core</code>. </para>
        <para>Python 2.6 is required, and these instructions have been tested with Ubuntu 10.10. It
                should run on any system with Python 2.6 or 2.7 that is capable of running Django
                including Mac OS X (installing prerequisites may differ depending on platform). </para>
            <para>Optional components:</para>
            
                <itemizedlist>
                    <listitem><para>An Image Store (<emphasis role="italic">Glance</emphasis>) endpoint.</para></listitem>
                    <listitem><para>An Object Store (<emphasis role="italic">Swift</emphasis>) endpoint.</para></listitem>
                    <listitem>
                        <para>
                            A <link xlink:href="http://wiki.openstack.org/Quantum">Quantum</link> (networking) endpoint.
                        </para>
                    </listitem>
                </itemizedlist>
    </section>
        <section xml:id="installing-openstack-dashboard">

        <title>Installing the OpenStack Dashboard</title>
        <para>Here are the overall steps for building the dashboard.</para>

        <orderedlist>
            <listitem><para>Get the source for the openstack-dashboard project.</para></listitem>
            <listitem>
                    <para>Configure the openstack-dashboard.</para>
                </listitem>
                <listitem>
                    <para>Install.</para>
                </listitem>
            <listitem>
                <para>Run the server that starts the dashboard.</para>
            </listitem>
        </orderedlist>

            
            
            <para>Before you begin, you must have git installed. </para>
        <para>Create a source directory to house the project:</para>
       
            <literallayout class="monospaced">
<code>mkdir src
cd src</code>
            </literallayout>
        
        <para>Next, get the openstack-dashboard project, which provides all the look and feel for the OpenStack Dashboard.</para>
        
        <literallayout class="monospaced">
<code>git clone https://github.com/4P/horizon</code>
</literallayout>
        <para>You should now have a directory called openstack-dashboard, which contains the OpenStack Dashboard application.</para>
        <section xml:id="build-and-configure-openstack-dashboard">
            <title>Configure Openstack-Dashboard</title>
                <para>Now you can configure the dashboard application. The first step in configuring the application
                is to create your local_settings.py file. An example is provided that you can copy
                to local_settings.py and then modify for your environment.
                </para>
            <para>
                <literallayout class="monospaced">
<code>cd openstack-dashboard/openstack-dashboard/local
cp local_settings.py.example local_settings.py
vi local_settings.py</code>
</literallayout>
            </para>
            <para>In the new copy of the local_settings.py file, change these important options:</para>
            <itemizedlist>
                <listitem>
                    <para>OPENSTACK_ADMIN_TOKEN : Token for Keystone endpoint.</para>
                </listitem>
                <listitem>
                    <para>OPENSTACK_KEYSTONE_URL : URL for the Keystone endpoint.</para>
                </listitem>
            </itemizedlist>
            <simplesect> <title>Keystone Configuration (required)</title>
            <para>
                
                The admin token can be generated by executing something like the following using the keystone-manage command on the Keystone host:</para>
                
               <literallayout class="monospaced"><code>keystone-manage token add 999888777666 admin admin 2015-02-05T00:00</code></literallayout>
                
                <para>To use this token you would add the following to local_settings.py:</para>
                
                <literallayout class="monospaced">OPENSTACK_ADMIN_TOKEN = "<PASSWORD>"</literallayout>
                
                <para>The Keystone endpoint setting takes the following form:</para>
                
                <literallayout class="monospaced">OPENSTACK_KEYSTONE_URL = "http://mykeystoneurl:5000/v2.0/".</literallayout></simplesect>
            <simplesect><title>Object Storage Configuration (optional)</title>
                <para>If a Swift endpoint is available and configured in the Keystone service catalog turning on the Swift UI is as simple as adding the following to local_settings.py:
                    
                </para>
                <literallayout class="monospaced">SWIFT_ENABLED = True</literallayout>
            </simplesect>
            <simplesect><title>Quantum Configuration (optional)</title>
            <para>Quantum currently requires the following settings:</para>
            <literallayout class="monospaced">
QUANTUM_ENABLED = True
QUANTUM_URL = '127.0.0.1'
QUANTUM_PORT = '9696'
QUANTUM_TENANT = '1234'
QUANTUM_CLIENT_VERSION='0.1'
            </literallayout></simplesect>
        </section>
            <section xml:id="install-dashboard">
                <title>Install the Dashboard</title>
                <para>After Dashboard has been configured install the Dashboard virtual environment using the terminal commands below:</para>
                <note>
                    <para>
                        The instructions below are for Ubuntu, however, setuptools can be installed on a wide variety of platforms: <link xlink:href="http://pypi.python.org/pypi/setuptools">http://pypi.python.org/pypi/setuptools</link>
                    </para>
                </note>
 <literallayout class="monospaced">
<code>apt-get install -y python-setuptools 
sudo easy_install virtualenv
python tools/install_venv.py</code>
                    </literallayout>
                    <para>On RedHat systems (eg CentOS, Fedora), you will also need to install
                    python-devel
                    <literallayout class="monospaced"><code>yum install python-devel</code> </literallayout></para>
                    <para>Installing the virtual environment will take some time depending on download speeds. </para>
            </section>
            <section xml:id="run-the-server">
          <title>Run the Server</title>
                <para>Dashboard is run using the standard Django manage.py script from the context
                    of the virtual environment. Be sure you synchronize the database with this
                    command: </para>
                <literallayout class="monospaced"><code>tools/with_venv.sh dashboard/manage.py syncdb</code></literallayout>
                <para>Run the server on a high port value so that you can validate the
                    installation.</para><para><literallayout class="monospaced"><code>tools/with_venv.sh dashboard/manage.py runserver 0.0.0.0:8000</code></literallayout></para><para>Make sure that your firewall isn't blocking TCP/8000 and just point your browser at this server on port 8000. If you are running the server on the same machine as your browser, this would be "http://localhost:8000". </para>
            <mediaobject>
                <imageobject role="fo">
                    <imagedata fileref="figures/dashboard-overview.png"
                    format="PNG" scale="60"/>
            </imageobject>
                <imageobject role="html">
                    <imagedata fileref="../figures/dashboard-overview.png"
                        format="PNG" />
                </imageobject>
            </mediaobject></section></section></section>
 <section xml:id="getting-started-with-the-vnc-proxy"><info><title>Getting Started with the VNC Proxy</title></info>
        
{'fraction_non_alphanumeric': 0.09153225806451613, 'fraction_numerical': 0.009274193548387096, 'mean_word_length': 2.305731422859047, 'pattern_counts': {'":': 0, '<': 398, '<?xml version=': 2, '>': 398, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 24}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2763457', 'n_tokens_mistral': 5216, 'n_tokens_neox': 4874, 'n_words': 1591}