setup vagrant box roles and nginx package
This commit is contained in:
parent
6f9b17dc49
commit
18ae1e15f4
9 changed files with 88 additions and 0 deletions
1
Vagrantfile
vendored
1
Vagrantfile
vendored
|
@ -58,6 +58,7 @@ Vagrant.configure(2) do |config|
|
|||
salt.minion_id = "gvadev"
|
||||
salt.masterless = true
|
||||
salt.run_highstate = true
|
||||
salt.verbose = true
|
||||
salt.colorize = true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,3 +24,11 @@ pillar_roots:
|
|||
|
||||
log_file: file:///dev/log
|
||||
EOF
|
||||
|
||||
cat >/etc/salt/grains <<EOF
|
||||
roles:
|
||||
- webserver
|
||||
- gnuviechadmin.database
|
||||
- gnuviechadmin.queues
|
||||
- gnuviechadmin.webinterface
|
||||
EOF
|
||||
|
|
56
salt/roots/base/nginx.conf
Normal file
56
salt/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
salt/roots/base/nginx.sls
Normal file
21
salt/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
salt/roots/gnuviechadmin/database.sls
Normal file
0
salt/roots/gnuviechadmin/database.sls
Normal file
0
salt/roots/gnuviechadmin/init.sls
Normal file
0
salt/roots/gnuviechadmin/init.sls
Normal file
0
salt/roots/gnuviechadmin/queues.sls
Normal file
0
salt/roots/gnuviechadmin/queues.sls
Normal file
0
salt/roots/gnuviechadmin/webinterface.sls
Normal file
0
salt/roots/gnuviechadmin/webinterface.sls
Normal file
2
salt/roots/webserver/init.sls
Normal file
2
salt/roots/webserver/init.sls
Normal file
|
@ -0,0 +1,2 @@
|
|||
include:
|
||||
- base.nginx
|
Loading…
Reference in a new issue