From cee0c5f2ef640975a2a262aae4d2a5dd080e67cc Mon Sep 17 00:00:00 2001 From: Brendan Fosberry Date: Tue, 9 May 2017 09:53:11 -0700 Subject: [PATCH 1/3] Updating Graphite version to 1.0.1 --- Dockerfile | 6 +++--- conf/etc/my_init.d/01_conf_init.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9ef98f3..6698ecc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ RUN pip install django==1.5.12\ txAMQP==0.6.2 # install graphite -RUN git clone -b 0.9.15 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web +RUN git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web WORKDIR /usr/local/src/graphite-web RUN python ./setup.py install ADD conf/opt/graphite/conf/*.conf /opt/graphite/conf/ @@ -40,12 +40,12 @@ ADD conf/opt/graphite/webapp/graphite/app_settings.py /opt/graphite/webapp/graph RUN python /opt/graphite/webapp/graphite/manage.py collectstatic --noinput # install whisper -RUN git clone -b 0.9.15 --depth 1 https://github.com/graphite-project/whisper.git /usr/local/src/whisper +RUN git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/whisper.git /usr/local/src/whisper WORKDIR /usr/local/src/whisper RUN python ./setup.py install # install carbon -RUN git clone -b 0.9.15 --depth 1 https://github.com/graphite-project/carbon.git /usr/local/src/carbon +RUN git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/carbon.git /usr/local/src/carbon WORKDIR /usr/local/src/carbon RUN python ./setup.py install diff --git a/conf/etc/my_init.d/01_conf_init.sh b/conf/etc/my_init.d/01_conf_init.sh index e44f53b..d55fa0c 100755 --- a/conf/etc/my_init.d/01_conf_init.sh +++ b/conf/etc/my_init.d/01_conf_init.sh @@ -12,7 +12,7 @@ graphite_conf_dir_contents=$(find /opt/graphite/conf -mindepth 1 -print -quit) graphite_webapp_dir_contents=$(find /opt/graphite/webapp/graphite -mindepth 1 -print -quit) graphite_storage_dir_contents=$(find /opt/graphite/storage -mindepth 1 -print -quit) if [[ -z $graphite_dir_contents ]]; then - git clone -b 0.9.15 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web + git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web cd /usr/local/src/graphite-web && python ./setup.py install fi if [[ -z $graphite_storage_dir_contents ]]; then From 30aa2e02472ce0fc81b5b7e3ca093ccb8bbac890 Mon Sep 17 00:00:00 2001 From: Brendan Fosberry Date: Tue, 9 May 2017 10:28:59 -0700 Subject: [PATCH 2/3] Updating paths, deps --- Dockerfile | 6 ++++-- conf/usr/local/bin/django_admin_init.exp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6698ecc..53c63dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,8 @@ RUN pip install django==1.5.12\ python-memcached==1.53\ django-tagging==0.3.1\ twisted==11.1.0\ - txAMQP==0.6.2 + txAMQP==0.6.2\ + pytz # install graphite RUN git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web @@ -37,7 +38,7 @@ RUN python ./setup.py install ADD conf/opt/graphite/conf/*.conf /opt/graphite/conf/ ADD conf/opt/graphite/webapp/graphite/local_settings.py /opt/graphite/webapp/graphite/local_settings.py ADD conf/opt/graphite/webapp/graphite/app_settings.py /opt/graphite/webapp/graphite/app_settings.py -RUN python /opt/graphite/webapp/graphite/manage.py collectstatic --noinput +RUN python /usr/local/src/graphite-web/webapp/manage.py collectstatic --noinput # install whisper RUN git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/whisper.git /usr/local/src/whisper @@ -59,6 +60,7 @@ ADD conf/etc/nginx/nginx.conf /etc/nginx/nginx.conf ADD conf/etc/nginx/sites-enabled/graphite-statsd.conf /etc/nginx/sites-enabled/graphite-statsd.conf # init django admin +RUN mkdir -p /usr/local/src/graphite-web/storage/log/webapp ADD conf/usr/local/bin/django_admin_init.exp /usr/local/bin/django_admin_init.exp RUN /usr/local/bin/django_admin_init.exp diff --git a/conf/usr/local/bin/django_admin_init.exp b/conf/usr/local/bin/django_admin_init.exp index d6173a4..d2f95d3 100755 --- a/conf/usr/local/bin/django_admin_init.exp +++ b/conf/usr/local/bin/django_admin_init.exp @@ -1,7 +1,7 @@ #!/usr/bin/env expect set timeout -1 -spawn python /opt/graphite/webapp/graphite/manage.py syncdb +spawn python /usr/local/src/graphite-web/webapp/manage.py syncdb expect "Would you like to create one now" { send "yes\r" From 64c959baebe680a27478af5d34266e0cf37c4150 Mon Sep 17 00:00:00 2001 From: Brendan Fosberry Date: Tue, 9 May 2017 10:36:40 -0700 Subject: [PATCH 3/3] Fixing startup path for manage.py --- conf/etc/service/graphite/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/etc/service/graphite/run b/conf/etc/service/graphite/run index 211a6d1..db62ce8 100755 --- a/conf/etc/service/graphite/run +++ b/conf/etc/service/graphite/run @@ -1,4 +1,4 @@ #!/bin/bash -exec /usr/bin/python /opt/graphite/webapp/graphite/manage.py runfcgi daemonize=false host=127.0.0.1 port=8080 +exec /usr/bin/python /usr/local/src/graphite-web/webapp/manage.py runfcgi daemonize=false host=127.0.0.1 port=8080