Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
salt
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e56a6953
authored
Jan 15, 2022
by
Szeberényi Imre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First try
parent
ae1e9385
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
73 additions
and
73 deletions
+73
-73
pillar/agentdriver.sls
+2
-2
pillar/common.sls
+1
-0
pillar/firewall.sls
+1
-1
pillar/installer.sls
+1
-0
pillar/manager.sls
+1
-1
pillar/monitor-client.sls
+2
-2
pillar/storagedriver.sls
+2
-2
pillar/vmdriver.sls
+2
-2
pillar/vncproxy.sls
+2
-2
requirements.txt
+6
-4
salt/common.sls
+4
-0
salt/manager/configuration.sls
+6
-4
salt/manager/files/init.sh
+2
-2
salt/manager/init.sls
+7
-20
salt/manager/pipeline.sls
+2
-2
salt/manager/rabbitmq.sls
+11
-9
salt/manager/virtualenv.sls
+6
-0
salt/node.sls
+0
-1
salt/profile.sls
+3
-9
salt/vncproxy/configuration.sls
+3
-3
salt/vncproxy/init.sls
+6
-6
salt/vncproxy/virtualenv.sls
+3
-1
No files found.
pillar/agentdriver.sls
View file @
e56a6953
agentdriver:
agentdriver:
repo_name: https://git.ik.bme.hu/circle/agentdriver.git
repo_name: https://git.ik.bme.hu/circle
3
/agentdriver.git
repo_revision:
master
repo_revision:
python3.6
pillar/common.sls
View file @
e56a6953
...
@@ -5,6 +5,7 @@ secret_key: Ga4aex3Eesohngo
...
@@ -5,6 +5,7 @@ secret_key: Ga4aex3Eesohngo
timezone: Europe/Budapest
timezone: Europe/Budapest
deployment_type: local
deployment_type: local
init_type: systemd
admin_user: admin
admin_user: admin
admin_pass: 4j23oihreehfd
admin_pass: 4j23oihreehfd
...
...
pillar/firewall.sls
View file @
e56a6953
fwdriver:
fwdriver:
repo_name: https://git.ik.bme.hu/circle/fwdriver.git
repo_name: https://git.ik.bme.hu/circle
3
/fwdriver.git
repo_revision: master
repo_revision: master
user: fw
user: fw
...
...
pillar/installer.sls
View file @
e56a6953
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#timezone: Europe/Budapest
#timezone: Europe/Budapest
#deployment_type: local
#deployment_type: local
#init_type: systemd
#admin_user: admin
#admin_user: admin
#admin_pass: 4j23oihreehfd
#admin_pass: 4j23oihreehfd
...
...
pillar/manager.sls
View file @
e56a6953
manager:
manager:
repo_name: https://git.ik.bme.hu/circle/cloud.git
repo_name: https://git.ik.bme.hu/circle
3
/cloud.git
repo_revision: master
repo_revision: master
pillar/monitor-client.sls
View file @
e56a6953
monitor-client:
monitor-client:
repo_name: https://git.ik.bme.hu/circle/monitor-client.git
repo_name: https://git.ik.bme.hu/circle
3
/monitor-client.git
repo_revision:
master
repo_revision:
ptyhon3.6
pillar/storagedriver.sls
View file @
e56a6953
storagedriver:
storagedriver:
repo_name: https://git.ik.bme.hu/circle/storagedriver.git
repo_name: https://git.ik.bme.hu/circle
3
/storagedriver.git
repo_revision:
master
repo_revision:
python3.6
queue_name: storageserver
queue_name: storageserver
pillar/vmdriver.sls
View file @
e56a6953
vmdriver:
vmdriver:
repo_name: https://git.ik.bme.hu/circle/vmdriver.git
repo_name: https://git.ik.bme.hu/circle
3
/vmdriver.git
repo_revision:
master
repo_revision:
python3.6
hypervisor_type: kvm
hypervisor_type: kvm
pillar/vncproxy.sls
View file @
e56a6953
vncproxy:
vncproxy:
repo_name: https://git.ik.bme.hu/circle/vncproxy.git
repo_name: https://git.ik.bme.hu/circle
3
/vncproxy.git
repo_revision:
master
repo_revision:
python3.6
requirements.txt
View file @
e56a6953
salt
==2014.7.1
salt
==3003
netaddr
==0.7.14
netaddr
netifaces
==0.10.6
netifaces
halo
==0.0.7
halo
virtualenvwrapper
stevedore
salt/common.sls
View file @
e56a6953
include:
- profile
git:
git:
pkg.installed
pkg.installed
salt/manager/configuration.sls
View file @
e56a6953
...
@@ -5,10 +5,13 @@ manager_postactivate:
...
@@ -5,10 +5,13 @@ manager_postactivate:
- template: jinja
- template: jinja
- user: {{ pillar['user'] }}
- user: {{ pillar['user'] }}
- mode: 700
- mode: 700
- require:
- virtualenv: virtualenv_manager
portal.conf:
portal.conf:
file.managed:
file.managed:
{% if
grains['os_family'] == 'RedHat' or grains['os'] == 'Debian
' %}
{% if
pillar['init_type'] == 'systemd
' %}
- name: /etc/systemd/system/portal.service
- name: /etc/systemd/system/portal.service
{% else %}
{% else %}
- name: /etc/init/portal.conf
- name: /etc/init/portal.conf
...
@@ -16,8 +19,7 @@ portal.conf:
...
@@ -16,8 +19,7 @@ portal.conf:
- user: root
- user: root
- group: root
- group: root
- template: jinja
- template: jinja
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if pillar['init_type'] == 'systemd' %}
{% 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 %}
...
@@ -34,7 +36,7 @@ portal.conf:
...
@@ -34,7 +36,7 @@ portal.conf:
{% endif %}
{% endif %}
{% if
grains['os_family'] == 'RedHat' or grains['os'] == 'Debian
' %}
{% if
pillar['init_type'] == 'systemd
' %}
/etc/systemd/system/manager.service:
/etc/systemd/system/manager.service:
file.managed:
file.managed:
- user: root
- user: root
...
...
salt/manager/files/init.sh
View file @
e56a6953
#!/bin/bash
#!/bin/bash
source
/
home/
{{
pillar[
'user'
]
}}
/.virtualenvs/circle/bin/activate
source
/
etc/profile.d/virtualenvwrapper.sh
source
/home/
{{
pillar[
'user'
]
}}
/.virtualenvs/circle/bin/postactivat
e
workon circl
e
{
%
set
fw
=
pillar[
'fwdriver'
]
%
}
{
%
set
fw
=
pillar[
'fwdriver'
]
%
}
HOSTNAME
=
$(
hostname
-s
)
HOSTNAME
=
$(
hostname
-s
)
...
...
salt/manager/init.sls
View file @
e56a6953
include:
include:
- manager.pipeline
#
- manager.pipeline
- manager.gitrepo
- manager.gitrepo
- manager.agentgit
#
- manager.agentgit
- manager.postgres
- manager.postgres
- manager.rabbitmq
- manager.rabbitmq
- manager.virtualenv
- manager.virtualenv
...
@@ -13,14 +13,13 @@ manager:
...
@@ -13,14 +13,13 @@ manager:
- pkgs:
- pkgs:
- postgresql
- postgresql
- git
- git
-
ntp
-
chrony
- rabbitmq-server
- rabbitmq-server
- memcached
- memcached
- gettext
- gettext
- wget
- wget
- swig
- swig
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
- python2-pip
- libffi-devel
- libffi-devel
- openssl-devel
- openssl-devel
- libmemcached-devel
- libmemcached-devel
...
@@ -29,25 +28,22 @@ manager:
...
@@ -29,25 +28,22 @@ manager:
- postgresql-server
- postgresql-server
- libxml2-devel
- libxml2-devel
- libxslt-devel
- libxslt-devel
- python-devel
- python3-devel
- python-virtualenvwrapper
{% else %}
{% else %}
- python-pip
- libffi-dev
- libffi-dev
- libssl-dev
- libssl-dev
- libmemcached-dev
- libmemcached-dev
- libpq-dev
- libpq-dev
- libxml2-dev
- libxml2-dev
- libxslt1-dev
- libxslt1-dev
- python-dev
- python3-dev
- virtualenvwrapper
{% endif %}
{% endif %}
- require_in:
- require_in:
- service: postgres_service
- service: postgres_service
user:
user:
- present
- present
- name: {{ pillar['user'] }}
- name: {{ pillar['user'] }}
-
gid_from_name
: True
-
usergroup
: True
- shell: /bin/bash
- shell: /bin/bash
- groups:
- groups:
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
...
@@ -56,21 +52,12 @@ manager:
...
@@ -56,21 +52,12 @@ manager:
- sudo
- sudo
{% endif %}
{% endif %}
service:
service:
- running
- running
- enable: True
- enable: True
- watch:
- watch:
- file: manager_postactivate
- file: manager_postactivate
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
- sls: manager.configuration
- file: /etc/systemd/system/manager.service
- file: /etc/systemd/system/managercelery@.service
{% else %}
- file: /etc/init/manager.conf
- file: /etc/init/mancelery.conf
- file: /etc/init/moncelery.conf
- file: /etc/init/slowcelery.conf
{% endif %}
- sls: manager.gitrepo
- sls: manager.gitrepo
portal:
portal:
...
...
salt/manager/pipeline.sls
View file @
e56a6953
{% if grains['os'] == 'Ubuntu' or grains['os'] == 'Debian' %}
{% if grains['os'] == 'Ubuntu' or grains['os
_family
'] == 'Debian' %}
nodejs-legacy:
nodejs-legacy:
pkg.installed
pkg.installed
{% endif %}
{% endif %}
npm:
npm:
{% if grains['os'] == 'Ubuntu' or grains['os'] == 'Debian' %}
{% if grains['os'] == 'Ubuntu' or grains['os
_family
'] == 'Debian' %}
pkg.installed:
pkg.installed:
- require:
- require:
- pkg: nodejs-legacy
- pkg: nodejs-legacy
...
...
salt/manager/rabbitmq.sls
View file @
e56a6953
...
@@ -14,19 +14,21 @@ rabbitmq-server:
...
@@ -14,19 +14,21 @@ rabbitmq-server:
- file: rabbitmq-server
- file: rabbitmq-server
{% endif %}
{% endif %}
virtual_host:
rabbitmq_vhost.present:
- name: {{ pillar['amqp']['vhost']}}
- require:
- service: rabbitmq-server
rabbitmq_user:
rabbitmq_user:
rabbitmq_user.present:
rabbitmq_user.present:
- name: {{ pillar['amqp']['user'] }}
- name: {{ pillar['amqp']['user'] }}
- password: {{ pillar['amqp']['password'] }}
- password: {{ pillar['amqp']['password'] }}
- perms: [{ {{ pillar['amqp']['vhost']}}: [.*, .*, .*]}]
# - '{{ pillar['amqp']['vhost']}}':
# - conf: ".*"
# - write: " .*"
# - read: ".*"
- require:
- require:
- service: rabbitmq-server
- service: rabbitmq-server
virtual_host:
rabbitmq_vhost.present:
- name: {{ pillar['amqp']['vhost']}}
- user: {{ pillar['amqp']['user'] }}
- conf: .*
- write: .*
- read: .*
- require:
- service: rabbitmq-server
salt/manager/virtualenv.sls
View file @
e56a6953
...
@@ -15,6 +15,7 @@ m2crypto_swig_env:
...
@@ -15,6 +15,7 @@ m2crypto_swig_env:
virtualenv_manager:
virtualenv_manager:
virtualenv.managed:
virtualenv.managed:
- python: /usr/bin/python3
- name: /home/{{ pillar['user'] }}/.virtualenvs/circle
- name: /home/{{ pillar['user'] }}/.virtualenvs/circle
- requirements: /home/{{ pillar['user'] }}/circle/requirements/{{ pillar['deployment_type'] }}.txt
- requirements: /home/{{ pillar['user'] }}/circle/requirements/{{ pillar['deployment_type'] }}.txt
- user: {{ pillar['user'] }}
- user: {{ pillar['user'] }}
...
@@ -26,6 +27,11 @@ virtualenv_manager:
...
@@ -26,6 +27,11 @@ virtualenv_manager:
- environ: m2crypto_swig_env
- environ: m2crypto_swig_env
{% endif %}
{% endif %}
/home/{{ pillar['user'] }}/.virtualenvs/circle/lib/python3.6/site-packages/simplesshkey/models.py:
file.patch:
- source: file:///home/{{ pillar['user'] }}/circle/requirements/simplesshkey.patch
- strip: 5
salt://manager/files/syncdb.sh:
salt://manager/files/syncdb.sh:
cmd.script:
cmd.script:
- template: jinja
- template: jinja
...
...
salt/node.sls
View file @
e56a6953
include:
include:
- profile
- agentdriver
- agentdriver
- monitor-client
- monitor-client
- vmdriver
- vmdriver
...
...
salt/profile.sls
View file @
e56a6953
{% if grains['os']=='Debian' %}
/etc/profile.d/virtualenvwrapper.sh:
{# For non-interactive shells, virtualenvwrapper commands
file.symlink:
('workon' etc.) are not sourced automatically #}
- target: /usr/local/bin/virtualenvwrapper.sh
/etc/profile:
file.append:
- text:
- "#Line below added for Debian by CIRCLE Salt installer"
- . /etc/bash_completion
{% endif %}
salt/vncproxy/configuration.sls
View file @
e56a6953
...
@@ -6,16 +6,14 @@
...
@@ -6,16 +6,14 @@
- group: {{ pillar['user'] }}
- group: {{ pillar['user'] }}
- mode: 700
- mode: 700
{% if
grains['os_family'] == 'RedHat' or grains['os'] == 'Debian
' %}
{% if
pillar['init_type'] == 'systemd
' %}
/etc/systemd/system/vncproxy.service:
/etc/systemd/system/vncproxy.service:
file.managed:
file.managed:
- user: root
- user: root
- group: root
- group: root
- template: jinja
- template: jinja
- source: file:///home/{{ pillar['user'] }}/vncproxy/miscellaneous/vncproxy.service
- source: file:///home/{{ pillar['user'] }}/vncproxy/miscellaneous/vncproxy.service
{% else %}
{% else %}
/etc/init/vncproxy.conf:
/etc/init/vncproxy.conf:
file.managed:
file.managed:
- user: root
- user: root
...
@@ -23,3 +21,5 @@
...
@@ -23,3 +21,5 @@
- template: jinja
- template: jinja
- source: file:///home/{{ pillar['user'] }}/vncproxy/miscellaneous/vncproxy.conf
- source: file:///home/{{ pillar['user'] }}/vncproxy/miscellaneous/vncproxy.conf
{% endif %}
{% endif %}
salt/vncproxy/init.sls
View file @
e56a6953
...
@@ -7,19 +7,19 @@ vncproxy:
...
@@ -7,19 +7,19 @@ vncproxy:
pkg.installed:
pkg.installed:
- pkgs:
- pkgs:
- git
- git
-
ntp
-
chrony
- wget
- wget
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
- python
2
-pip
- python
3
-pip
- libffi-devel
- libffi-devel
- openssl-devel
- openssl-devel
- python-devel
- python
3
-devel
- python-virtualenvwrapper
- python
3
-virtualenvwrapper
{% else %}
{% else %}
- python-pip
- python
3
-pip
- libffi-dev
- libffi-dev
- libssl-dev
- libssl-dev
- python-dev
- python
3
-dev
- virtualenvwrapper
- virtualenvwrapper
{% endif %}
{% endif %}
- require_in:
- require_in:
...
...
salt/vncproxy/virtualenv.sls
View file @
e56a6953
virtualenv_vncproxy:
virtualenv_vncproxy:
virtualenv.managed:
virtualenv.managed:
- python: /usr/bin/python3
- name: /home/{{ pillar['user'] }}/.virtualenvs/vncproxy
- name: /home/{{ pillar['user'] }}/.virtualenvs/vncproxy
- requirements: /home/{{ pillar['user'] }}/vncproxy/requirements.txt
- requirements: /home/{{ pillar['user'] }}/vncproxy/requirements/{{ pillar['deployment_type'] }}.txt
- cwd: /home/{{ pillar['user'] }}/vncproxy
- user: {{ pillar['user'] }}
- user: {{ pillar['user'] }}
- no_chown: true
- no_chown: true
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