ironic/install-guide/source/include/configure-ironic-api-mod_wsgi.rst
Colleen Murphy 1849a81383 Add SUSE instructions to the install guide
It is true that the existing instructions for other distributions can be
adapted for SUSE, but we can make it even easier by providing
instructions tailored for SUSE.

Change-Id: Id50c3d663fc2bd527ec2fe5e26fd1d4692b971ce
2017-04-18 09:30:43 +02:00

2.0 KiB

Configuring ironic-api behind mod_wsgi

Bare Metal service comes with an example file for configuring the ironic-api service to run behind Apache with mod_wsgi.

  1. Install the apache service:

    Fedora 21/RHEL7/CentOS7:
      sudo yum install httpd
    
    Fedora 22 (or higher):
      sudo dnf install httpd
    
    Debian/Ubuntu:
      apt-get install apache2
    
    SUSE:
      zypper install apache2
  2. Copy the etc/apache2/ironic file under the apache sites:

    Fedora/RHEL7/CentOS7:
      sudo cp etc/apache2/ironic /etc/httpd/conf.d/ironic.conf
    
    Debian/Ubuntu:
      sudo cp etc/apache2/ironic /etc/apache2/sites-available/ironic.conf
    
    SUSE
      sudo cp etc/apache2/ironic /etc/apache2/vhosts.d/ironic.conf
  3. Edit the recently copied <apache-configuration-dir>/ironic.conf:

    1. Modify the WSGIDaemonProcess, APACHE_RUN_USER and APACHE_RUN_GROUP directives to set the user and group values to an appropriate user on your server.
    2. Modify the WSGIScriptAlias directive to point to the ironic/api/app.wsgi script.
    3. Modify the Directory directive to set the path to the Ironic API code.
    4. Modify the ErrorLog and CustomLog to redirect the logs to the right directory (on Red Hat systems this is usually under /var/log/httpd).
  4. Enable the apache ironic in site and reload:

    Fedora/RHEL7/CentOS7:
      sudo systemctl reload httpd
    
    Debian/Ubuntu:
      sudo a2ensite ironic
      sudo service apache2 reload
    
    SUSE:
      sudo systemctl reload apache2

Note

The file ironic/api/app.wsgi is installed with the rest of the Bare Metal service application code, and should not need to be modified.