Commit 42e3b6db by cloud

Fix graphite dependency order

parent ebe0fa54
......@@ -50,8 +50,9 @@ requirements:
- source: salt://graphite/files/graphite-carbon.conf
{% endif %}
/opt/graphite:
opt_graphite:
file.directory:
- name: /opt/graphite
- makedirs: True
- user: {{ pillar['graphite']['user'] }}
- group: {{ pillar['graphite']['user'] }}
......@@ -66,6 +67,7 @@ requirements:
- template: jinja
- makedirs: True
- require:
- opt_graphite
- user: {{ pillar['graphite']['user'] }}
/opt/graphite/conf/storage-schemas.conf:
......@@ -76,14 +78,17 @@ requirements:
- group: {{ pillar['graphite']['user'] }}
- makedirs: True
- require:
- opt_graphite
- user: {{ pillar['graphite']['user'] }}
/opt/graphite/webapp/graphite/local_settings.py:
local_settings:
file.managed:
- name: /opt/graphite/webapp/graphite/local_settings.py
- source: salt://graphite/files/local_settings.py
- user: {{ pillar['graphite']['user'] }}
- group: {{ pillar['graphite']['user'] }}
- template: jinja
- makedirs: True
- require:
- opt_graphite
- user: {{ pillar['graphite']['user'] }}
......@@ -7,7 +7,7 @@ User={{ pillar['graphite']['user'] }}
Group={{ pillar['graphite']['user'] }}
Environment=PYTHONPATH=/opt/graphite/lib GRAPHITE_ROOT=/opt/graphite
WorkingDirectory=/opt/graphite/bin/
ExecStart=/bin/bash -c "source /opt/graphite/bin/activate; exec twistd --nodaemon --reactor=epoll --no_save carbon-cache"
ExecStart=/bin/bash -c "source /opt/graphite/bin/activate; source /opt/graphite/bin/postactivate; exec twistd --nodaemon --reactor=epoll --no_save carbon-cache"
Restart=always
[Install]
......
......@@ -6,7 +6,7 @@ After=network.target
User={{ pillar['graphite']['user'] }}
Group={{ pillar['graphite']['user'] }}
WorkingDirectory=/opt/graphite/webapp/graphite
ExecStart=/bin/bash -c "source /opt/graphite/bin/activate; PYTHONPATH=/opt/graphite/lib/:/opt/graphite/webapp/ exec django-admin.py runserver [::]:8080 --settings=graphite.settings"
ExecStart=/bin/bash -c "source /opt/graphite/bin/activate; source /opt/graphite/bin/postactivate; PYTHONPATH=/opt/graphite/lib/:/opt/graphite/webapp/ exec django-admin.py runserver [::]:8080 --settings=graphite.settings"
Restart=always
[Install]
......
......@@ -3,6 +3,8 @@ virtualenv_graphite:
- name: /opt/graphite/
- system_site_packages: False
- user: {{ pillar['graphite']['user'] }}
- require:
- opt_graphite
pip_graphite:
pip.installed:
......@@ -24,5 +26,6 @@ salt://graphite/files/syncdb.sh:
- template: jinja
- user: {{ pillar['graphite']['user'] }}
- require:
- virtualenv: virtualenv_graphite
- virtualenv_graphite
- user: {{ pillar['graphite']['user'] }}
- local_settings
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment