Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
salt
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
17
Merge Requests
1
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c40ce832
authored
Jul 20, 2018
by
barni2000
Committed by
barni2000
Jul 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix graphite install
parent
26b7ba4b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
31 deletions
+17
-31
salt/graphite/configuration.sls
+1
-1
salt/graphite/files/graphite.service
+1
-1
salt/graphite/files/requirements.txt
+1
-1
salt/graphite/files/syncdb.sh
+2
-2
salt/graphite/virtualenv.sls
+12
-26
No files found.
salt/graphite/configuration.sls
View file @
c40ce832
postactivate:
file.managed:
- name: /
home/{{ pillar['graphite']['user'] }}/.virtualenvs
/graphite/bin/postactivate
- name: /
opt
/graphite/bin/postactivate
- source: salt://graphite/files/postactivate
- template: jinja
- user: {{ pillar['graphite']['user'] }}
...
...
salt/graphite/files/graphite.service
View file @
c40ce832
...
...
@@ -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 /etc/profile;
workon graphite; PYTHONPATH=/opt/graphite/webapp
exec django-admin.py runserver [::]:8081 --settings=graphite.settings"
ExecStart=/bin/bash -c "source /etc/profile;
source /opt/graphite/bin/activate; PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/"
exec django-admin.py runserver [::]:8081 --settings=graphite.settings"
Restart=always
[Install]
...
...
salt/graphite/files/requirements.txt
View file @
c40ce832
Django
==1.
7
Django
==1.
11
Twisted
<12.0
python-memcached
txAMQP
...
...
salt/graphite/files/syncdb.sh
View file @
c40ce832
#!/bin/bash
source
/
home/
{{
pillar[
'graphite'
][
'user'
]
}}
/.virtualenvs
/graphite/bin/activate
;
source
/
opt
/graphite/bin/activate
;
cd
/opt/graphite/webapp/graphite/
PYTHONPATH
=
/opt/graphite/webapp django-admin.py syncdb
--settings
=
graphite.settings
--noinput
PYTHONPATH
=
"/opt/graphite/lib/:/opt/graphite/webapp/"
django-admin.py migrate
--settings
=
graphite.settings
--noinput
salt/graphite/virtualenv.sls
View file @
c40ce832
virtualenv_graphite:
virtualenv.managed:
- name: /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite
- name: /opt/graphite/
- system_site_packages: False
- user: {{ pillar['graphite']['user'] }}
pip_graphite:
pip.installed:
- bin_env: /opt/graphite/bin/pip
- requirements: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- user: {{ pillar['graphite']['user'] }}
- install_options:
- --prefix=/opt/graphite
- require:
- virtualenv_graphite
- user: {{ pillar['graphite']['user'] }}
- file: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- file: /opt/graphite
global-site-packages:
file.absent:
- name: /home/{{pillar['graphite']['user'] }}/.virtualenvs/graphite/lib/python2.7/no-global-site-packages.txt
- require:
- virtualenv: virtualenv_graphite
unicode-fix-diff:
file.managed:
- name: /home/{{pillar['graphite']['user'] }}/graphite-unicode-fix.diff
- template: jinja
- source: salt://graphite/files/graphite-unicode-fix.diff
- user: {{ pillar['graphite']['user'] }}
- group: {{ pillar['graphite']['user'] }}
unicode-fix:
cmd.run:
- user: {{ pillar['graphite']['user'] }}
- cwd: /opt/graphite/webapp/graphite
- name: patch -N -p1 < /home/{{pillar['graphite']['user'] }}/graphite-unicode-fix.diff
- onlyif: patch -N --dry-run --silent -p1 < /home/{{pillar['graphite']['user'] }}/graphite-unicode-fix.diff
- require:
- virtualenv: virtualenv_graphite
- user: {{ pillar['graphite']['user'] }}
- file: unicode-fix-diff
- env_vars:
PYTHONPATH: '/opt/graphite/lib/:/opt/graphite/webapp/'
salt://graphite/files/syncdb.sh:
cmd.script:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment