Commit 39bc5c7b by Czémán Arnold

Merge branch 'issue-27' into 'master'

fix startup/syncdb problems with Graphite due to missing manage.py (issue #27)

See merge request !9
parents 365c2a84 0264ba94
...@@ -13,5 +13,5 @@ env HOME=/home/{{ pillar['graphite']['user'] }} ...@@ -13,5 +13,5 @@ env HOME=/home/{{ pillar['graphite']['user'] }}
script script
. $HOME/.virtualenvs/graphite/local/bin/activate . $HOME/.virtualenvs/graphite/local/bin/activate
cd /opt/graphite/webapp/graphite cd /opt/graphite/webapp/graphite
exec python manage.py runserver [::]:8081 PYTHONPATH=/opt/graphite/webapp exec django-admin.py runserver [::]:8081 --settings=graphite.settings
end script end script
...@@ -6,7 +6,7 @@ After=network.target ...@@ -6,7 +6,7 @@ After=network.target
User={{ pillar['graphite']['user'] }} User={{ pillar['graphite']['user'] }}
Group={{ pillar['graphite']['user'] }} Group={{ pillar['graphite']['user'] }}
WorkingDirectory=/opt/graphite/webapp/graphite WorkingDirectory=/opt/graphite/webapp/graphite
ExecStart=/bin/bash -c "source /etc/profile; workon graphite; exec python manage.py runserver [::]:8081" ExecStart=/bin/bash -c "source /etc/profile; workon graphite; PYTHONPATH=/opt/graphite/webapp exec django-admin.py runserver [::]:8081 --settings=graphite.settings"
Restart=always Restart=always
[Install] [Install]
......
...@@ -8,7 +8,6 @@ gunicorn ...@@ -8,7 +8,6 @@ gunicorn
pytz pytz
pyparsing pyparsing
whisper whisper
{% if grains['os_family'] != 'RedHat' %} scandir
carbon==0.9.12 carbon==1.0.2
{% endif %} graphite-web==1.0.2
graphite-web
#!/bin/bash #!/bin/bash
source /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite/bin/activate; source /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite/bin/activate;
cd /opt/graphite/webapp/graphite/ cd /opt/graphite/webapp/graphite/
python manage.py syncdb --noinput PYTHONPATH=/opt/graphite/webapp django-admin.py syncdb --settings=graphite.settings --noinput
{% if grains['os_family'] == 'RedHat' %}
python-carbon:
pkg.installed
{% endif %}
virtualenv_graphite: virtualenv_graphite:
virtualenv.managed: virtualenv.managed:
- name: /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite - name: /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite
......
...@@ -43,3 +43,13 @@ ...@@ -43,3 +43,13 @@
- user: {{ pillar['user'] }} - user: {{ pillar['user'] }}
- group: {{ pillar['user'] }} - group: {{ pillar['user'] }}
- mode: 755 - mode: 755
# will not be needed in the future, with new gc
/datastore/trash:
file.directory:
- user: {{ pillar['user'] }}
- group: {{ pillar['user'] }}
- mode: 755
- require:
- file: /datastore
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