setup vagrant box roles and nginx package
This commit is contained in:
parent
724a4a9823
commit
da472f9009
8 changed files with 87 additions and 0 deletions
|
@ -24,3 +24,11 @@ pillar_roots:
|
||||||
|
|
||||||
log_file: file:///dev/log
|
log_file: file:///dev/log
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cat >/etc/salt/grains <<EOF
|
||||||
|
roles:
|
||||||
|
- webserver
|
||||||
|
- gnuviechadmin.database
|
||||||
|
- gnuviechadmin.queues
|
||||||
|
- gnuviechadmin.webinterface
|
||||||
|
EOF
|
||||||
|
|
56
roots/base/nginx.conf
Normal file
56
roots/base/nginx.conf
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
user www-data;
|
||||||
|
worker_processes 4;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 768;
|
||||||
|
# multi_accept on;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
|
||||||
|
##
|
||||||
|
# Basic Settings
|
||||||
|
##
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
# server_tokens off;
|
||||||
|
|
||||||
|
server_names_hash_bucket_size 64;
|
||||||
|
# server_name_in_redirect off;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
##
|
||||||
|
# SSL Settings
|
||||||
|
##
|
||||||
|
|
||||||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
|
##
|
||||||
|
# Logging Settings
|
||||||
|
##
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
|
##
|
||||||
|
# Gzip Settings
|
||||||
|
##
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
|
||||||
|
##
|
||||||
|
# Virtual Host Configs
|
||||||
|
##
|
||||||
|
|
||||||
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
include /etc/nginx/sites-enabled/*;
|
||||||
|
}
|
21
roots/base/nginx.sls
Normal file
21
roots/base/nginx.sls
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
nginx:
|
||||||
|
pkg:
|
||||||
|
- installed
|
||||||
|
service.running:
|
||||||
|
- enable: True
|
||||||
|
- require:
|
||||||
|
- pkg: nginx
|
||||||
|
|
||||||
|
nginx-common:
|
||||||
|
pkg.installed
|
||||||
|
|
||||||
|
/etc/nginx/nginx.conf:
|
||||||
|
file.managed:
|
||||||
|
- source: salt://base/nginx.conf
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 0644
|
||||||
|
- require:
|
||||||
|
- pkg: nginx-common
|
||||||
|
- watch_in:
|
||||||
|
- service: nginx
|
0
roots/gnuviechadmin/database.sls
Normal file
0
roots/gnuviechadmin/database.sls
Normal file
0
roots/gnuviechadmin/init.sls
Normal file
0
roots/gnuviechadmin/init.sls
Normal file
0
roots/gnuviechadmin/queues.sls
Normal file
0
roots/gnuviechadmin/queues.sls
Normal file
0
roots/gnuviechadmin/webinterface.sls
Normal file
0
roots/gnuviechadmin/webinterface.sls
Normal file
2
roots/webserver/init.sls
Normal file
2
roots/webserver/init.sls
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
include:
|
||||||
|
- base.nginx
|
Loading…
Reference in a new issue