Commit e56a6953 by Szeberényi Imre

First try

parent ae1e9385
agentdriver:
repo_name: https://git.ik.bme.hu/circle/agentdriver.git
repo_revision: master
repo_name: https://git.ik.bme.hu/circle3/agentdriver.git
repo_revision: python3.6
......@@ -5,6 +5,7 @@ secret_key: Ga4aex3Eesohngo
timezone: Europe/Budapest
deployment_type: local
init_type: systemd
admin_user: admin
admin_pass: 4j23oihreehfd
......
fwdriver:
repo_name: https://git.ik.bme.hu/circle/fwdriver.git
repo_name: https://git.ik.bme.hu/circle3/fwdriver.git
repo_revision: master
user: fw
......
......@@ -5,6 +5,7 @@
#timezone: Europe/Budapest
#deployment_type: local
#init_type: systemd
#admin_user: admin
#admin_pass: 4j23oihreehfd
......
manager:
repo_name: https://git.ik.bme.hu/circle/cloud.git
repo_name: https://git.ik.bme.hu/circle3/cloud.git
repo_revision: master
monitor-client:
repo_name: https://git.ik.bme.hu/circle/monitor-client.git
repo_revision: master
repo_name: https://git.ik.bme.hu/circle3/monitor-client.git
repo_revision: ptyhon3.6
storagedriver:
repo_name: https://git.ik.bme.hu/circle/storagedriver.git
repo_revision: master
repo_name: https://git.ik.bme.hu/circle3/storagedriver.git
repo_revision: python3.6
queue_name: storageserver
vmdriver:
repo_name: https://git.ik.bme.hu/circle/vmdriver.git
repo_revision: master
repo_name: https://git.ik.bme.hu/circle3/vmdriver.git
repo_revision: python3.6
hypervisor_type: kvm
vncproxy:
repo_name: https://git.ik.bme.hu/circle/vncproxy.git
repo_revision: master
repo_name: https://git.ik.bme.hu/circle3/vncproxy.git
repo_revision: python3.6
include:
- profile
git:
pkg.installed
......@@ -5,10 +5,13 @@ manager_postactivate:
- template: jinja
- user: {{ pillar['user'] }}
- mode: 700
- require:
- virtualenv: virtualenv_manager
portal.conf:
file.managed:
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if pillar['init_type'] == 'systemd' %}
- name: /etc/systemd/system/portal.service
{% else %}
- name: /etc/init/portal.conf
......@@ -16,8 +19,7 @@ portal.conf:
- user: root
- group: root
- template: jinja
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if pillar['init_type'] == 'systemd' %}
{% if pillar['deployment_type'] == 'production' %}
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal-uwsgi.service
{% else %}
......@@ -34,7 +36,7 @@ portal.conf:
{% endif %}
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if pillar['init_type'] == 'systemd' %}
/etc/systemd/system/manager.service:
file.managed:
- user: root
......
#!/bin/bash
source /home/{{ pillar['user'] }}/.virtualenvs/circle/bin/activate
source /home/{{ pillar['user'] }}/.virtualenvs/circle/bin/postactivate
source /etc/profile.d/virtualenvwrapper.sh
workon circle
{% set fw = pillar['fwdriver'] %}
HOSTNAME=$(hostname -s)
......
include:
- manager.pipeline
# - manager.pipeline
- manager.gitrepo
- manager.agentgit
# - manager.agentgit
- manager.postgres
- manager.rabbitmq
- manager.virtualenv
......@@ -13,14 +13,13 @@ manager:
- pkgs:
- postgresql
- git
- ntp
- chrony
- rabbitmq-server
- memcached
- gettext
- wget
- swig
{% if grains['os_family'] == 'RedHat' %}
- python2-pip
- libffi-devel
- openssl-devel
- libmemcached-devel
......@@ -29,25 +28,22 @@ manager:
- postgresql-server
- libxml2-devel
- libxslt-devel
- python-devel
- python-virtualenvwrapper
- python3-devel
{% else %}
- python-pip
- libffi-dev
- libssl-dev
- libmemcached-dev
- libpq-dev
- libxml2-dev
- libxslt1-dev
- python-dev
- virtualenvwrapper
- python3-dev
{% endif %}
- require_in:
- service: postgres_service
user:
- present
- name: {{ pillar['user'] }}
- gid_from_name: True
- usergroup: True
- shell: /bin/bash
- groups:
{% if grains['os_family'] == 'RedHat' %}
......@@ -56,21 +52,12 @@ manager:
- sudo
{% endif %}
service:
- running
- enable: True
- watch:
- file: manager_postactivate
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
- 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.configuration
- sls: manager.gitrepo
portal:
......
{% if grains['os'] == 'Ubuntu' or grains['os'] == 'Debian' %}
{% if grains['os'] == 'Ubuntu' or grains['os_family'] == 'Debian' %}
nodejs-legacy:
pkg.installed
{% endif %}
npm:
{% if grains['os'] == 'Ubuntu' or grains['os'] == 'Debian' %}
{% if grains['os'] == 'Ubuntu' or grains['os_family'] == 'Debian' %}
pkg.installed:
- require:
- pkg: nodejs-legacy
......
......@@ -14,19 +14,21 @@ rabbitmq-server:
- file: rabbitmq-server
{% endif %}
virtual_host:
rabbitmq_vhost.present:
- name: {{ pillar['amqp']['vhost']}}
- require:
- service: rabbitmq-server
rabbitmq_user:
rabbitmq_user.present:
- name: {{ pillar['amqp']['user'] }}
- password: {{ pillar['amqp']['password'] }}
- perms: [{ {{ pillar['amqp']['vhost']}}: [.*, .*, .*]}]
# - '{{ pillar['amqp']['vhost']}}':
# - conf: ".*"
# - write: " .*"
# - read: ".*"
- require:
- service: rabbitmq-server
virtual_host:
rabbitmq_vhost.present:
- name: {{ pillar['amqp']['vhost']}}
- user: {{ pillar['amqp']['user'] }}
- conf: .*
- write: .*
- read: .*
- require:
- service: rabbitmq-server
......@@ -15,6 +15,7 @@ m2crypto_swig_env:
virtualenv_manager:
virtualenv.managed:
- python: /usr/bin/python3
- name: /home/{{ pillar['user'] }}/.virtualenvs/circle
- requirements: /home/{{ pillar['user'] }}/circle/requirements/{{ pillar['deployment_type'] }}.txt
- user: {{ pillar['user'] }}
......@@ -26,6 +27,11 @@ virtualenv_manager:
- environ: m2crypto_swig_env
{% 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:
cmd.script:
- template: jinja
......
include:
- profile
- agentdriver
- monitor-client
- vmdriver
......
{% if grains['os']=='Debian' %}
{# For non-interactive shells, virtualenvwrapper commands
('workon' etc.) are not sourced automatically #}
/etc/profile:
file.append:
- text:
- "#Line below added for Debian by CIRCLE Salt installer"
- . /etc/bash_completion
{% endif %}
/etc/profile.d/virtualenvwrapper.sh:
file.symlink:
- target: /usr/local/bin/virtualenvwrapper.sh
......@@ -6,16 +6,14 @@
- group: {{ pillar['user'] }}
- mode: 700
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if pillar['init_type'] == 'systemd' %}
/etc/systemd/system/vncproxy.service:
file.managed:
- user: root
- group: root
- template: jinja
- source: file:///home/{{ pillar['user'] }}/vncproxy/miscellaneous/vncproxy.service
{% else %}
/etc/init/vncproxy.conf:
file.managed:
- user: root
......@@ -23,3 +21,5 @@
- template: jinja
- source: file:///home/{{ pillar['user'] }}/vncproxy/miscellaneous/vncproxy.conf
{% endif %}
......@@ -7,19 +7,19 @@ vncproxy:
pkg.installed:
- pkgs:
- git
- ntp
- chrony
- wget
{% if grains['os_family'] == 'RedHat' %}
- python2-pip
- python3-pip
- libffi-devel
- openssl-devel
- python-devel
- python-virtualenvwrapper
- python3-devel
- python3-virtualenvwrapper
{% else %}
- python-pip
- python3-pip
- libffi-dev
- libssl-dev
- python-dev
- python3-dev
- virtualenvwrapper
{% endif %}
- require_in:
......
virtualenv_vncproxy:
virtualenv.managed:
- python: /usr/bin/python3
- 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'] }}
- no_chown: true
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