Browse Source
This patch is to enable the API to run in a WSGI server like apache2/httpd. Co-Authored-By: Adam Harwell <flux.adam@gmail.com> Co-Authored-By: Michael Johnson <johnsomor@gmail.com> Change-Id: I296c046f653dcf78cdca2d0df1896d27f2ba1544changes/34/440934/19
8 changed files with 181 additions and 1 deletions
@ -0,0 +1,47 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
||||
# not use this file except in compliance with the License. You may obtain |
||||
# a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
||||
# License for the specific language governing permissions and limitations |
||||
# under the License. |
||||
|
||||
# This is a template Apache2 configuration file for using the |
||||
# Octavia API through mod_wsgi. This version assumes you are |
||||
# running devstack to configure the software. |
||||
|
||||
Listen %OCTAVIA_SERVICE_PORT% |
||||
|
||||
<VirtualHost *:%OCTAVIA_SERVICE_PORT%> |
||||
|
||||
WSGIDaemonProcess octavia-wsgi processes=%APIWORKERS% threads=1 display-name=%{GROUP} %VIRTUALENV% |
||||
WSGIProcessGroup octavia-wsgi |
||||
WSGIScriptAlias / /usr/local/bin/octavia-wsgi |
||||
WSGIApplicationGroup %{GLOBAL} |
||||
|
||||
ErrorLog /var/log/%APACHE_NAME%/octavia_error.log |
||||
<IfVersion >= 2.4> |
||||
ErrorLogFormat "%{cu}t %M" |
||||
</IfVersion> |
||||
CustomLog /var/log/%APACHE_NAME%/octavia_access.log combined |
||||
|
||||
%SSLENGINE% |
||||
%SSLCERTFILE% |
||||
%SSLKEYFILE% |
||||
|
||||
<Directory /usr/local/bin/> |
||||
WSGIProcessGroup octavia-wsgi |
||||
<IfVersion >= 2.4> |
||||
Require all granted |
||||
</IfVersion> |
||||
<IfVersion < 2.4> |
||||
Order allow,deny |
||||
Allow from all |
||||
</IfVersion> |
||||
</Directory> |
||||
|
||||
</VirtualHost> |
@ -0,0 +1,29 @@
|
||||
|
||||
.. |
||||
Copyright 2017 Intel Corporation |
||||
All Rights Reserved. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may |
||||
not use this file except in compliance with the License. You may obtain |
||||
a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
||||
License for the specific language governing permissions and limitations |
||||
under the License. |
||||
|
||||
========================= |
||||
Running Octavia in Apache |
||||
========================= |
||||
|
||||
To run Octavia in apache2, copy the ``httpd/octavia-api.conf`` sample |
||||
configuration file to the appropriate location for the Apache server. |
||||
|
||||
On Debian/Ubuntu systems it is:: |
||||
|
||||
/etc/apache2/sites-available/octavia-api.conf |
||||
|
||||
Restart Apache to have it start serving Octavia. |
@ -0,0 +1,23 @@
|
||||
Listen 9876 |
||||
|
||||
<VirtualHost *:9876> |
||||
|
||||
WSGIDaemonProcess octavia-wsgi processes=5 threads=1 display-name=%{GROUP} |
||||
WSGIProcessGroup octavia-wsgi |
||||
WSGIScriptAlias / /usr/local/bin/octavia-wsgi |
||||
WSGIApplicationGroup %{GLOBAL} |
||||
|
||||
ErrorLog /var/log/apache2/octavia-wsgi.log |
||||
|
||||
<Directory /usr/local/bin/> |
||||
WSGIProcessGroup octavia-wsgi |
||||
<IfVersion >= 2.4> |
||||
Require all granted |
||||
</IfVersion> |
||||
<IfVersion < 2.4> |
||||
Order allow,deny |
||||
Allow from all |
||||
</IfVersion> |
||||
</Directory> |
||||
|
||||
</VirtualHost> |
@ -0,0 +1,3 @@
|
||||
--- |
||||
features: |
||||
- Octavia API now supports WSGI deplyment. |
Loading…
Reference in new issue