Commit 8df6aa33 by Desztics Armand

fix, zeroerror

parent cced407b
fwdriver:
repo_name: https://git.ik.bme.hu/circle/fwdriver.git
repo_revision: master
repo_revision: ubuntu1604
user: fw
......
#user: cloud
#proxy_secret: xooquageire7uX1
#secret_key: Ga4aex3Eesohngo
#timezone: Europe/Budapest
#deployment_type: local
#admin_user: admin
#admin_pass: 4j23oihreehfd
#database:
# name: circle
# user: circle
# password: hoGei6paiN0ieda
#amqp:
# user: cloud
# password: password
# host: 127.0.0.1
# port: 5672
# vhost: circle
#graphite:
# user: monitor
# password: monitor
# host: 127.0.0.1
# port: 5672
# vhost: monitor
# queue: monitor
# secret_key: ahf2aim7ahLeo8n
#cache: pylibmc://127.0.0.1:11211/
#nfs:
# enabled: true
# server: 10.0.0.115
# network: 192.168.1.0/24
# directory: /datastore
#storagedriver:
# queue_name: cloud-6605
#fwdriver:
# queue_name: cloud-6605
# gateway: 10.0.255.254
# external_net: 10.0.0.115/16
# external_if: eth0
# trunk_if: linkb
# management_if: ethy
user: cloud
proxy_secret: xooquageire7uX1
secret_key: Ga4aex3Eesohngo
timezone: Europe/Budapest
deployment_type: production
admin_user: admin
admin_pass: admin
database:
name: circle
user: circle
password: hoGei6paiN0ieda
amqp:
user: cloud
password: password
host: 127.0.0.1
port: 5672
vhost: circle
graphite:
user: monitor
password: monitor
host: 127.0.0.1
port: 5672
vhost: monitor
queue: monitor
secret_key: ahf2aim7ahLeo8n
cache: pylibmc://127.0.0.1:11211/
nfs:
enabled: true
server: 127.0.0.1
network: 127.0.0.0/8
directory: /datastore
storagedriver:
queue_name: ubuntu
fwdriver:
queue_name: ubuntu
gateway: 10.9.255.254
external_net: 10.9.0.64/16
external_if: ens3
trunk_if: linkb
management_if: ethy
......@@ -4,3 +4,7 @@ virtualenv_agentdriver:
- requirements: /home/{{ pillar['user'] }}/agentdriver/requirements.txt
- user: {{ pillar['user'] }}
- no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
git:
pkg.installed
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
ubuntu_virtualenvwrapper:
file.append:
- name: /etc/profile
- text:
- "export WORKON_HOME=$HOME/.virtualenvs"
- "source /usr/share/virtualenvwrapper/virtualenvwrapper.sh"
{% endif %}
\ No newline at end of file
......@@ -4,3 +4,7 @@ virtualenv_fwdriver:
- requirements: /home/{{ pillar['fwdriver']['user'] }}/fwdriver/requirements/production.txt
- user: {{ pillar['fwdriver']['user'] }}
- no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
......@@ -12,6 +12,9 @@ virtualenv_graphite:
- user: {{ pillar['graphite']['user'] }}
- file: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- file: /opt/graphite
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- file: ubuntu_virtualenvwrapper
{% endif %}
global-site-packages:
file.absent:
......
......@@ -24,6 +24,9 @@ virtualenv_manager:
{% if grains['os_family'] == 'RedHat' %}
- environ: m2crypto_swig_env
{% endif %}
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- file: ubuntu_virtualenvwrapper
{% endif %}
salt://manager/files/syncdb.sh:
cmd.script:
......
......@@ -4,3 +4,7 @@ virtualenv_monitor-client:
- requirements: /home/{{ pillar['user'] }}/monitor-client/requirements.txt
- user: {{ pillar['user'] }}
- no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
......@@ -31,6 +31,8 @@ storage:
service:
- running
- enable: True
- require:
- virtualenv: virtualenv_storagedriver
- watch:
- pkg: storagedriver
- sls: storagedriver.gitrepo
......
......@@ -4,3 +4,8 @@ virtualenv_storagedriver:
- requirements: /home/{{ pillar['user'] }}/storagedriver/requirements/production.txt
- user: {{ pillar['user'] }}
- no_chown: true
- require:
- pkg: storagedriver
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- file: ubuntu_virtualenvwrapper
{% endif %}
......@@ -50,8 +50,12 @@ vmdriver:
- file: /etc/apparmor.d/libvirt/TEMPLATE
- file: /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
- file: /var/lib/libvirt/serial
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
- service: libvirtd
{% else %}
- service: libvirt-bin
{% endif %}
{% endif %}
- augeas: libvirtconf
- git: gitrepo_vmdriver
- virtualenv: virtualenv_vmdriver
......
......@@ -13,9 +13,35 @@ libvirtconf:
/etc/default/libvirt-bin:
file.append:
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
- text: libvirtd_opts="-l"
{% else %}
- text: libvirtd_opts="-d -l"
{% endif %}
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
symlink_libvirtd:
file.symlink:
- name: /etc/systemd/system/libvirtd.service
- target: /lib/systemd/system/libvirt-bin.service
- force: True
- require_in:
- service: libvirtd
- require:
- cmd: kill_libvirt-bin
cmd.run:
- name: /bin/systemctl daemon-reload
- require:
- file: symlink_libvirtd
kill_libvirt-bin:
cmd.run:
- name: /usr/sbin/service libvirt-bin force-stop
- require:
- pkg: vmdriver
{% endif %}
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['osfinger'] == 'Ubuntu-16.04' %}
libvirtd:
{% else %}
libvirt-bin:
......@@ -25,6 +51,10 @@ libvirt-bin:
- watch:
- file: /etc/default/libvirt-bin
- augeas: libvirtconf
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
- require:
- user: user_in_libvirtd_group
{% endif %}
{% if grains['os_family'] == 'RedHat' %}
/usr/bin/kvm:
......@@ -67,13 +97,6 @@ vmdriver_semodule:
{% elif grains['os'] == 'Debian' %}
/usr/bin/kvm:
file.replace:
- pattern: -enable-kvm
- repl: ""
- watch:
- pkg: vmdriver
policycoreutils:
pkg.installed
......@@ -114,6 +137,15 @@ apparmor:
- file: /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
{% endif %}
{% if grains['os'] == 'Debian' or grains['osfinger'] == 'Ubuntu-16.04' %}
/usr/bin/kvm:
file.replace:
- pattern: -enable-kvm
- repl: ""
- watch:
- pkg: vmdriver
{% endif %}
/var/lib/libvirt/serial:
file.directory:
- makedirs: True
......@@ -124,3 +156,18 @@ apparmor:
{% endif %}
- group: kvm
- mode: 755
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
user_in_libvirtd_group:
user.present:
- name: {{ pillar['user'] }}
- groups:
- libvirtd
- require:
- file: fix_user_sudoer
fix_user_sudoer:
file.append:
- name: /etc/sudoers
- text: "{{ pillar['user'] }} ALL=(ALL) ALL"
{% endif %}
......@@ -4,12 +4,16 @@ virtualenv_vmdriver:
- requirements: /home/{{ pillar['user'] }}/vmdriver/requirements/production.txt
- user: {{ pillar['user'] }}
- no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
{% set libvirt_dir = "/usr/lib64/python2.7/site-packages/" if grains['os_family'] == 'RedHat' else "/usr/lib/python2.7/dist-packages/" %}
{% set targets = { 'libvirtmod_qemu.so': 'libvirtmod_qemu.x86_64-linux-gnu.so',
'libvirtmod.so': 'libvirtmod.x86_64-linux-gnu.so'
} if grains['os'] == 'Debian' else {} %}
} if (grains['os'] == 'Debian' or grains['osfinger'] == 'Ubuntu-16.04') else {} %}
{% for file in ("libvirtmod_qemu.so", "libvirtmod.so", "libvirt_qemu.py", "libvirt.py", "libvirt_qemu.pyc", "libvirt.pyc") %}
/home/{{ pillar['user'] }}/.virtualenvs/vmdriver/lib/python2.7/site-packages/{{ file }}:
......
......@@ -4,3 +4,7 @@ virtualenv_vncproxy:
- requirements: /home/{{ pillar['user'] }}/vncproxy/requirements/production.txt
- user: {{ pillar['user'] }}
- no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
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