aboutsummaryrefslogtreecommitdiffstats
path: root/supporting/servers/roles/ngnix
diff options
context:
space:
mode:
authorzhihui wu <wu.zhihui1@zte.com.cn>2016-11-08 08:48:02 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-08 08:48:02 +0000
commitc9bb3617c18ecf09d1d45acad2e80ab30e6b05b2 (patch)
tree207bfd2e9a8a7eb935a193fb0502f9a82c846863 /supporting/servers/roles/ngnix
parent72443baf2aeac22313e81f69c069df64192b71ef (diff)
parent6d8099723d5a7598c5b007ac2b89798b893ab49e (diff)
Merge "Start qtip server in qtip-dev host and add the qtip restful api online url in docs."
Diffstat (limited to 'supporting/servers/roles/ngnix')
-rw-r--r--supporting/servers/roles/ngnix/defaults/main.yml3
-rw-r--r--supporting/servers/roles/ngnix/tasks/main.yml1
-rw-r--r--supporting/servers/roles/ngnix/templates/qtip.conf.j217
3 files changed, 21 insertions, 0 deletions
diff --git a/supporting/servers/roles/ngnix/defaults/main.yml b/supporting/servers/roles/ngnix/defaults/main.yml
index 855fc7ea..cb3b3934 100644
--- a/supporting/servers/roles/ngnix/defaults/main.yml
+++ b/supporting/servers/roles/ngnix/defaults/main.yml
@@ -2,3 +2,6 @@
services:
- { name: kibana, upstream: 'http://127.0.0.1:5601' }
- { name: elastic, upstream: 'http://127.0.0.1:9200' }
+
+qtip_services:
+ - { name: restful_api, upstream: 'http://127.0.0.1:5000' }
diff --git a/supporting/servers/roles/ngnix/tasks/main.yml b/supporting/servers/roles/ngnix/tasks/main.yml
index 8673b3d2..ec146850 100644
--- a/supporting/servers/roles/ngnix/tasks/main.yml
+++ b/supporting/servers/roles/ngnix/tasks/main.yml
@@ -7,5 +7,6 @@
template: src={{ item }}.conf.j2 dest=/etc/nginx/sites-enabled/{{ item }}.conf
with_items:
- elk
+ - qtip
notify:
- restart nginx
diff --git a/supporting/servers/roles/ngnix/templates/qtip.conf.j2 b/supporting/servers/roles/ngnix/templates/qtip.conf.j2
new file mode 100644
index 00000000..3a15c6ba
--- /dev/null
+++ b/supporting/servers/roles/ngnix/templates/qtip.conf.j2
@@ -0,0 +1,17 @@
+# {{ ansible_managed }}
+
+# servers
+#
+{% for service in qtip_services %}
+server {
+ listen 80;
+ listen 443 ssl;
+ server_name {{ service.name }}.qtip.openzero.net;
+ location / {
+ proxy_pass {{ service.upstream }};
+ sub_filter {{ service.upstream }} 'http://{{ service.name }}.qtip.openzero.net';
+ sub_filter_once off;
+ sub_filter_types text/html application/json;
+ }
+}
+{% endfor %}