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
Show 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:
repo_name: https://git.ik.bme.hu/circle/fwdriver.git
repo_revision:
master
repo_revision:
ubuntu1604
user: fw
...
...
pillar/installer.sls
View file @
8df6aa33
#
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
salt/agentdriver/virtualenv.sls
View file @
8df6aa33
...
...
@@ -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 %}
salt/common.sls
View file @
8df6aa33
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
salt/fwdriver/virtualenv.sls
View file @
8df6aa33
...
...
@@ -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 %}
salt/graphite/virtualenv.sls
View file @
8df6aa33
...
...
@@ -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:
...
...
salt/manager/virtualenv.sls
View file @
8df6aa33
...
...
@@ -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:
...
...
salt/monitor-client/virtualenv.sls
View file @
8df6aa33
...
...
@@ -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 %}
salt/storagedriver/init.sls
View file @
8df6aa33
...
...
@@ -31,6 +31,8 @@ storage:
service:
- running
- enable: True
- require:
- virtualenv: virtualenv_storagedriver
- watch:
- pkg: storagedriver
- sls: storagedriver.gitrepo
...
...
salt/storagedriver/virtualenv.sls
View file @
8df6aa33
...
...
@@ -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 %}
salt/vmdriver/init.sls
View file @
8df6aa33
...
...
@@ -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
...
...
salt/vmdriver/libvirt.sls
View file @
8df6aa33
...
...
@@ -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 %}
salt/vmdriver/virtualenv.sls
View file @
8df6aa33
...
...
@@ -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 }}:
...
...
salt/vncproxy/virtualenv.sls
View file @
8df6aa33
...
...
@@ -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 %}
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