Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
salt
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8df6aa33
authored
Jul 21, 2016
by
Desztics Armand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix, zeroerror
parent
cced407b
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
153 additions
and
61 deletions
+153
-61
pillar/firewall.sls
+1
-1
pillar/installer.sls
+50
-50
salt/agentdriver/virtualenv.sls
+4
-0
salt/common.sls
+9
-1
salt/fwdriver/virtualenv.sls
+4
-0
salt/graphite/virtualenv.sls
+3
-0
salt/manager/virtualenv.sls
+3
-0
salt/monitor-client/virtualenv.sls
+4
-0
salt/storagedriver/init.sls
+2
-0
salt/storagedriver/virtualenv.sls
+5
-0
salt/vmdriver/init.sls
+4
-0
salt/vmdriver/libvirt.sls
+55
-8
salt/vmdriver/virtualenv.sls
+5
-1
salt/vncproxy/virtualenv.sls
+4
-0
No files found.
pillar/firewall.sls
View file @
8df6aa33
fwdriver:
fwdriver:
repo_name: https://git.ik.bme.hu/circle/fwdriver.git
repo_name: https://git.ik.bme.hu/circle/fwdriver.git
repo_revision:
master
repo_revision:
ubuntu1604
user: fw
user: fw
...
...
pillar/installer.sls
View file @
8df6aa33
#
user: cloud
user: cloud
#
proxy_secret: xooquageire7uX1
proxy_secret: xooquageire7uX1
#
secret_key: Ga4aex3Eesohngo
secret_key: Ga4aex3Eesohngo
#
timezone: Europe/Budapest
timezone: Europe/Budapest
#deployment_type: local
deployment_type: production
#
admin_user: admin
admin_user: admin
#admin_pass: 4j23oihreehfd
admin_pass: admin
#
database:
database:
#
name: circle
name: circle
#
user: circle
user: circle
#
password: hoGei6paiN0ieda
password: hoGei6paiN0ieda
#
amqp:
amqp:
#
user: cloud
user: cloud
#
password: password
password: password
#
host: 127.0.0.1
host: 127.0.0.1
#
port: 5672
port: 5672
#
vhost: circle
vhost: circle
#
graphite:
graphite:
#
user: monitor
user: monitor
#
password: monitor
password: monitor
#
host: 127.0.0.1
host: 127.0.0.1
#
port: 5672
port: 5672
#
vhost: monitor
vhost: monitor
#
queue: monitor
queue: monitor
#
secret_key: ahf2aim7ahLeo8n
secret_key: ahf2aim7ahLeo8n
#
cache: pylibmc://127.0.0.1:11211/
cache: pylibmc://127.0.0.1:11211/
#
nfs:
nfs:
#
enabled: true
enabled: true
# server: 10.0.0.115
server: 127.0.0.1
# network: 192.168.1.0/24
network: 127.0.0.0/8
#
directory: /datastore
directory: /datastore
#
storagedriver:
storagedriver:
# queue_name: cloud-6605
queue_name: ubuntu
#
fwdriver:
fwdriver:
# queue_name: cloud-6605
queue_name: ubuntu
# gateway: 10.0
.255.254
gateway: 10.9
.255.254
# external_net: 10.0.0.115
/16
external_net: 10.9.0.64
/16
# external_if: eth0
external_if: ens3
#
trunk_if: linkb
trunk_if: linkb
#
management_if: ethy
management_if: ethy
salt/agentdriver/virtualenv.sls
View file @
8df6aa33
...
@@ -4,3 +4,7 @@ virtualenv_agentdriver:
...
@@ -4,3 +4,7 @@ virtualenv_agentdriver:
- requirements: /home/{{ pillar['user'] }}/agentdriver/requirements.txt
- requirements: /home/{{ pillar['user'] }}/agentdriver/requirements.txt
- user: {{ pillar['user'] }}
- user: {{ pillar['user'] }}
- no_chown: true
- no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
salt/common.sls
View file @
8df6aa33
git:
git:
pkg.installed
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
salt/fwdriver/virtualenv.sls
View file @
8df6aa33
...
@@ -4,3 +4,7 @@ virtualenv_fwdriver:
...
@@ -4,3 +4,7 @@ virtualenv_fwdriver:
- requirements: /home/{{ pillar['fwdriver']['user'] }}/fwdriver/requirements/production.txt
- requirements: /home/{{ pillar['fwdriver']['user'] }}/fwdriver/requirements/production.txt
- user: {{ pillar['fwdriver']['user'] }}
- user: {{ pillar['fwdriver']['user'] }}
- no_chown: true
- no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
salt/graphite/virtualenv.sls
View file @
8df6aa33
...
@@ -12,6 +12,9 @@ virtualenv_graphite:
...
@@ -12,6 +12,9 @@ virtualenv_graphite:
- user: {{ pillar['graphite']['user'] }}
- user: {{ pillar['graphite']['user'] }}
- file: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- file: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- file: /opt/graphite
- file: /opt/graphite
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- file: ubuntu_virtualenvwrapper
{% endif %}
global-site-packages:
global-site-packages:
file.absent:
file.absent:
...
...
salt/manager/virtualenv.sls
View file @
8df6aa33
...
@@ -24,6 +24,9 @@ virtualenv_manager:
...
@@ -24,6 +24,9 @@ virtualenv_manager:
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
- environ: m2crypto_swig_env
- environ: m2crypto_swig_env
{% endif %}
{% endif %}
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- file: ubuntu_virtualenvwrapper
{% endif %}
salt://manager/files/syncdb.sh:
salt://manager/files/syncdb.sh:
cmd.script:
cmd.script:
...
...
salt/monitor-client/virtualenv.sls
View file @
8df6aa33
...
@@ -4,3 +4,7 @@ virtualenv_monitor-client:
...
@@ -4,3 +4,7 @@ virtualenv_monitor-client:
- requirements: /home/{{ pillar['user'] }}/monitor-client/requirements.txt
- requirements: /home/{{ pillar['user'] }}/monitor-client/requirements.txt
- user: {{ pillar['user'] }}
- user: {{ pillar['user'] }}
- no_chown: true
- no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
salt/storagedriver/init.sls
View file @
8df6aa33
...
@@ -31,6 +31,8 @@ storage:
...
@@ -31,6 +31,8 @@ storage:
service:
service:
- running
- running
- enable: True
- enable: True
- require:
- virtualenv: virtualenv_storagedriver
- watch:
- watch:
- pkg: storagedriver
- pkg: storagedriver
- sls: storagedriver.gitrepo
- sls: storagedriver.gitrepo
...
...
salt/storagedriver/virtualenv.sls
View file @
8df6aa33
...
@@ -4,3 +4,8 @@ virtualenv_storagedriver:
...
@@ -4,3 +4,8 @@ virtualenv_storagedriver:
- requirements: /home/{{ pillar['user'] }}/storagedriver/requirements/production.txt
- requirements: /home/{{ pillar['user'] }}/storagedriver/requirements/production.txt
- user: {{ pillar['user'] }}
- user: {{ pillar['user'] }}
- no_chown: true
- no_chown: true
- require:
- pkg: storagedriver
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- file: ubuntu_virtualenvwrapper
{% endif %}
salt/vmdriver/init.sls
View file @
8df6aa33
...
@@ -50,8 +50,12 @@ vmdriver:
...
@@ -50,8 +50,12 @@ vmdriver:
- file: /etc/apparmor.d/libvirt/TEMPLATE
- file: /etc/apparmor.d/libvirt/TEMPLATE
- file: /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
- file: /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
- file: /var/lib/libvirt/serial
- file: /var/lib/libvirt/serial
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
- service: libvirtd
{% else %}
- service: libvirt-bin
- service: libvirt-bin
{% endif %}
{% endif %}
{% endif %}
- augeas: libvirtconf
- augeas: libvirtconf
- git: gitrepo_vmdriver
- git: gitrepo_vmdriver
- virtualenv: virtualenv_vmdriver
- virtualenv: virtualenv_vmdriver
...
...
salt/vmdriver/libvirt.sls
View file @
8df6aa33
...
@@ -13,9 +13,35 @@ libvirtconf:
...
@@ -13,9 +13,35 @@ libvirtconf:
/etc/default/libvirt-bin:
/etc/default/libvirt-bin:
file.append:
file.append:
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
- text: libvirtd_opts="-l"
{% else %}
- text: libvirtd_opts="-d -l"
- 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:
libvirtd:
{% else %}
{% else %}
libvirt-bin:
libvirt-bin:
...
@@ -25,6 +51,10 @@ libvirt-bin:
...
@@ -25,6 +51,10 @@ libvirt-bin:
- watch:
- watch:
- file: /etc/default/libvirt-bin
- file: /etc/default/libvirt-bin
- augeas: libvirtconf
- augeas: libvirtconf
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
- require:
- user: user_in_libvirtd_group
{% endif %}
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
/usr/bin/kvm:
/usr/bin/kvm:
...
@@ -67,13 +97,6 @@ vmdriver_semodule:
...
@@ -67,13 +97,6 @@ vmdriver_semodule:
{% elif grains['os'] == 'Debian' %}
{% elif grains['os'] == 'Debian' %}
/usr/bin/kvm:
file.replace:
- pattern: -enable-kvm
- repl: ""
- watch:
- pkg: vmdriver
policycoreutils:
policycoreutils:
pkg.installed
pkg.installed
...
@@ -114,6 +137,15 @@ apparmor:
...
@@ -114,6 +137,15 @@ apparmor:
- file: /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
- file: /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
{% endif %}
{% 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:
/var/lib/libvirt/serial:
file.directory:
file.directory:
- makedirs: True
- makedirs: True
...
@@ -124,3 +156,18 @@ apparmor:
...
@@ -124,3 +156,18 @@ apparmor:
{% endif %}
{% endif %}
- group: kvm
- group: kvm
- mode: 755
- 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 %}
salt/vmdriver/virtualenv.sls
View file @
8df6aa33
...
@@ -4,12 +4,16 @@ virtualenv_vmdriver:
...
@@ -4,12 +4,16 @@ virtualenv_vmdriver:
- requirements: /home/{{ pillar['user'] }}/vmdriver/requirements/production.txt
- requirements: /home/{{ pillar['user'] }}/vmdriver/requirements/production.txt
- user: {{ pillar['user'] }}
- user: {{ pillar['user'] }}
- no_chown: true
- 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 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',
{% set targets = { 'libvirtmod_qemu.so': 'libvirtmod_qemu.x86_64-linux-gnu.so',
'libvirtmod.so': 'libvirtmod.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") %}
{% 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 }}:
/home/{{ pillar['user'] }}/.virtualenvs/vmdriver/lib/python2.7/site-packages/{{ file }}:
...
...
salt/vncproxy/virtualenv.sls
View file @
8df6aa33
...
@@ -4,3 +4,7 @@ virtualenv_vncproxy:
...
@@ -4,3 +4,7 @@ virtualenv_vncproxy:
- requirements: /home/{{ pillar['user'] }}/vncproxy/requirements/production.txt
- requirements: /home/{{ pillar['user'] }}/vncproxy/requirements/production.txt
- user: {{ pillar['user'] }}
- user: {{ pillar['user'] }}
- no_chown: true
- no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
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