Commit b226ba5c by Szeberényi Imre

graphite install fix

parent 5979c187
...@@ -2,29 +2,29 @@ admin_pass: '12345678' ...@@ -2,29 +2,29 @@ admin_pass: '12345678'
admin_user: admin admin_user: admin
amqp: amqp:
host: 127.0.0.1 host: 127.0.0.1
password: BXaVnWQzrlvifuEL password: 3U8pKWMrXwvTl0By
port: 5672 port: 5672
user: cloud user: cloud
vhost: circle vhost: circle
cache: pylibmc://127.0.0.1:11211/ cache: pylibmc://127.0.0.1:11211/
database: database:
name: circle name: circle
password: Pl3S0bayRhO0gFfr password: 5073G0NlRCfHtXhc
user: circle user: circle
deployment_type: local deployment_type: local
fwdriver: fwdriver:
external_if: eth0 external_if: enp5s0f1
external_net: 10.9.0.6/16 external_net: 10.4.0.204/16
gateway: 10.9.255.254 gateway: 10.4.255.254
management_if: ethy management_if: ethy
queue_name: test-dev queue_name: wombat
trunk_if: linkb trunk_if: linkb
graphite: graphite:
host: 127.0.0.1 host: 127.0.0.1
password: UO3xLYBunH1096wt password: jObTZWyvd7zioM1u
port: 5672 port: 5672
queue: monitor queue: monitor
secret_key: sfM40GA2U9xvHleY secret_key: 17Z0LiChQm5lqUfe
user: monitor user: monitor
vhost: monitor vhost: monitor
init_type: systemd init_type: systemd
...@@ -33,11 +33,11 @@ nfs: ...@@ -33,11 +33,11 @@ nfs:
enabled: true enabled: true
network: 127.0.0.0/8 network: 127.0.0.0/8
server: 127.0.0.1 server: 127.0.0.1
proxy_secret: eG9XdDVJiRcA1ahy proxy_secret: r9l2JkQ6YIo4KNgf
secret_key: hfRBwmFxnj2MPYoT secret_key: M4mF9OcrKQwx6Sgq
storagedriver: storagedriver:
queue_name: test-dev queue_name: wombat
timezone: Europe/Budapest timezone: Etc/UTC
user: cloud user: cloud
vmdriver: vmdriver:
hypervisor_type: qemu hypervisor_type: kvm
...@@ -2,7 +2,7 @@ include: ...@@ -2,7 +2,7 @@ include:
- profile - profile
- agentdriver - agentdriver
- manager - manager
# - graphite - graphite
- monitor-client - monitor-client
- storagedriver - storagedriver
- vmdriver - vmdriver
......
...@@ -7,6 +7,16 @@ postactivate: ...@@ -7,6 +7,16 @@ postactivate:
- group: {{ pillar['graphite']['user'] }} - group: {{ pillar['graphite']['user'] }}
- mode: 700 - mode: 700
requirement0:
file.managed:
- name: /home/{{ pillar['graphite']['user'] }}/requirement0.txt
- template: jinja
- source: salt://graphite/files/requirement0.txt
- user: {{ pillar['graphite']['user'] }}
- group: {{ pillar['graphite']['user'] }}
- require:
- user: {{ pillar['graphite']['user'] }}
requirements: requirements:
file.managed: file.managed:
- name: /home/{{ pillar['graphite']['user'] }}/requirements.txt - name: /home/{{ pillar['graphite']['user'] }}/requirements.txt
...@@ -17,7 +27,8 @@ requirements: ...@@ -17,7 +27,8 @@ requirements:
- require: - require:
- user: {{ pillar['graphite']['user'] }} - user: {{ pillar['graphite']['user'] }}
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if pillar['init_type'] == 'systemd' %}
/etc/systemd/system/graphite.service: /etc/systemd/system/graphite.service:
file.managed: file.managed:
......
#
--no-binary=:all: -r requirements.txt
Django==1.7
Twisted<12.0
python-memcached python-memcached
whisper @ https://github.com/graphite-project/whisper/tarball/master
carbon @ https://github.com/graphite-project/carbon/tarball/master
graphite-web @ https://github.com/graphite-project/graphite-web/tarball/master
Django == 3.0.14
Twisted == 22.4.0
txAMQP txAMQP
simplejson simplejson
django-tagging django-tagging
gunicorn gunicorn
pytz pytz
pyparsing pyparsing
whisper
scandir scandir
carbon==1.0.2 cairocffi
cairocffi==0.9.0 service-identity
graphite-web==1.0.2
include: include:
- graphite.rabbitmq - manager.rabbitmq
- graphite.virtualenv - graphite.virtualenv
- graphite.configuration - graphite.configuration
graphite: graphite:
pkg.installed: # pkg.installed:
- pkgs: # - pkgs:
- git # - graphite-web
- ntp # - graphite-carbon
{% if grains['os_family'] == 'RedHat' %} # - require:
- python2-pip # - user: {{ pillar['graphite']['user'] }}
- pycairo # - require_in:
- python-devel # - virtualenv: virtualenv_graphite
- python-virtualenvwrapper # - service: graphite
- dejavu-sans-fonts # - service: graphite-carbon
{% else %}
- python-pip
- python-cairo
- python-dev
- virtualenvwrapper
{% endif %}
- require:
- user: {{ pillar['graphite']['user'] }}
- require_in:
- virtualenv: virtualenv_graphite
- service: graphite
- service: graphite-carbon
user: user:
- present - present
- name: {{ pillar['graphite']['user'] }} - name: {{ pillar['graphite']['user'] }}
- gid_from_name: True - shell: /bin/bash
- usergroup: True
service: service:
- running - running
......
rabbitmq-server_monitor:
pkg.installed:
- name: rabbitmq-server
service:
- running
- name: rabbitmq-server
- require:
- pkg: rabbitmq-server
rabbitmq_user_monitor:
rabbitmq_user.present:
- name: {{ pillar['graphite']['user'] }}
- password: {{ pillar['graphite']['password'] }}
virtual_host_monitor:
rabbitmq_vhost.present:
- name: {{ pillar['graphite']['vhost']}}
- user: {{ pillar['graphite']['user'] }}
- conf: .*
- write: .*
- read: .*
virtualenv_graphite: virtualenv_graphite:
virtualenv.managed: virtualenv.managed:
- python: /usr/bin/python3
- name: /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite - name: /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite
- requirements: /home/{{ pillar['graphite']['user'] }}/requirements.txt - requirements: /home/{{ pillar['graphite']['user'] }}/requirement0.txt
- user: {{ pillar['graphite']['user'] }} - user: {{ pillar['graphite']['user'] }}
- cwd: /home/{{ pillar['graphite']['user'] }}
- no_chown: true
- no_binary: all
- require: - require:
- user: {{ pillar['graphite']['user'] }} - user: {{ pillar['graphite']['user'] }}
- file: /home/{{ pillar['graphite']['user'] }}/requirement0.txt
- file: /home/{{ pillar['graphite']['user'] }}/requirements.txt - file: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- file: /opt/graphite - file: /opt/graphite
global-site-packages: global-site-packages:
file.absent: file.absent:
- name: /home/{{pillar['graphite']['user'] }}/.virtualenvs/graphite/lib/python2.7/no-global-site-packages.txt - name: /home/{{pillar['graphite']['user'] }}/.virtualenvs/graphite/lib/python3.6/no-global-site-packages.txt
- require: - require:
- virtualenv: virtualenv_graphite - virtualenv: virtualenv_graphite
...@@ -33,10 +38,12 @@ unicode-fix: ...@@ -33,10 +38,12 @@ unicode-fix:
- user: {{ pillar['graphite']['user'] }} - user: {{ pillar['graphite']['user'] }}
- file: unicode-fix-diff - file: unicode-fix-diff
salt://graphite/files/syncdb.sh: #salt://graphite/files/syncdb.sh:
cmd.script: # cmd.script:
- template: jinja # - template: jinja
- user: {{ pillar['graphite']['user'] }} # - user: {{ pillar['graphite']['user'] }}
- require: # - group: {{ pillar['graphite']['user'] }}
- virtualenv: virtualenv_graphite # - runas: {{ pillar['graphite']['user'] }}
- user: {{ pillar['graphite']['user'] }} # - require:
# - virtualenv: virtualenv_graphite
# - user: {{ pillar['graphite']['user'] }}
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