Add salt state and pillar data for gvaweb
This commit is contained in:
parent
87d2af1a8a
commit
9a557fa69f
6 changed files with 48 additions and 0 deletions
9
pillar/gnuviechadmin/gvaweb.sls
Normal file
9
pillar/gnuviechadmin/gvaweb.sls
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
include:
|
||||||
|
- gnuviechadmin
|
||||||
|
- gnuviechadmin.queues.common
|
||||||
|
- gnuviechadmin.queues.gvaweb
|
||||||
|
|
||||||
|
gnuviechadmin:
|
||||||
|
component:
|
||||||
|
name: gvaweb
|
||||||
|
amqp_user: web
|
14
states/gnuviechadmin/gvaweb.sls
Normal file
14
states/gnuviechadmin/gvaweb.sls
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
include:
|
||||||
|
- gnuviechadmin.base
|
||||||
|
- gnuviechadmin.celery
|
||||||
|
|
||||||
|
sudo:
|
||||||
|
pkg.installed
|
||||||
|
|
||||||
|
/etc/sudoers.d/gvaweb:
|
||||||
|
file.managed:
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- source: salt://gnuviechadmin/gvaweb/sudoers
|
||||||
|
- require:
|
||||||
|
- pkg: sudo
|
12
states/gnuviechadmin/gvaweb/run_celery.sh
Normal file
12
states/gnuviechadmin/gvaweb/run_celery.sh
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
. {{ home }}/gvasettings.sh
|
||||||
|
|
||||||
|
unset LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
|
||||||
|
LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \
|
||||||
|
LC_IDENTIFICATION LC_ALL
|
||||||
|
|
||||||
|
cd {{ appdir }}
|
||||||
|
{{ virtualenv }}/bin/celery worker -A gvaweb -Q web --loglevel=INFO
|
8
states/gnuviechadmin/gvaweb/settings.sh
Normal file
8
states/gnuviechadmin/gvaweb/settings.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export GVAWEB_BROKER_URL='{{ broker_url }}'
|
||||||
|
export GVAWEB_RESULTS_REDIS_URL="redis://:{{ salt['pillar.get']('gnuviechadmin:redis_password') }}@{{ salt['pillar.get']('gnuviechadmin:redis_host') }}/0"
|
||||||
|
export GVAWEB_NGINX_SITES_AVAILABLE="{{ salt['pillar.get']('gnuviechadmin:nginx_sites_available', '/etc/nginx/sites-available') }}"
|
||||||
|
export GVAWEB_NGINX_SITES_ENABLED="{{ salt['pillar.get']('gnuviechadmin:nginx_sites_enabled', '/etc/nginx/sites-enabled') }}"
|
||||||
|
export GVAWEB_PHPFPM_POOL="{{ salt['pillar.get']('gnuviechadmin:phpfpm_pool', '/etc/php5/fpm/pool.d') }}"
|
||||||
|
export GVAWEB_WWWUSER_MOUNT="{{ salt['pillar.get']('gnuviechadmin:wwwuser_mount', '/srv/wwwfiles') }}"
|
3
states/gnuviechadmin/gvaweb/sudoers
Normal file
3
states/gnuviechadmin/gvaweb/sudoers
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Cmnd_Alias GVAWEB_CMDS = /usr/bin/install, /bin/rm, /bin/ln, /usr/sbin/service
|
||||||
|
|
||||||
|
gvaweb ALL = (root) NOPASSWD: GVAWEB_CMDS
|
|
@ -19,6 +19,8 @@ generate-dhparam-nginx:
|
||||||
- name: openssl dhparam -out {{ ssldir }}/dhparams.pem 2048
|
- name: openssl dhparam -out {{ ssldir }}/dhparams.pem 2048
|
||||||
- umask: 022
|
- umask: 022
|
||||||
- runas: root
|
- runas: root
|
||||||
|
- timeout: 300
|
||||||
|
- output_loglevel: debug
|
||||||
- creates: {{ ssldir }}/dhparams.pem
|
- creates: {{ ssldir }}/dhparams.pem
|
||||||
- require_in:
|
- require_in:
|
||||||
- file: /etc/nginx/conf.d/ssl.conf
|
- file: /etc/nginx/conf.d/ssl.conf
|
||||||
|
|
Loading…
Reference in a new issue