Cleaned up common dashboard install files for future sharing in new user guide

bug: #1110146

Change-Id: I6c8eede32c342c8870b641ec9452d1b83a1a8d5e
author: diane fleming
This commit is contained in:
Diane Fleming
2013-06-04 13:17:10 -05:00
parent eab4fc68d7
commit f19ae384ef
11 changed files with 265 additions and 220 deletions

View File

@@ -6,9 +6,8 @@
<title>OpenStack Dashboard</title>
<para>The OpenStack Dashboard service provides users of the cloud environment with a web-accessible GUI as an alternative
to using the command-line tools.</para>
<para>To enable it, install the Horizon package and its dependencies:
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install openstack-dashboard memcached python-memcache</userinput></screen>
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install httpd memcached
<para>To enable it, install the Horizon package and its
dependencies: <screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install openstack-dashboard memcached python-memcache</userinput></screen><screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install httpd memcached
( cat | sudo tee -a /etc/openstack-dashboard/local_settings ) &lt;&lt;EOF
DATABASES = {
'default': {
@@ -22,19 +21,25 @@ DATABASES = {
}
EOF</userinput></screen>
<note os="ubuntu">
<para>Optional, but recommended: remove the <literal>openstack-dashboard-ubuntu-theme</literal> package.
This theme prevents several menus as well as the network map from rendering correctly:
<screen><userinput>apt-get remove --purge openstack-dashboard-ubuntu-theme</userinput></screen>
<para>Optional, but recommended: remove the
<literal>openstack-dashboard-ubuntu-theme</literal>
package. This theme prevents several menus as well as
the network map from rendering correctly:
<screen><userinput>apt-get remove --purge openstack-dashboard-ubuntu-theme</userinput></screen>
</para>
</note>OpenStack Dashboard is now available at <emphasis
role="bold">http://cloud/horizon</emphasis>. We can login
with the <emphasis role="bold">admin</emphasis> / <emphasis
role="bold">password</emphasis> credentials or <emphasis
role="bold">demo</emphasis> / <emphasis role="bold"
>password</emphasis>. <note>
<para>Check the
<literal>/var/log/apache/error.log</literal> file
for errors that wold prevent either the Apache service
or the Dashboard service from successfully
starting.</para>
</note>
OpenStack Dashboard is now available at <emphasis role="bold">http://cloud/horizon</emphasis>.
We can login with the <emphasis role="bold">admin</emphasis> / <emphasis role="bold">password</emphasis> credentials
or <emphasis role="bold">demo</emphasis> / <emphasis role="bold">password</emphasis>.
<note><para>Check the <literal>/var/log/apache/error.log</literal> file for errors that wold prevent
either the Apache service or the Dashboard service from successfully starting.</para></note>
</para>
</para>
</section>

View File

@@ -7,9 +7,7 @@
<title>Installing the OpenStack Dashboard</title>
<para>OpenStack has components that provide a view of the
OpenStack installation such as a Django-built website that
serves as a dashboard.</para>
<section xml:id="about-the-dashboard">
<title>About the Dashboard</title>
serves as a dashboard. </para>
<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 web-based
@@ -20,7 +18,29 @@
>https://github.com/openstack/horizon/</link>. These
instructions are for an example deployment configured with
an Apache web server. </para>
</section>
<section xml:id="task_flow"><title>Dashboard Installation Task Flow</title>
<para>To install the OpenStack Dashboard, complete the
following high-level steps: </para>
<orderedlist>
<listitem>
<para>Meet the system requirements for the dashboard.</para>
</listitem>
<listitem>
<para>Install the OpenStack Dashboard framework,
including Apache and related modules.</para>
</listitem>
<listitem>
<para>Configure the dashboard.</para>
</listitem>
<listitem>
<para>Restart and run the Apache server.</para>
</listitem>
<listitem>
<para>Deploy the dashboard. See <link
xlink:href="http://docs.openstack.org/developer/horizon/topics/deployment.html"
>Deploying Horizon</link>.</para>
</listitem>
</orderedlist></section>
<xi:include href="../common/dashboard-system-reqs.xml"/>
<xi:include href="../common/dashboard-install.xml"/>
<xi:include href="../common/dashboard-configure.xml"/>

View File

@@ -3,94 +3,90 @@
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">
<title>Configuring the Dashboard</title>
<orderedlist>
<listitem>
<para><emphasis role="bold">Simple deployment (HTTP)</emphasis></para>
<para>Specify the host for your OpenStack Identity Service endpoint in the
<filename>/etc/openstack-dashboard/local_settings.py</filename> file with the
OPENSTACK_HOST setting. An example is included: </para>
<title>Configure the Dashboard</title>
<para>You can configure the dashboard for a simple HTTP deployment or a secured HTTPS deployment. While the standard installation uses a non-encrypted
HTTP channel, you can enable SSL support for the
dashboard. </para>
<section xml:id="dashboard-config-http"><title>Configure the Dashboard for HTTP</title><procedure><title>To configure the dashboard for HTTP:</title>
<step>
<para>Specify the host for your OpenStack Identity Service
endpoint in the
<filename>/etc/openstack-dashboard/local_settings.py</filename>
file with the <literal>OPENSTACK_HOST</literal>
setting. </para>
<para>The following example shows this setting: </para>
<programlisting><xi:include parse="text" href="samples/local_settings.py"/></programlisting>
<para>The HORIZON_CONFIG dictionary contains all the settings for
the Dashboard. Whether or not a service is in the Dashboard
depends on the Service Catalog configuration in the Identity
service. Refer to <link xlink:href="http://docs.openstack.org/developer/horizon/topics/settings.html">Horizon Settings and Configuration</link> for the
full listing.</para>
</listitem>
<listitem>
<para><emphasis role="bold">Secured deployment (HTTPS)</emphasis></para>
<para>While the standard installation uses a non-encrypted
channel (HTTP), it is possible to enable the SSL
support for the OpenStack Dashboard. In the following
example, we use the domain
"http://openstack.example.com", make sure to use one
that fits your current setup.</para>
<itemizedlist>
<listitem>
<para> In<filename>/etc/openstack-dashboard/local_settings.py</filename> update
the following
directive:<programlisting>USE_SSL = True</programlisting></para>
</listitem>
<listitem>
<para> Edit <filename>/etc/apache2/ports.conf</filename> and add the following
line: <programlisting>NameVirtualHost *:443</programlisting></para>
</listitem>
<listitem>
<para>
Edit <filename>/etc/apache2/conf.d/openstack-dashboard.conf:</filename></para>
<para> Before:
<programlisting>WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
<para>The <literal>HORIZON_CONFIG</literal> dictionary
contains all the settings for the dashboard. Whether
or not a service is in the Dashboard depends on the
Service Catalog configuration in the Identity service.
For the full listing, see <link
xlink:href="http://docs.openstack.org/developer/horizon/topics/settings.html"
>Horizon Settings and Configuration</link>.</para>
</step></procedure></section>
<section xml:id="dashboard-config-https"><title>Configure the Dashboard for HTTPS</title><procedure><title>To configure the dashboard for HTTPS:</title>
<para>The following example uses the domain,
"http://openstack.example.com." Use a domain that fits
your current setup.</para>
<step>
<para> In<filename>/etc/openstack-dashboard/local_settings.py</filename> update
the following
directive:<programlisting>USE_SSL = True</programlisting></para>
</step>
<step>
<para> Edit <filename>/etc/apache2/ports.conf</filename> and add the following
line: <programlisting>NameVirtualHost *:443</programlisting></para>
</step>
<step>
<para>
Edit <filename>/etc/apache2/conf.d/openstack-dashboard.conf:</filename></para>
<para> Before:
<programlisting>WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
WSGIDaemonProcess horizon user=www-data group=www-data processes=3 threads=10
Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static/
&lt;Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi&gt;
Order allow,deny
Allow from all
&lt;/Directory&gt;
</programlisting>
</para>
<para> After:
<programlisting>&lt;VirtualHost *:80&gt;
ServerName openstack.example.com
RedirectPermanent / https://openstack.example.com
Order allow,deny
Allow from all
&lt;/Directory&gt; </programlisting></para>
<para> After:
<programlisting>&lt;VirtualHost *:80&gt;
ServerName openstack.example.com
RedirectPermanent / https://openstack.example.com
&lt;/VirtualHost&gt;
&lt;VirtualHost *:443&gt;
ServerName openstack.example.com
ServerName openstack.example.com
SSLEngine On
SSLCertificateFile /etc/apache2/SSL/openstack.example.com.crt
SSLCACertificateFile /etc/apache2/SSL/openstack.example.com.crt
SSLCertificateKeyFile /etc/apache2/SSL/openstack.example.com.key
SetEnvIf User-Agent &quot;.*MSIE.*&quot; nokeepalive ssl-unclean-shutdown
SSLEngine On
SSLCertificateFile /etc/apache2/SSL/openstack.example.com.crt
SSLCACertificateFile /etc/apache2/SSL/openstack.example.com.crt
SSLCertificateKeyFile /etc/apache2/SSL/openstack.example.com.key
SetEnvIf User-Agent &quot;.*MSIE.*&quot; nokeepalive ssl-unclean-shutdown
WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
WSGIDaemonProcess horizon user=www-data group=www-data processes=3 threads=10
Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static/
&lt;Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi&gt;
Order allow,deny
Allow from all
&lt;/Directory&gt;
&lt;/VirtualHost&gt;
</programlisting>
</para>
<para>In this configuration, we instruct Apache to
listen on the port 443 and to redirect all the
hits to the HTTPs protocol for all the
non-secured requests. In the secured section,
we define as well the private key, the public
key, and the certificate to use.</para>
</listitem>
<listitem>
<para>Finally restart Apache and memcached:</para>
<screen><prompt>#</prompt> <userinput>service apache2 restart</userinput>
<prompt>#</prompt> <userinput>service memcached restart</userinput> </screen>
</listitem>
</itemizedlist>
<para>You should now be redirected to the HTTPs page if you call the HTTP version of the dashboard via your browser.</para>
</listitem>
</orderedlist>
</section>
WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
WSGIDaemonProcess horizon user=www-data group=www-data processes=3 threads=10
Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static/
&lt;Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi&gt;
Order allow,deny
Allow from all
&lt;/Directory&gt;
&lt;/VirtualHost&gt; </programlisting></para>
<para>In this configuration, Apache listens on the port 443
and redirects all the hits to the HTTPS protocol
for all the non-secured requests. In the secured
section, the private key, public key, and
certificate to use are defined.</para>
</step>
<step>
<para>Restart Apache and memcached:</para>
<screen><prompt>#</prompt> <userinput>service apache2 restart</userinput>
<prompt>#</prompt> <userinput>service memcached restart</userinput></screen>
<para>If you call the HTTP version of the dashboard
through your browser, you are redirected to the HTTPS
page.</para>
</step>
</procedure></section>
</section>

View File

@@ -1,43 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<section xml:id="installing-openstack-dashboard" 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">
<title>Installing the OpenStack Dashboard</title>
<para>Here are the overall steps for creating the OpenStack
dashboard. Details about deployment are available at <link xlink:href="http://docs.openstack.org/developer/horizon/topics/deployment.html">Deploying
Horizon</link>.</para>
<orderedlist>
<listitem>
<para>Install the OpenStack Dashboard framework including Apache and related
modules.</para>
</listitem>
<listitem>
<para>Configure the Dashboard.</para>
</listitem>
<listitem>
<para>Restart and run the Apache server.</para>
</listitem>
</orderedlist>
<para>Install the OpenStack Dashboard, as root:</para>
<title>Install the OpenStack Dashboard</title>
<procedure><title>To install the OpenStack Dashboard:</title><step><para>Install the OpenStack Dashboard as root:</para>
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install -y memcached libapache2-mod-wsgi openstack-dashboard</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install -y memcached python-memcached mod_wsgi openstack-dashboard</userinput></screen>
<para>Next, modify the variable <literal>CACHE_BACKEND</literal> in
<filename os="ubuntu">/etc/openstack-dashboard/local_settings.py</filename><filename os="centos;fedora;rhel">/etc/openstack-dashboard/local_settings</filename> to match the ones set in
<filename os="ubuntu">/etc/memcached.conf</filename><filename os="centos;fedora;rhel">/etc/sysconfig/memcached.conf</filename>. Open
<filename os="ubuntu">/etc/openstack-dashboard/local_settings.py</filename><filename os="centos;fedora;rhel">/etc/openstack-dashboard/local_settings</filename> and look for this
line:</para>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install -y memcached python-memcached mod_wsgi openstack-dashboard</userinput></screen></step>
<step><para>Modify the <literal>CACHE_BACKEND</literal> environment variable
in <filename os="ubuntu"
>/etc/openstack-dashboard/local_settings.py</filename><filename
os="centos;fedora;rhel"
>/etc/openstack-dashboard/local_settings</filename>
to match the ones set in <filename os="ubuntu"
>/etc/memcached.conf</filename><filename
os="centos;fedora;rhel"
>/etc/sysconfig/memcached.conf</filename>.</para><para>Open
<filename os="ubuntu"
>/etc/openstack-dashboard/local_settings.py</filename><filename
os="centos;fedora;rhel"
>/etc/openstack-dashboard/local_settings</filename>
and look for this line:</para>
<programlisting>CACHE_BACKEND = 'memcached://127.0.0.1:11211/'</programlisting>
<note><para>The address and port in the new value need to be equal to
the ones set in <filename os="ubuntu">/etc/memcached.conf</filename><filename os="centos;fedora;rhel">/etc/sysconfig/memcached</filename>.</para></note>
<para>If you change the memcached settings, restart the Apache web
server for the changes to take effect.</para>
<note><para>This guide has selected memcache as a session store for OpenStack Dashboard. There are other
options available, each with benefits and drawbacks. Refer to the OpenStack Dashboard
Session Storage section for more information.</para></note>
<note><para>The address and port must match the ones set in <filename
os="ubuntu"
>/etc/memcached.conf</filename><filename
os="centos;fedora;rhel"
>/etc/sysconfig/memcached</filename>.</para>
<para>If you change the memcached settings, you must restart the Apache web
server for the changes to take effect.</para></note>
<note><para>In this example, memcached is the session store for the OpenStack Dashboard. You can use other options. Each
option has benefits and drawbacks. For more information, see <xref linkend="dashboard-sessions"/>.</para></note>
<para>
<note>
<para>In order to change the timezone you can use either dashboard or inside
<filename os="centos;fedora;rhel">/etc/openstack-dashboard/local_settings</filename><filename os="ubuntu">/etc/openstack-dashboard/local_settings.py</filename> you can
change below mentioned parameter.<programlisting>TIME_ZONE = "UTC"</programlisting>
</para>
<para>To change the timezone, use the dashboard or edit
the <filename os="centos;fedora;rhel"
>/etc/openstack-dashboard/local_settings</filename><filename
os="ubuntu"
>/etc/openstack-dashboard/local_settings.py</filename>
file. </para>
<para>Change the following parameter:
<programlisting>TIME_ZONE = "UTC"</programlisting>
</para>
</note>
</para>
</para></step></procedure>
</section>

View File

@@ -3,23 +3,44 @@
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">
<title>System Requirements for the Dashboard</title>
<para>Because Apache does not serve content from a root user, you must use another user with sudo privileges and run as that user.</para>
<para>You should have a running OpenStack Compute installation with the Identity Service, Keystone,
enabled for identity management. </para>
<para>The dashboard needs to be installed on the node that can contact the Identity 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 Identity service user.</para>
<para>You must have git installed. It's straightforward to install it with sudo
apt-get install git-core. </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>
<title>Dashboard System Requirements</title>
<para>Required components:</para>
<itemizedlist>
<listitem>
<para><emphasis role="bold">OpenStack Compute
installation</emphasis> with the Identity Service
enabled for identity management. </para>
<para>Note the URLs of your Identity Service and Compute
endpoints. </para>
</listitem>
<listitem>
<para><emphasis role="bold">Identity Service user with
sudo privileges</emphasis>. Because Apache does
not serve content from a root user, you must run the
dashboard as an Identity Service user with sudo
privileges. </para>
<para>Note the credentials of this user.</para>
</listitem>
<listitem><para><emphasis role="bold">Dashboard</emphasis>. Must be installed on
the node that can contact the Identity Service.</para></listitem>
<listitem>
<para><emphasis role="bold">git</emphasis>. Install git
with sudo apt-get install git-core. </para></listitem>
<listitem> <para><emphasis role="bold">Python 2.6 or 2.7 that is capable of
running Django</emphasis>. These instructions have
been tested with Ubuntu 10.10. </para>
<para>The version of Python that you use should run on any
system, including Mac OS X. The installation
prerequisites might differ by platform. </para>
</listitem>
</itemizedlist>
<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>
<listitem><para>A networking (<link xlink:href="http://wiki.openstack.org/Quantum">Quantum</link>) endpoint.</para></listitem>
</itemizedlist>
</section>

View File

@@ -3,16 +3,16 @@
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">
<title>Validating the Dashboard Install</title>
<para>To validate the Dashboard installation, point your browser at
http://192.168.206.130. Once you connect to the Dashboard with
the URL, you should see a login window. Enter the credentials
for users you created with the Identity Service, Keystone. For
example, enter "admin" for the username and "secrete" as the
password.</para>
<title>Validate the Dashboard Installation</title>
<procedure><title>To validate the dashboard installation:</title><step><para>Point your browser to http://192.168.206.130.</para></step><step><para>After you connect to the dashboard through the URL, a login
window appears. Enter the credentials for any user
that you created with the OpenStack Identity Service. </para>
<para>For example, enter <literal>admin</literal> for the
username and <literal>secrete</literal> as the
password:</para>
<mediaobject>
<imageobject>
<imagedata fileref="figures/dashboard-overview.png"
format="PNG" scale="30"/>
format="PNG" scale="30" width="4in"/>
</imageobject>
</mediaobject></section>
</mediaobject></step></procedure></section>

View File

@@ -3,17 +3,20 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0">
<title>How To Custom Brand The OpenStack Dashboard (Horizon)</title>
<title>Custom Brand the Dashboard</title>
<para>Adapted from a <link xlink:href="http://www.prestonlee.com/2012/05/09/how-to-custom-brand-the-openstack-horizon-dashboard/">blog post by Preston Lee</link>. </para>
<para>When deploying OpenStack
<para>When you deploy OpenStack
on <link xlink:href="http://www.ubuntu.com/">Ubuntu Server</link> 12.04, you can have the
<literal>openstack-dashboard</literal> package installed to provide the web-based “Horizon”
GUI component. Canonical also provides an
<literal>openstack-dashboard-ubuntu-theme</literal> package that brands the Python-based Django GUI.
</para>
<para><link xlink:href="http://horizon.openstack.org/topics/branding.html">The Horizon documents
briefly mention branding customization</link> to give you a head start, but here are
more specific steps. Heres a custom-branded Horizon dashboard with custom colors, logo, and site title:</para>
<para><link
xlink:href="http://horizon.openstack.org/topics/branding.html"
>The Horizon documents briefly mention branding
customization</link> to provide a head start. The
following example shows a custom-branded Horizon dashboard
with custom colors, logo, and site title:</para>
<mediaobject>
<imageobject role="fo">
<imagedata
@@ -38,23 +41,22 @@ more specific steps. Heres a custom-branded Horizon dashboard with custom col
format="PNG"/>
</imageobject>
</mediaobject>
<para>Once you know where to make the appropriate changes, its super simple. Step-by-step:</para>
<orderedlist>
<listitem><para>Create a graphical logo with a transparent background. The text “TGen Cloud”
<procedure><title>To customize the dashboard:</title>
<step><para>Create a graphical logo with a transparent background. The text “TGen Cloud”
in this example is actually rendered via .png files of multiple sizes created with
a graphics program. Use a 200×27 for the logged-in banner graphic, and 365×50 for
the login screen graphic.</para></listitem>
<listitem><para>Set the HTML title (shown at the top of the browser window) by adding the
the login screen graphic.</para></step>
<step><para>Set the HTML title (shown at the top of the browser window) by adding the
following line to <filename>/etc/openstack-dashboard/local_settings.py</filename>: <code>SITE_BRANDING = "Example, Inc. Cloud"</code></para>
</listitem>
<listitem><para>Upload your new graphic files to:
</step>
<step><para>Upload your new graphic files to:
<screen>/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/img/</screen></para>
</listitem>
<listitem><para>Create a new CSS stylesheet — well call ours custom.css — in the directory:
</step>
<step><para>Create a new CSS style sheet — well call ours custom.css — in the directory:
<screen>/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/css/</screen></para>
</listitem>
<listitem><para>Edit your CSS file using the
</step>
<step><para>Edit your CSS file using the
following as a starting point for customization, which simply overrides the Ubuntu
customizations made in the ubuntu.css file. </para>
<para>Change the colors and image file names as appropriate, though the relative directory paths should be the same.
@@ -90,18 +92,19 @@ border: none;
box-shadow: none;
background-color: #BAD3E1 !important;
text-decoration: none;
}</programlisting></para></listitem>
<listitem><para>Open the following HTML template in an editor:
<screen>/usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html</screen></para></listitem>
<listitem><para>Add a line to include your new stylesheet pointing to custom.css: (Ive highlighted the new line in <emphasis>bold</emphasis>.)
<programlisting language="bash">...
}</programlisting></para></step>
<step><para>Open the following HTML template in an editor:
<screen>/usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html</screen></para></step>
<step><para>Add a line to include your new style sheet pointing to
custom.css: (Ive highlighted the new line in
<emphasis>bold</emphasis>.)
<programlisting language="bash">...
&lt;link href='{{ STATIC_URL }}bootstrap/css/bootstrap.min.css' media='screen' rel='stylesheet' /&gt;
&lt;link href='{{ STATIC_URL }}dashboard/css/{% choose_css %}' media='screen' rel='stylesheet' /&gt;
<emphasis>&lt;link href='{{ STATIC_URL }}dashboard/css/custom.css' media='screen' rel='stylesheet' /&gt;</emphasis>
...</programlisting>
</para></listitem>
<listitem><para>Restart apache just for good measure: <code os="ubuntu">sudo service apache2 restart</code><code os="centos;fedora;rhel">sudo service httpd restart</code></para>
</listitem>
<listitem><para>Reload the dashboard in your browser and fine tune your CSS appropriate.</para></listitem></orderedlist>
<para>Youre done!</para>
...</programlisting></para></step>
<step><para>Restart apache just for good measure: <code os="ubuntu">sudo service apache2 restart</code><code os="centos;fedora;rhel">sudo service httpd restart</code></para>
</step>
<step><para>Reload the dashboard in your browser and fine tune your CSS appropriate.</para></step>
</procedure>
</section>

View File

@@ -3,22 +3,24 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0">
<title>OpenStack Dashboard Session Storage</title>
<para>Horizon uses
<link xlink:href="https://docs.djangoproject.com/en/dev/topics/http/sessions/">Djangos sessions framework</link>
for handling user
session data; however thats not the end of the story. There are
numerous session backends available, which are controlled through
the SESSION_ENGINE setting in your <filename os="centos;fedora;rhel">
/etc/openstack-dashboard/local_settings</filename>
<filename os="ubuntu">local_settings.py</filename> file. What
follows is a quick discussion of the pros and cons of each of
the common options as they pertain to deploying Horizon specifically.</para>
<title>Set up Dashboard Session Storage</title>
<para>The dashboard uses <link
xlink:href="https://docs.djangoproject.com/en/dev/topics/http/sessions/"
>Djangos sessions framework</link> to handle user session
data. However, you can use any available session back-end. You
customize the session back-end through the
<literal>SESSION_ENGINE</literal> setting in your
<filename os="centos;fedora;rhel">
/etc/openstack-dashboard/local_settings</filename>
<filename os="ubuntu">local_settings.py</filename> file. </para>
<para>The following sections describe the pros and cons of each
option as it pertains to deploying the dashboard. </para>
<section xml:id="dashboard-session-local">
<title>Local Memory Cache</title>
<para> Local memory storage is the quickest and easiest session
backend to set up, as it has no external dependencies whatsoever.
However, it has two significant drawbacks:</para>
<para>Local memory storage is the quickest and easiest session
backend to set up, as it has no external dependencies
whatsoever. It has the following significant
drawbacks:</para>
<orderedlist>
<listitem><para>No shared storage across processes or workers.</para></listitem>
<listitem><para>No persistence after a process terminates.</para></listitem>
@@ -26,12 +28,10 @@
<para>The local memory backend is enabled as the default for Horizon
solely because it has no dependencies. It is not recommended for
production use, or even for serious development work. Enabled by:</para>
<programlisting language="python">
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
<programlisting language="python">SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'
}
</programlisting>
}</programlisting>
</section>
<section xml:id="dashboard-session-memcache">
@@ -50,13 +50,11 @@ CACHES = {
<listitem><para>Python memcached module installed.</para></listitem>
</orderedlist>
<para>Enabled by:</para>
<programlisting language="python">
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
<programlisting language="python">SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache'
'LOCATION': 'my_memcached_host:11211',
}
</programlisting>
}</programlisting>
</section>
<section xml:id="dashboard-session-database">
<title>Database</title>
@@ -86,8 +84,7 @@ CACHES = {
<filename os="centos;fedora;rhel">/etc/openstack-dashboard/local_settings</filename>
file, change these options:</para>
<programlisting language="python">
SESSION_ENGINE = 'django.core.cache.backends.db.DatabaseCache'
<programlisting language="python">SESSION_ENGINE = 'django.core.cache.backends.db.DatabaseCache'
DATABASES = {
'default': {
# Database configuration here
@@ -98,8 +95,7 @@ DATABASES = {
'HOST': 'localhost',
'default-character-set': 'utf8'
}
}
</programlisting>
}</programlisting>
<para>After configuring the <filename os="ubuntu">local_settings.py</filename>
<filename os="centos;fedora;rhel">/etc/openstack-dashboard/local_settings</filename>
as shown, you can run
@@ -130,9 +126,7 @@ No fixtures found.</computeroutput></screen>
hybrid setting by configuring both your database and cache as
discussed above and then using:</para>
<programlisting language="python">
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
</programlisting>
<programlisting language="python">SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" </programlisting>
</section>
<section xml:id="dashboard-session-cookies">
<title>Cookies</title>

View File

@@ -463,6 +463,6 @@ to install OpenStack by using packages available
<xi:include href="ch_images-uploading.xml"/>
<xi:include href="ch_instances-running.xml"/>
<xi:include href="ch_installobjectstorage.xml"/>
<xi:include href="ch_installdashboard.xml"/>
<xi:include href="../common/ch_installdashboard.xml"/>
<xi:include href="ap_configuration_files.xml"/>
</book>

View File

@@ -48,17 +48,22 @@
article/appendix nop
article toc,title
book toc,title,figure,table,example,equation
chapter toc,title
part toc,title
preface toc,title
chapter toc
section toc
part toc
preface toc
qandadiv toc
qandaset toc
reference toc,title
set toc,title
</generateToc>
<!-- The following elements sets the autonumbering of sections in output for chapter numbers but no numbered sections-->
<chapterAutolabel>0</chapterAutolabel>
<appendixAutolabel>0</appendixAutolabel>
<sectionAutolabel>0</sectionAutolabel>
<sectionLabelIncludesComponentLabel>0</sectionLabelIncludesComponentLabel>
<tocSectionDepth>1</tocSectionDepth>
<formalProcedures>0</formalProcedures>
<failOnValidationError>false</failOnValidationError>
<webhelpDirname>${operating.system}</webhelpDirname>
<targetDirectory>${basedir}/target/docbkx/webhelp/${release.path.name}/openstack-compute/install</targetDirectory>
<includeDateInPdfFilename>0</includeDateInPdfFilename>