aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Wright <sw3588@att.com>2018-05-24 13:13:00 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-24 13:13:00 +0000
commitc3f1df4a5c4fe2c232a6e998629eb30c4f6c9679 (patch)
tree3f342cb71f58b43c47bcfb1bbbc6e919d17c5806
parentaf331643dc0af5e3fb8bebfa9efb2682e46451b8 (diff)
parentf000e1cad7775e37da61b71773d60b40b9254478 (diff)
Merge "Alignment of VVP devkit"
-rw-r--r--ansible/roles/ansible-vvp-templates/files/configmaps/ci-configmap.yaml21
-rw-r--r--ansible/roles/ansible-vvp-templates/files/configmaps/cms-configmap.yaml20
-rw-r--r--ansible/roles/ansible-vvp-templates/files/configmaps/em-configmap.yaml21
-rw-r--r--ansible/roles/ansible-vvp-templates/files/configmaps/nginx-cms-configmap.yaml8
-rw-r--r--ansible/roles/ansible-vvp-templates/files/configmaps/nginx-em-configmap.yaml10
-rw-r--r--ansible/roles/ansible-vvp-templates/templates/deployments/20-ci-uwsgi-deployment.yaml.j22
-rw-r--r--ansible/roles/ansible-vvp-templates/templates/deployments/20-cms-uwsgi-deployment.yaml.j22
-rw-r--r--ansible/roles/ansible-vvp-templates/templates/deployments/20-em-uwsgi-deployment.yaml.j22
8 files changed, 38 insertions, 48 deletions
diff --git a/ansible/roles/ansible-vvp-templates/files/configmaps/ci-configmap.yaml b/ansible/roles/ansible-vvp-templates/files/configmaps/ci-configmap.yaml
index c7ea86d..c0559a2 100644
--- a/ansible/roles/ansible-vvp-templates/files/configmaps/ci-configmap.yaml
+++ b/ansible/roles/ansible-vvp-templates/files/configmaps/ci-configmap.yaml
@@ -43,20 +43,13 @@ metadata:
name: ci-settings
namespace: default
data:
- uwsgi.ini: |
- [uwsgi]
- uwsgi-socket = :80
- http = :8282
- plugin = python
- chdir = /app
- module = web.wsgi:application
- master = True
- pidfile = /tmp/project-master.pid
- vacuum = True
- max-requests = 5000
- enable-threads = True
- stats = 0.0.0.0:9000
- stats-http = True
+ gunicorn.ini: |
+ bind = ":8282"
+ chdir = '/app'
+ pidfile = '/tmp/ice-project-master.pid'
+ backlog = '5000'
+ errorlog = '-'
+ loglevel = 'info'
__init__.py: |
import os
from datetime import datetime
diff --git a/ansible/roles/ansible-vvp-templates/files/configmaps/cms-configmap.yaml b/ansible/roles/ansible-vvp-templates/files/configmaps/cms-configmap.yaml
index 4aedece..00541af 100644
--- a/ansible/roles/ansible-vvp-templates/files/configmaps/cms-configmap.yaml
+++ b/ansible/roles/ansible-vvp-templates/files/configmaps/cms-configmap.yaml
@@ -43,19 +43,13 @@ metadata:
name: cms-settings
namespace: default
data:
- uwsgi.ini: |
- [uwsgi]
- uwsgi-socket = :80
- plugin = python
- chdir = /srv
- module = cms.wsgi:application
- master = True
- pidfile = /tmp/project-master.pid
- vacuum = True
- max-requests = 5000
- enable-threads = True
- stats = 0.0.0.0:9000
- stats-http = True
+ gunicorn.ini: |
+ bind = ":80"
+ chdir = '/srv'
+ pidfile = '/tmp/ice-project-master.pid'
+ backlog = '5000'
+ errorlog = '-'
+ loglevel = 'info'
__init__.py: |
from __future__ import absolute_import, unicode_literals
import os
diff --git a/ansible/roles/ansible-vvp-templates/files/configmaps/em-configmap.yaml b/ansible/roles/ansible-vvp-templates/files/configmaps/em-configmap.yaml
index 467d219..8068744 100644
--- a/ansible/roles/ansible-vvp-templates/files/configmaps/em-configmap.yaml
+++ b/ansible/roles/ansible-vvp-templates/files/configmaps/em-configmap.yaml
@@ -43,19 +43,14 @@ metadata:
name: em-settings
namespace: default
data:
- uwsgi.ini: |
- [uwsgi]
- uwsgi-socket = :80
- plugin = python
- chdir = /srv
- module = vvp.wsgi:application
- master = True
- pidfile = /tmp/project-master.pid
- vacuum = True
- max-requests = 5000
- enable-threads = True
- stats = 0.0.0.0:9000
- stats-http = True
+ gunicorn.ini: |
+ bind = ":80"
+ chdir = '/srv'
+ pidfile = '/tmp/ice-project-master.pid'
+ backlog = '5000'
+ errorlog = '-'
+ loglevel = 'info'
+
__init__.py: |
"""
Django settings for VVP project.
diff --git a/ansible/roles/ansible-vvp-templates/files/configmaps/nginx-cms-configmap.yaml b/ansible/roles/ansible-vvp-templates/files/configmaps/nginx-cms-configmap.yaml
index 89adf32..638d248 100644
--- a/ansible/roles/ansible-vvp-templates/files/configmaps/nginx-cms-configmap.yaml
+++ b/ansible/roles/ansible-vvp-templates/files/configmaps/nginx-cms-configmap.yaml
@@ -58,8 +58,12 @@ data:
client_max_body_size 75M; # adjust to taste
location / {
- uwsgi_pass cms_upstream;
- include /etc/nginx/uwsgi_params;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto https;
+ proxy_set_header Host $http_host;
+ proxy_redirect off;
+
+ proxy_pass http://cms-uwsgi;
}
}
server {
diff --git a/ansible/roles/ansible-vvp-templates/files/configmaps/nginx-em-configmap.yaml b/ansible/roles/ansible-vvp-templates/files/configmaps/nginx-em-configmap.yaml
index 0d7b279..52e208e 100644
--- a/ansible/roles/ansible-vvp-templates/files/configmaps/nginx-em-configmap.yaml
+++ b/ansible/roles/ansible-vvp-templates/files/configmaps/nginx-em-configmap.yaml
@@ -56,10 +56,14 @@ data:
listen 80;
charset utf-8;
client_max_body_size 75M; # adjust to taste
-
+
location / {
- uwsgi_pass em_upstream;
- include /etc/nginx/uwsgi_params;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto https;
+ proxy_set_header Host $http_host;
+ proxy_redirect off;
+
+ proxy_pass http://em_upstream;
}
}
diff --git a/ansible/roles/ansible-vvp-templates/templates/deployments/20-ci-uwsgi-deployment.yaml.j2 b/ansible/roles/ansible-vvp-templates/templates/deployments/20-ci-uwsgi-deployment.yaml.j2
index 1846ad5..44e78e1 100644
--- a/ansible/roles/ansible-vvp-templates/templates/deployments/20-ci-uwsgi-deployment.yaml.j2
+++ b/ansible/roles/ansible-vvp-templates/templates/deployments/20-ci-uwsgi-deployment.yaml.j2
@@ -166,7 +166,7 @@ spec:
initialDelaySeconds: 90
periodSeconds: 15
{% endif %}
- command: ["/app/docker-entrypoint.sh", "/usr/local/bin/uwsgi", "--ini", "/opt/configmaps/settings/uwsgi.ini", "--static-map", "/static=/app/htdocs" {% if devenv is defined %}, "--py-auto-reload" , "3"{% endif %}]
+ command: ["/app/docker-entrypoint.sh", "/usr/local/bin/gunicorn", "-c", "/opt/configmaps/settings/gunicorn.ini", "web.wsgi:application", {% if devenv is defined %}"--reload"{% endif %}]
metadata:
labels:
run: ci-uwsgi
diff --git a/ansible/roles/ansible-vvp-templates/templates/deployments/20-cms-uwsgi-deployment.yaml.j2 b/ansible/roles/ansible-vvp-templates/templates/deployments/20-cms-uwsgi-deployment.yaml.j2
index 6217054..01032d7 100644
--- a/ansible/roles/ansible-vvp-templates/templates/deployments/20-cms-uwsgi-deployment.yaml.j2
+++ b/ansible/roles/ansible-vvp-templates/templates/deployments/20-cms-uwsgi-deployment.yaml.j2
@@ -121,7 +121,7 @@ spec:
periodSeconds: 15
timeoutSeconds: 10
{% endif %}
- command: ["/docker-entrypoint.sh", "/usr/local/bin/uwsgi", "--ini", "/opt/configmaps/settings/uwsgi.ini", {% if devenv is defined %}"--py-auto-reload" , "3",{% endif %}"--static-map", "/static=/app/htdocs"]
+ command: ["/docker-entrypoint.sh", "/usr/local/bin/gunicorn", "-c", "/opt/configmaps/settings/gunicorn.ini", "cms.wsgi:application", {% if devenv is defined %}"--reload"{% endif %}]
volumeMounts:
- name: settings
mountPath: /opt/configmaps/settings/
diff --git a/ansible/roles/ansible-vvp-templates/templates/deployments/20-em-uwsgi-deployment.yaml.j2 b/ansible/roles/ansible-vvp-templates/templates/deployments/20-em-uwsgi-deployment.yaml.j2
index a97bcc7..ceb24c4 100644
--- a/ansible/roles/ansible-vvp-templates/templates/deployments/20-em-uwsgi-deployment.yaml.j2
+++ b/ansible/roles/ansible-vvp-templates/templates/deployments/20-em-uwsgi-deployment.yaml.j2
@@ -164,7 +164,7 @@ spec:
periodSeconds: 15
timeoutSeconds: 10
{% endif %}
- command: ["/docker-entrypoint.sh", "/usr/local/bin/uwsgi", "--ini", "/opt/configmaps/settings/uwsgi.ini", {% if devenv is defined %}"--py-auto-reload" , "3",{% endif %}"--static-map", "/static=/app/htdocs"]
+ command: ["/docker-entrypoint.sh", "/usr/local/bin/gunicorn", "-c", "/opt/configmaps/settings/gunicorn.ini", "vvp.wsgi:application", {% if devenv is defined %}"--reload"{% endif %}]
metadata:
labels:
run: em-uwsgi