Drop gunicorn from requirementes.txt
We dont ever actually import this anywhere or depend on it as a python dependency. Instead, its part of our diskimage-builder elements and is largely an opinionated deployer choice we've made. The only purpose having it in requirements.txt is to pull it in during installation, which should be delegated to ansible/DIB instead. This also manually sync's global-requirements along with the update. Closes-bug: #1526527 Change-Id: I834efb47ccda02a5163c5083836ff29fdc3fdd6f
This commit is contained in:
parent
cd9cb5edf1
commit
a5a5545419
@ -3,6 +3,7 @@
|
||||
- name: install base packages
|
||||
apt: name={{item}} state=installed install_recommends=no
|
||||
with_items:
|
||||
- gunicorn
|
||||
- python-pip
|
||||
- python-dev
|
||||
- logrotate
|
||||
@ -26,7 +27,7 @@
|
||||
template: src=logrotate.j2 dest=/etc/logrotate.d/astara
|
||||
|
||||
- name: install gunicorn config file
|
||||
template: src=gunicorn.j2 dest=/etc/astara_gunicorn_config
|
||||
template: src=gunicorn.j2 dest=/etc/astara_gunicorn_config.py
|
||||
|
||||
- name: install init.d files
|
||||
copy: src={{playbook_dir}}/../scripts/etc/init.d/{{item}} dest=/etc/init.d/{{item}} mode=0555
|
||||
|
@ -56,11 +56,11 @@ def configure_gunicorn(listen_ip):
|
||||
else:
|
||||
bind = "'%s:%d'" % (listen_ip, defaults.API_SERVICE)
|
||||
|
||||
config = open('/etc/astara_gunicorn_config', 'r').read()
|
||||
config = open('/etc/astara_gunicorn_config.py', 'r').read()
|
||||
config = re.sub('\nbind(\s)?\=(\s)?.*', '\nbind = %s' % bind, config)
|
||||
|
||||
try:
|
||||
open('/etc/astara_gunicorn_config', 'w+').write(config)
|
||||
open('/etc/astara_gunicorn_config.py', 'w+').write(config)
|
||||
sys.stderr.write('http configured to listen on %s\n' % listen_ip)
|
||||
except:
|
||||
sys.stderr.write('Unable to write gunicorn configuration file.')
|
||||
|
@ -5,7 +5,5 @@ Flask<1.0,>=0.10
|
||||
dogpile.cache>=0.5.4
|
||||
netaddr!=0.7.16,>=0.7.12
|
||||
eventlet>=0.17.4
|
||||
requests>=2.5.2
|
||||
requests!=2.9.0,>=2.8.1
|
||||
greenlet>=0.3.2
|
||||
|
||||
gunicorn>=0.14.6,<1 # Not in global-requirements.txt
|
||||
|
@ -11,9 +11,9 @@
|
||||
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
DAEMON="/usr/local/bin/gunicorn"
|
||||
DAEMON="/usr/bin/gunicorn"
|
||||
NAME="astara-router-api-server"
|
||||
OPTIONS="--pythonpath /usr/local/share/astara -c /etc/astara_gunicorn_config astara_router.api.server:app"
|
||||
OPTIONS="--pythonpath /usr/local/share/astara -c /etc/astara_gunicorn_config.py astara_router.api.server:app"
|
||||
PIDFILE=/var/run/gunicorn.pid
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user