Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
salt
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
17
Merge Requests
1
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6f9c3e6a
authored
Jul 31, 2015
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add openvswitch standalone module; prettify some sls files
parent
8b56dbe7
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
35 additions
and
46 deletions
+35
-46
salt/fwdriver/configuration.sls
+3
-19
salt/fwdriver/init.sls
+0
-0
salt/manager/configuration.sls
+4
-0
salt/manager/nginx.sls
+3
-3
salt/manager/pipeline.sls
+3
-3
salt/manager/postgres.sls
+0
-1
salt/network/init.sls
+0
-0
salt/nfs-client/init.sls
+0
-0
salt/openvswitch/files/openvswitch-2.3.1-1.x86_64.rpm
+0
-0
salt/openvswitch/init.sls
+19
-0
salt/storagedriver/nfs-server.sls
+0
-0
salt/vmdriver/configuration.sls
+3
-20
No files found.
salt/fwdriver/configuration.sls
View file @
6f9c3e6a
include:
- openvswitch
/home/{{ pillar['fwdriver']['user'] }}/.virtualenvs/fw/bin/postactivate:
/home/{{ pillar['fwdriver']['user'] }}/.virtualenvs/fw/bin/postactivate:
file.managed:
file.managed:
- source: salt://fwdriver/files/postactivate
- source: salt://fwdriver/files/postactivate
...
@@ -80,25 +83,6 @@ systemd-sysctl:
...
@@ -80,25 +83,6 @@ systemd-sysctl:
service.running:
service.running:
- reload: True
- reload: True
{# TODO: standalone module for openvswitch #}
openvswitch2:
pkg.installed:
- sources:
- openvswitch: salt://vmdriver/files/openvswitch-2.3.1-1.x86_64.rpm
cmd.run:
- name: mkdir /etc/openvswitch; restorecon -R /etc/openvswitch/
- creates: /etc/openvswitch
- require:
- pkg: openvswitch
service:
- name: openvswitch
- running
- enable: True
- require:
- cmd: openvswitch
- required_in:
- cmd: ovs-bridge
/root/firewall-init.te:
/root/firewall-init.te:
file.managed:
file.managed:
- source: salt://fwdriver/files/firewall-init.te
- source: salt://fwdriver/files/firewall-init.te
...
...
salt/fwdriver/init.sls
View file @
6f9c3e6a
salt/manager/configuration.sls
View file @
6f9c3e6a
...
@@ -17,17 +17,21 @@ portal.conf:
...
@@ -17,17 +17,21 @@ portal.conf:
- group: root
- group: root
- template: jinja
- template: jinja
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
{% if pillar['deployment_type'] == 'production' %}
{% if pillar['deployment_type'] == 'production' %}
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal-uwsgi.service
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal-uwsgi.service
{% else %}
{% else %}
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal.service
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal.service
{% endif %}
{% endif %}
{% else %}
{% else %}
{% if pillar['deployment_type'] == 'production' %}
{% if pillar['deployment_type'] == 'production' %}
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal-uwsgi.conf
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal-uwsgi.conf
{% else %}
{% else %}
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal.conf
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal.conf
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
...
...
salt/manager/nginx.sls
View file @
6f9c3e6a
...
@@ -13,11 +13,11 @@ nginx:
...
@@ -13,11 +13,11 @@ nginx:
circlecert:
circlecert:
cmd.run:
cmd.run:
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
- name: ./make-dummy-cert circle.pem
- name: ./make-dummy-cert circle.pem
{% else %}
{% else %}
- name: openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout circle.key -out circle.crt -subj '/CN=localhost/O=My Company Name LTD./C=US' && cat circle.key circle.crt > circle.pem && rm circle.key circle.crt; chmod 600 circle.pem
- name: openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout circle.key -out circle.crt -subj '/CN=localhost/O=My Company Name LTD./C=US' && cat circle.key circle.crt > circle.pem && rm circle.key circle.crt; chmod 600 circle.pem
{% endif %}
{% endif %}
- cwd: /etc/ssl/certs/
- cwd: /etc/ssl/certs/
- creates: /etc/ssl/certs/circle.pem
- creates: /etc/ssl/certs/circle.pem
...
...
salt/manager/pipeline.sls
View file @
6f9c3e6a
...
@@ -4,13 +4,13 @@ nodejs-legacy:
...
@@ -4,13 +4,13 @@ nodejs-legacy:
{% endif %}
{% endif %}
npm:
npm:
{% if grains['os'] == 'Ubuntu' %}
{% if grains['os'] == 'Ubuntu' %}
pkg.installed:
pkg.installed:
- require:
- require:
- pkg: nodejs-legacy
- pkg: nodejs-legacy
{% else %}
{% else %}
pkg.installed
pkg.installed
{% endif %}
{% endif %}
bower:
bower:
npm.installed:
npm.installed:
...
...
salt/manager/postgres.sls
View file @
6f9c3e6a
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
postgresql-server:
postgresql-server:
pkg.installed
pkg.installed
...
...
salt/network/init.sls
View file @
6f9c3e6a
salt/nfs-client/init.sls
View file @
6f9c3e6a
salt/
vmdriver
/files/openvswitch-2.3.1-1.x86_64.rpm
→
salt/
openvswitch
/files/openvswitch-2.3.1-1.x86_64.rpm
View file @
6f9c3e6a
File moved
salt/openvswitch/init.sls
0 → 100644
View file @
6f9c3e6a
{% if grains['os_family'] == "RedHat" %}
openvswitch:
pkg.installed:
- sources:
- openvswitch: salt://openvswitch/files/openvswitch-2.3.1-1.x86_64.rpm
cmd.run:
- name: mkdir /etc/openvswitch; restorecon -R /etc/openvswitch/
- creates: /etc/openvswitch
- require:
- pkg: openvswitch
service:
- name: openvswitch
- running
- enable: True
- require:
- cmd: openvswitch
- required_in:
- cmd: ovs-bridge
{% endif %}
salt/storagedriver/nfs-server.sls
View file @
6f9c3e6a
salt/vmdriver/configuration.sls
View file @
6f9c3e6a
include:
- openvswitch
/home/{{ pillar['user'] }}/.virtualenvs/vmdriver/bin/postactivate:
/home/{{ pillar['user'] }}/.virtualenvs/vmdriver/bin/postactivate:
file.managed:
file.managed:
- source: salt://vmdriver/files/postactivate
- source: salt://vmdriver/files/postactivate
...
@@ -20,26 +23,6 @@
...
@@ -20,26 +23,6 @@
- source: file:///home/{{ pillar['user'] }}/vmdriver/miscellaneous/{{ file }}
- source: file:///home/{{ pillar['user'] }}/vmdriver/miscellaneous/{{ file }}
{% endfor %}
{% endfor %}
{# TODO: standalone module for openvswitch #}
{% if grains['os_family'] == 'RedHat' %}
openvswitch:
pkg.installed:
- sources:
- openvswitch: salt://vmdriver/files/openvswitch-2.3.1-1.x86_64.rpm
cmd.run:
- name: mkdir /etc/openvswitch; restorecon -R /etc/openvswitch/
- creates: /etc/openvswitch
- require:
- pkg: openvswitch
service:
- running
- enable: True
- require:
- cmd: openvswitch
- required_in:
- cmd: ovs-bridge
{% endif %}
ovs-bridge:
ovs-bridge:
cmd.run:
cmd.run:
- name: ovs-vsctl add-br cloud
- name: ovs-vsctl add-br cloud
...
...
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