add PostgreSQL database and message queues to vagrant box
This commit is contained in:
parent
3c6b779c44
commit
b07ab0a14b
10 changed files with 177 additions and 0 deletions
7
salt/pillar/gnuviechadmin/database.sls
Normal file
7
salt/pillar/gnuviechadmin/database.sls
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
include:
|
||||||
|
- gnuviechadmin.database.common
|
||||||
|
|
||||||
|
gnuviechadmin-database:
|
||||||
|
owner:
|
||||||
|
user: gnuviechadmin
|
||||||
|
password: k4TG0oWeJ08urz697GVfavjK
|
4
salt/pillar/gnuviechadmin/database/common.sls
Normal file
4
salt/pillar/gnuviechadmin/database/common.sls
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
gnuviechadmin-database:
|
||||||
|
database: gnuviechadmin
|
||||||
|
hostname: localhost
|
||||||
|
port: 5432
|
21
salt/pillar/gnuviechadmin/init.sls
Normal file
21
salt/pillar/gnuviechadmin/init.sls
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
include:
|
||||||
|
- gnuviechadmin.database
|
||||||
|
- gnuviechadmin.queues
|
||||||
|
|
||||||
|
gnuviechadmin:
|
||||||
|
mailfrom: admin@gnuviech-server.de
|
||||||
|
adminemail: admin@gnuviech-server.de
|
||||||
|
sitename: Gnuviech Customer Self Service
|
||||||
|
domainname: localhost
|
||||||
|
checkout: /srv/www/gnuviechadmin
|
||||||
|
virtualenv: /home/gva/.virtualenvs/gnuviechadmin
|
||||||
|
devinstance: True
|
||||||
|
minosuid: 10000
|
||||||
|
minosgid: 10000
|
||||||
|
osuserprefix: usr
|
||||||
|
osuserhomedirbase: /home
|
||||||
|
osuserdefaultshell: /usr/bin/rssh
|
||||||
|
uploadserver: upload.example.com
|
||||||
|
webmail_url: https://webmail.example.com/
|
||||||
|
phpmyadmin_url: https://phpmyadmin.example.com/
|
||||||
|
phppgadmin_url: https://phppgadmin.example.com/
|
62
salt/pillar/gnuviechadmin/queues.sls
Normal file
62
salt/pillar/gnuviechadmin/queues.sls
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
gnuviechadmin-queues:
|
||||||
|
vhost: /gnuviechadmin
|
||||||
|
owner:
|
||||||
|
user: gnuviechadmin
|
||||||
|
password: WxyKeo7Xunhwv29C
|
||||||
|
users:
|
||||||
|
cli:
|
||||||
|
password: bUQ4QEB8yQEfsB0i
|
||||||
|
perms:
|
||||||
|
'/gnuviechadmin':
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
tags:
|
||||||
|
quotajob:
|
||||||
|
password: TaNoj2H3ZNDIz1rt
|
||||||
|
perms:
|
||||||
|
'/gnuviechadmin':
|
||||||
|
- '^quotatool$'
|
||||||
|
- '^quotatool$'
|
||||||
|
- '^quotatool|amq.default$'
|
||||||
|
tags:
|
||||||
|
ldap:
|
||||||
|
password: tl0ALc4aQBAl0W2e
|
||||||
|
perms:
|
||||||
|
'/gnuviechadmin':
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
tags:
|
||||||
|
file:
|
||||||
|
password: StR6EgMjLyNGP1F8
|
||||||
|
perms:
|
||||||
|
'/gnuviechadmin':
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
tags:
|
||||||
|
mysql:
|
||||||
|
password: Bhruvz8Oe9rXxRc7
|
||||||
|
perms:
|
||||||
|
'/gnuviechadmin':
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
tags:
|
||||||
|
pgsql:
|
||||||
|
password: rWOawAtb7MEmGZo3
|
||||||
|
perms:
|
||||||
|
'/gnuviechadmin':
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
tags:
|
||||||
|
web:
|
||||||
|
password: 1fBXqCu175rU7SWA
|
||||||
|
perms:
|
||||||
|
'/gnuviechadmin':
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
- '.*'
|
||||||
|
tags:
|
|
@ -0,0 +1,3 @@
|
||||||
|
base:
|
||||||
|
'*':
|
||||||
|
- gnuviechadmin
|
|
@ -0,0 +1,30 @@
|
||||||
|
include:
|
||||||
|
- postgresql-server
|
||||||
|
|
||||||
|
gnuviechadmin-database:
|
||||||
|
postgres_user.present:
|
||||||
|
- name: {{ salt['pillar.get']('gnuviechadmin-database:owner:user') }}
|
||||||
|
- user: postgres
|
||||||
|
- password: {{ salt['pillar.get']('gnuviechadmin-database:owner:password') }}
|
||||||
|
- login: True
|
||||||
|
- require:
|
||||||
|
- service: postgresql
|
||||||
|
postgres_database.present:
|
||||||
|
- name: {{ salt['pillar.get']('gnuviechadmin-database:database') }}
|
||||||
|
- user: postgres
|
||||||
|
- owner: {{ salt['pillar.get']('gnuviechadmin-database:owner:user') }}
|
||||||
|
- encoding: UTF8
|
||||||
|
- template: template0
|
||||||
|
- require:
|
||||||
|
- service: postgresql
|
||||||
|
- postgres_user: {{ salt['pillar.get']('gnuviechadmin-database:owner:user') }}
|
||||||
|
|
||||||
|
{% for gnuviechadmin_db_role in salt['pillar.get']('gnuviechadmin-database:users') %}
|
||||||
|
gnuviechadmin-dbuser-{{ gnuviechadmin_db_role }}:
|
||||||
|
postgres_user.present:
|
||||||
|
- name: {{ salt['pillar.get']('gnuviechadmin-database:users:' + gnuviechadmin_db_role + ':user') }}
|
||||||
|
- password: {{ salt['pillar.get']('gnuviechadmin-database:users:' + gnuviechadmin_db_role + ':password') }}
|
||||||
|
- login: True
|
||||||
|
- require:
|
||||||
|
- service: postgresql
|
||||||
|
{% endfor %}
|
|
@ -0,0 +1,30 @@
|
||||||
|
include:
|
||||||
|
- rabbitmq-server
|
||||||
|
|
||||||
|
gnuviechadmin-queues:
|
||||||
|
rabbitmq_user.present:
|
||||||
|
- name: {{ salt['pillar.get']('gnuviechadmin-queues:owner:user') }}
|
||||||
|
- password: {{ salt['pillar.get']('gnuviechadmin-queues:owner:password') }}
|
||||||
|
rabbitmq_vhost.present:
|
||||||
|
- name: {{ salt['pillar.get']('gnuviechadmin-queues:vhost') }}
|
||||||
|
- owner: {{ salt['pillar.get']('gnuviechadmin-queues:owner:user') }}
|
||||||
|
- require:
|
||||||
|
- rabbitmq_user: {{ salt['pillar.get']('gnuviechadmin-queues:owner:user') }}
|
||||||
|
|
||||||
|
{% for user in salt['pillar.get']('gnuviechadmin-queues:users') %}
|
||||||
|
gnuviechadmin-queue-user-{{ user }}:
|
||||||
|
rabbitmq_user.present:
|
||||||
|
- name: {{ user }}
|
||||||
|
- password: {{ salt['pillar.get']('gnuviechadmin-queues:users:%s:password' % user) }}
|
||||||
|
{% if salt['pillar.get']('gnuviechadmin-queues:users:%s:perms' % user) %}
|
||||||
|
- perms:
|
||||||
|
{% for vhost, perms in salt['pillar.get']('gnuviechadmin-queues:users:%s:perms' % user).iteritems() %}
|
||||||
|
- {{ vhost }}:
|
||||||
|
- {{ perms[0] }}
|
||||||
|
- {{ perms[1] }}
|
||||||
|
- {{ perms[2] }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
- require:
|
||||||
|
- rabbitmq_vhost: {{ salt['pillar.get']('gnuviechadmin-queues:vhost') }}
|
||||||
|
{% endfor %}
|
9
salt/roots/postgresql-server/init.sls
Normal file
9
salt/roots/postgresql-server/init.sls
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
locales-all:
|
||||||
|
pkg.installed
|
||||||
|
|
||||||
|
postgresql:
|
||||||
|
pkg:
|
||||||
|
- installed
|
||||||
|
service.running:
|
||||||
|
- require:
|
||||||
|
- pkg: postgresql
|
11
salt/roots/rabbitmq-server/init.sls
Normal file
11
salt/roots/rabbitmq-server/init.sls
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
rabbitmq-server:
|
||||||
|
pkg:
|
||||||
|
- installed
|
||||||
|
service:
|
||||||
|
- running
|
||||||
|
- requires:
|
||||||
|
- pkg: rabbitmq-server
|
||||||
|
|
||||||
|
guest:
|
||||||
|
rabbitmq_user:
|
||||||
|
- absent
|
Loading…
Reference in a new issue