diff --git a/pillar/installer.sls b/pillar/installer.sls index 97f5181..6966f4b 100644 --- a/pillar/installer.sls +++ b/pillar/installer.sls @@ -2,29 +2,29 @@ admin_pass: '12345678' admin_user: admin amqp: host: 127.0.0.1 - password: 3U8pKWMrXwvTl0By + password: vWGoF2wQUeJ6YiT0 port: 5672 user: cloud vhost: circle cache: pylibmc://127.0.0.1:11211/ database: name: circle - password: 5073G0NlRCfHtXhc + password: qBZbKIfyX9JmauYN user: circle deployment_type: local fwdriver: - external_if: enp5s0f1 - external_net: 10.4.0.204/16 - gateway: 10.4.255.254 + external_if: eth0 + external_net: 10.34.0.85/16 + gateway: 10.34.255.254 management_if: ethy - queue_name: wombat + queue_name: mycircle-dev trunk_if: linkb graphite: host: 127.0.0.1 - password: jObTZWyvd7zioM1u + password: lv0NtzdTKOfWFqbw port: 5672 queue: monitor - secret_key: 17Z0LiChQm5lqUfe + secret_key: y7k6op3Qc2hM0fTn user: monitor vhost: monitor init_type: systemd @@ -33,11 +33,11 @@ nfs: enabled: true network: 127.0.0.0/8 server: 127.0.0.1 -proxy_secret: r9l2JkQ6YIo4KNgf -secret_key: M4mF9OcrKQwx6Sgq +proxy_secret: 764OfnrsZ5lU2YMi +secret_key: CbRqoynxNZTv7uE6 storagedriver: - queue_name: wombat -timezone: Etc/UTC + queue_name: mycircle-dev +timezone: Europe/Budapest user: cloud vmdriver: - hypervisor_type: kvm + hypervisor_type: qemu diff --git a/salt/graphite/configuration.sls b/salt/graphite/configuration.sls index c67df7b..64c3a8c 100644 --- a/salt/graphite/configuration.sls +++ b/salt/graphite/configuration.sls @@ -17,6 +17,16 @@ requirement0: - require: - user: {{ pillar['graphite']['user'] }} +requirement1: + file.managed: + - name: /home/{{ pillar['graphite']['user'] }}/requirement1.txt + - template: jinja + - source: salt://graphite/files/requirement1.txt + - user: {{ pillar['graphite']['user'] }} + - group: {{ pillar['graphite']['user'] }} + - require: + - user: {{ pillar['graphite']['user'] }} + requirements: file.managed: - name: /home/{{ pillar['graphite']['user'] }}/requirements.txt diff --git a/salt/graphite/files/requirement0.txt b/salt/graphite/files/requirement0.txt index 4b73569..16a6bd1 100644 --- a/salt/graphite/files/requirement0.txt +++ b/salt/graphite/files/requirement0.txt @@ -1,3 +1,3 @@ # - --no-binary=:all: -r requirements.txt + --no-binary=:all: -r requirement1.txt diff --git a/salt/graphite/files/requirement1.txt b/salt/graphite/files/requirement1.txt new file mode 100644 index 0000000..a6a0c60 --- /dev/null +++ b/salt/graphite/files/requirement1.txt @@ -0,0 +1,5 @@ +# +graphite-web +whisper +carbon + diff --git a/salt/graphite/files/requirements.txt b/salt/graphite/files/requirements.txt index 3238127..966a0c5 100644 --- a/salt/graphite/files/requirements.txt +++ b/salt/graphite/files/requirements.txt @@ -1,9 +1,6 @@ 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 +#Django == 3.0.14 +#Twisted == 22.4.0 txAMQP simplejson django-tagging diff --git a/salt/graphite/virtualenv.sls b/salt/graphite/virtualenv.sls index afd9c6e..9e4629c 100644 --- a/salt/graphite/virtualenv.sls +++ b/salt/graphite/virtualenv.sls @@ -2,14 +2,28 @@ virtualenv_graphite: virtualenv.managed: - python: /usr/bin/python3 - name: /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite - - requirements: /home/{{ pillar['graphite']['user'] }}/requirement0.txt + - requirements: /home/{{ pillar['graphite']['user'] }}/requirements.txt - user: {{ pillar['graphite']['user'] }} - cwd: /home/{{ pillar['graphite']['user'] }} - no_chown: true + - require: + - virtualenv: virtualenv_graphite_first + +virtualenv_graphite_first: + virtualenv.managed: + - python: /usr/bin/python3 + - name: /home/{{ pillar['graphite']['user'] }}/.virtualenvs/graphite + - requirements: /home/{{ pillar['graphite']['user'] }}/requirement0.txt + - user: {{ pillar['graphite']['user'] }} + - cwd: /home/{{ pillar['graphite']['user'] }} + - no_chown: true - no_binary: all + - env_vars: + PYTHONIOENCODING: 'utf-8' - require: - user: {{ pillar['graphite']['user'] }} - file: /home/{{ pillar['graphite']['user'] }}/requirement0.txt + - file: /home/{{ pillar['graphite']['user'] }}/requirement1.txt - file: /home/{{ pillar['graphite']['user'] }}/requirements.txt - file: /opt/graphite