]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
templates for nginx
authorAlfredo Deza <adeza@redhat.com>
Tue, 7 Jul 2015 13:23:39 +0000 (09:23 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 17 Jul 2015 21:23:26 +0000 (17:23 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ansible/master/ansible-jenkins/templates/jenkins.conf [new file with mode: 0644]
ansible/master/ansible-jenkins/templates/nginx.conf [new file with mode: 0644]
ansible/master/master.yml

diff --git a/ansible/master/ansible-jenkins/templates/jenkins.conf b/ansible/master/ansible-jenkins/templates/jenkins.conf
new file mode 100644 (file)
index 0000000..b01e34d
--- /dev/null
@@ -0,0 +1,22 @@
+# {{ ansible_managed }}
+
+server {
+    listen       80;
+
+    # FIXME
+    server_name  localhost;
+
+    access_log  /var/log/nginx/jenkins_access.log;
+    error_log  /var/log/nginx/jenkins_error.log;
+
+    location / {
+      proxy_set_header        Host $host;
+      proxy_set_header        X-Real-IP $remote_addr;
+      proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
+      proxy_set_header        X-Forwarded-Proto $scheme;
+
+      proxy_pass          http://127.0.0.1:8080;
+      proxy_read_timeout  90;
+
+    }
+}
diff --git a/ansible/master/ansible-jenkins/templates/nginx.conf b/ansible/master/ansible-jenkins/templates/nginx.conf
new file mode 100644 (file)
index 0000000..1ab526e
--- /dev/null
@@ -0,0 +1,69 @@
+# {{ ansible_managed }}
+user nginx;
+worker_processes {{ nginx_processor_count }};
+worker_rlimit_nofile 8192;
+
+pid /var/run/nginx.pid;
+
+events {
+       worker_connections {{ nginx_connections }} ;
+       # multi_accept on;
+}
+
+http {
+
+       ##
+       # Basic Settings
+       ##
+
+       #sendfile on;
+       tcp_nopush on;
+       tcp_nodelay on;
+       keepalive_timeout 65;
+       types_hash_max_size 2048;
+       server_tokens off;
+
+       # server_names_hash_bucket_size 64;
+       # server_name_in_redirect off;
+
+       include /etc/nginx/mime.types;
+       default_type application/octet-stream;
+
+       ##
+       # Logging Settings
+       ##
+
+       access_log /var/log/nginx/access.log;
+       error_log /var/log/nginx/error.log;
+
+       ##
+       # Gzip Settings
+       ##
+
+       gzip on;
+       gzip_disable "msie6";
+
+       # gzip_vary on;
+       # gzip_proxied any;
+       # gzip_comp_level 6;
+       # gzip_buffers 16 8k;
+       # gzip_http_version 1.1;
+       # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
+
+       ##
+       # If HTTPS, then set a variable so it can be passed along.
+       ##
+
+       map $scheme $server_https {
+               default off;
+               https on;
+       }
+
+       ##
+       # Virtual Host Configs
+       ##
+
+       include /etc/nginx/conf.d/*.conf;
+       include /etc/nginx/sites-enabled/*;
+}
+
index 53ef2b82101e9756d0ddee814138bae9e6dfdefe..23e9b1d6fd896cfe4416ceeb494ce4736d061734 100644 (file)
@@ -6,6 +6,8 @@
   roles:
     - ansible-jenkins
   vars:
+    - nginx_processor_count: 20
+    - nginx_connections: 2048
     - ansible_ssh_port: 2222
     - plugins:
       - 'ldap'