diff --git a/Dockerfile b/Dockerfile index 6a3fa1f2f..7ba5e7501 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,19 +38,13 @@ ADD . . # Run grunt RUN cd grunt && grunt -ADD conf/init/svlogd_config /svlogd_config ADD conf/init/doupdatelimits.sh /etc/my_init.d/ -ADD conf/init/preplogsdir.sh /etc/my_init.d/ +ADD conf/init/copy_syslog_config.sh /etc/my_init.d/ ADD conf/init/runmigration.sh /etc/my_init.d/ -ADD conf/init/gunicorn_web /etc/service/gunicorn_web -ADD conf/init/gunicorn_registry /etc/service/gunicorn_registry -ADD conf/init/gunicorn_verbs /etc/service/gunicorn_verbs -ADD conf/init/nginx /etc/service/nginx -ADD conf/init/diffsworker /etc/service/diffsworker -ADD conf/init/notificationworker /etc/service/notificationworker -ADD conf/init/buildlogsarchiver /etc/service/buildlogsarchiver -ADD conf/init/buildmanager /etc/service/buildmanager +ADD conf/init/service/ /etc/service/ + +RUN rm -rf /etc/service/syslog-forwarder # Download any external libs. RUN mkdir static/fonts static/ldn diff --git a/conf/http-base.conf b/conf/http-base.conf index 8b7ff9e0b..3c3d57372 100644 --- a/conf/http-base.conf +++ b/conf/http-base.conf @@ -4,7 +4,7 @@ types_hash_max_size 2048; include /usr/local/nginx/conf/mime.types.default; default_type application/octet-stream; -access_log /var/log/nginx/nginx.access.log; +access_log /dev/stdout; sendfile on; gzip on; diff --git a/conf/init/buildlogsarchiver/log/run b/conf/init/buildlogsarchiver/log/run deleted file mode 100755 index c35fb1fb9..000000000 --- a/conf/init/buildlogsarchiver/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec svlogd /var/log/buildlogsarchiver/ \ No newline at end of file diff --git a/conf/init/buildmanager/log/run b/conf/init/buildmanager/log/run deleted file mode 100755 index 1dd4c3fef..000000000 --- a/conf/init/buildmanager/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec svlogd /var/log/buildmanager/ \ No newline at end of file diff --git a/conf/init/copy_syslog_config.sh b/conf/init/copy_syslog_config.sh new file mode 100755 index 000000000..7acd62b6b --- /dev/null +++ b/conf/init/copy_syslog_config.sh @@ -0,0 +1,6 @@ +#! /bin/sh + +if [ -e /conf/stack/syslog-ng-extra.conf ] +then + cp /conf/stack/syslog-ng-extra.conf /etc/syslog-ng/conf.d/ +fi diff --git a/conf/init/diffsworker/log/run b/conf/init/diffsworker/log/run deleted file mode 100755 index 066f7415a..000000000 --- a/conf/init/diffsworker/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec svlogd /var/log/diffsworker/ \ No newline at end of file diff --git a/conf/init/gunicorn_registry/log/run b/conf/init/gunicorn_registry/log/run deleted file mode 100755 index 1896ef533..000000000 --- a/conf/init/gunicorn_registry/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec svlogd /var/log/gunicorn_registry/ \ No newline at end of file diff --git a/conf/init/gunicorn_verbs/log/run b/conf/init/gunicorn_verbs/log/run deleted file mode 100755 index 2b061e193..000000000 --- a/conf/init/gunicorn_verbs/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec svlogd /var/log/gunicorn_verbs/ \ No newline at end of file diff --git a/conf/init/gunicorn_web/log/run b/conf/init/gunicorn_web/log/run deleted file mode 100755 index de17cdf61..000000000 --- a/conf/init/gunicorn_web/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec svlogd /var/log/gunicorn_web/ \ No newline at end of file diff --git a/conf/init/nginx/log/run b/conf/init/nginx/log/run deleted file mode 100755 index 30476f6e6..000000000 --- a/conf/init/nginx/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec svlogd /var/log/nginx/ \ No newline at end of file diff --git a/conf/init/notificationworker/log/run b/conf/init/notificationworker/log/run deleted file mode 100755 index 46f8431a7..000000000 --- a/conf/init/notificationworker/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec svlogd -t /var/log/notificationworker/ \ No newline at end of file diff --git a/conf/init/preplogsdir.sh b/conf/init/preplogsdir.sh deleted file mode 100755 index 93c3ee5af..000000000 --- a/conf/init/preplogsdir.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh - -echo 'Linking config files to logs directory' -for svc in `ls /etc/service/` -do - if [ ! -d /var/log/$svc ]; then - mkdir -p /var/log/$svc - ln -s /svlogd_config /var/log/$svc/config - fi -done diff --git a/conf/init/service/buildlogsarchiver/log/run b/conf/init/service/buildlogsarchiver/log/run new file mode 100755 index 000000000..3bcd9ba8a --- /dev/null +++ b/conf/init/service/buildlogsarchiver/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -i -t buildlogsarchiver \ No newline at end of file diff --git a/conf/init/buildlogsarchiver/run b/conf/init/service/buildlogsarchiver/run similarity index 100% rename from conf/init/buildlogsarchiver/run rename to conf/init/service/buildlogsarchiver/run diff --git a/conf/init/service/buildmanager/log/run b/conf/init/service/buildmanager/log/run new file mode 100755 index 000000000..b35e28af9 --- /dev/null +++ b/conf/init/service/buildmanager/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -i -t buildmanager \ No newline at end of file diff --git a/conf/init/buildmanager/run b/conf/init/service/buildmanager/run similarity index 100% rename from conf/init/buildmanager/run rename to conf/init/service/buildmanager/run diff --git a/conf/init/service/diffsworker/log/run b/conf/init/service/diffsworker/log/run new file mode 100755 index 000000000..8e3dca5f3 --- /dev/null +++ b/conf/init/service/diffsworker/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -i -t diffsworker \ No newline at end of file diff --git a/conf/init/diffsworker/run b/conf/init/service/diffsworker/run similarity index 100% rename from conf/init/diffsworker/run rename to conf/init/service/diffsworker/run diff --git a/conf/init/service/gunicorn_registry/log/run b/conf/init/service/gunicorn_registry/log/run new file mode 100755 index 000000000..5b5b37af9 --- /dev/null +++ b/conf/init/service/gunicorn_registry/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -i -t gunicorn_registry \ No newline at end of file diff --git a/conf/init/gunicorn_registry/run b/conf/init/service/gunicorn_registry/run similarity index 100% rename from conf/init/gunicorn_registry/run rename to conf/init/service/gunicorn_registry/run diff --git a/conf/init/service/gunicorn_verbs/log/run b/conf/init/service/gunicorn_verbs/log/run new file mode 100755 index 000000000..d0bc335d7 --- /dev/null +++ b/conf/init/service/gunicorn_verbs/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -i -t gunicorn_verbs \ No newline at end of file diff --git a/conf/init/gunicorn_verbs/run b/conf/init/service/gunicorn_verbs/run similarity index 100% rename from conf/init/gunicorn_verbs/run rename to conf/init/service/gunicorn_verbs/run diff --git a/conf/init/service/gunicorn_web/log/run b/conf/init/service/gunicorn_web/log/run new file mode 100755 index 000000000..c96d365a5 --- /dev/null +++ b/conf/init/service/gunicorn_web/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -i -t gunicorn_web \ No newline at end of file diff --git a/conf/init/gunicorn_web/run b/conf/init/service/gunicorn_web/run similarity index 100% rename from conf/init/gunicorn_web/run rename to conf/init/service/gunicorn_web/run diff --git a/conf/init/service/nginx/log/run b/conf/init/service/nginx/log/run new file mode 100755 index 000000000..168af6d3e --- /dev/null +++ b/conf/init/service/nginx/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -i -t nginx \ No newline at end of file diff --git a/conf/init/nginx/run b/conf/init/service/nginx/run similarity index 100% rename from conf/init/nginx/run rename to conf/init/service/nginx/run diff --git a/conf/init/service/notificationworker/log/run b/conf/init/service/notificationworker/log/run new file mode 100755 index 000000000..49747f3ce --- /dev/null +++ b/conf/init/service/notificationworker/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -i -t notificationworker \ No newline at end of file diff --git a/conf/init/notificationworker/run b/conf/init/service/notificationworker/run similarity index 100% rename from conf/init/notificationworker/run rename to conf/init/service/notificationworker/run diff --git a/conf/init/svlogd_config b/conf/init/svlogd_config deleted file mode 100644 index 2ccee1e0c..000000000 --- a/conf/init/svlogd_config +++ /dev/null @@ -1,3 +0,0 @@ -s100000000 -t86400 -n4 diff --git a/conf/proxy-protocol.conf b/conf/proxy-protocol.conf index 5897f1839..ba00507f5 100644 --- a/conf/proxy-protocol.conf +++ b/conf/proxy-protocol.conf @@ -5,4 +5,4 @@ real_ip_header proxy_protocol; log_format elb_pp '$proxy_protocol_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"'; -access_log /var/log/nginx/nginx.access.log elb_pp; +access_log /dev/stdout elb_pp; diff --git a/conf/root-base.conf b/conf/root-base.conf index 02c004564..357e6ed03 100644 --- a/conf/root-base.conf +++ b/conf/root-base.conf @@ -1,7 +1,7 @@ # vim: ft=nginx pid /tmp/nginx.pid; -error_log /var/log/nginx/nginx.error.log; +error_log /dev/stdout; worker_processes 2; worker_priority -10; diff --git a/conf/server-base.conf b/conf/server-base.conf index 2f03b11b2..3853fbccf 100644 --- a/conf/server-base.conf +++ b/conf/server-base.conf @@ -1,6 +1,5 @@ # vim: ft=nginx -client_body_temp_path /var/log/nginx/client_body 1 2; server_name _; keepalive_timeout 5; @@ -36,7 +35,7 @@ location /v1/repositories/ { proxy_pass http://registry_app_server; proxy_read_timeout 2000; - proxy_temp_path /var/log/nginx/proxy_temp 1 2; + proxy_temp_path /tmp 1 2; limit_req zone=repositories burst=10; } @@ -47,7 +46,7 @@ location /v1/ { proxy_request_buffering off; proxy_pass http://registry_app_server; - proxy_temp_path /var/log/nginx/proxy_temp 1 2; + proxy_temp_path /tmp 1 2; client_max_body_size 20G; } @@ -58,7 +57,7 @@ location /c1/ { proxy_request_buffering off; proxy_pass http://verbs_app_server; - proxy_temp_path /var/log/nginx/proxy_temp 1 2; + proxy_temp_path /tmp 1 2; limit_req zone=verbs burst=10; }