Create a Web deployment configuration script

Registered by Yves-Gwenael Bourhis

Creating a web configuration is not always that trivial.

a command which creates a wsgi (with venv support if a venv is detected, the curently provided wsgi does not support virtual environments) and an apache or nginx configuration file would be a handy feature.

example:

$ python manage.py make_web_conf
Usage: manage.py make_web_conf [options]

Create /home/yves/openstack/horizon/openstack_dashboard/wsgi/horizon.wsgi
or the contents of an apache openstack_dashboard.conf file (on stdout).
The apache configuration is generated on stdout because the place of this
file is distribution dependent.

examples::

    manage.py make_web_conf --wsgi # creates /home/yves/openstack/horizon/openstack_dashboard/wsgi/horizon.wsgi
    manage.py make_web_conf --apache # creates an apache vhost conf file (on stdout).
    manage.py make_web_conf --apache --ssl --<email address hidden> --project=openstack_dashboard --hostname=openstack_dashboard

To create an acpache configuration file, redirect the output towards the
location you desire, e.g.::

    manage.py make_web_conf --apache > /etc/httpd/conf.d/openstack_dashboard.conf

Options:
  -v VERBOSITY, --verbosity=VERBOSITY
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings=SETTINGS The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath=PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback Raise on exception
  -a, --apache generate an apache vhost configuration
  --cacert=CACERT Use with the --apache and --ssl option to define the
                        path to the SSLCACertificateFile
  -f, --force force overwriting of an existing /home/yves/openstack/
                        horizon/openstack_dashboard/wsgi/horizon.wsgi file
  -H HOSTNAME, --hostname=HOSTNAME
                        Use with the --apache option to define the server's
                        hostname (default : openstack_dashboard)
  -m MAIL, --mail=MAIL Use with the --apache option to define the web site
                        administrator's email (default :
                        <email address hidden>)
  -n, --namedhost Use with the --apache option. The apache vhost
                        configuration will work only when accessed with the
                        proper hostname (see --hostname).
  -p PROJECT, --project=PROJECT
                        Use with the --apache option to define the project
                        name (default : openstack_dashboard)
  -s, --ssl Use with the --apache option. The apache vhost
                        configuration will use an SSL configuration
  --sslcert=SSLCERT Use with the --apache and --ssl option to define the
                        path to the SSLCertificateFile (default :
                        /etc/pki/tls/certs/ca.crt)
  --sslkey=SSLKEY Use with the --apache and --ssl option to define the
                        path to the SSLCertificateKeyFile (default :
                        /etc/pki/tls/private/ca.key)
  -w, --wsgi generate the horizon.wsgi file
  --version show program's version number and exit
  -h, --help show this help message and exit

Deployement example:
http://dev.cloudwatt.com/en/blog/deploy-horizon-from-source-with-apache-and-ssl.html

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Medium
Drafter:
Yves-Gwenael Bourhis
Direction:
Approved
Assignee:
Yves-Gwenael Bourhis
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon 8.0.0
Started by
David Lyle
Completed by
David Lyle

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.