forked from nmadhok/wordpress-formula
-
Notifications
You must be signed in to change notification settings - Fork 53
/
.kitchen.yml
186 lines (181 loc) · 5.51 KB
/
.kitchen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
---
driver:
name: docker
hostname: salt-formula.ci.local
use_sudo: false
require_chef_omnibus: false
driver_config:
cap_add:
- SYS_PTRACE
# verifier:
# name: inspec
platforms:
- name: ubuntu-14.04
- name: ubuntu-16.04
- name: debian-7
- name: debian-8
- name: centos-6
- name: centos-7
provisioner:
name: salt_solo
salt_version: 2015.8.8
# data_path: test/shared
is_file_root: false
formula: wordpress
dependencies:
- {name: php, path: /tmp/php}
- {name: apache, path: /tmp/apache}
- {name: mysql, path: /tmp/mysql}
pillars:
top.sls:
base:
'*':
- apache
- php
- mysql
- wordpress
apache.sls:
apache:
sites:
sitenameA.com:
enabled: True
Directory:
default: {AllowOverride: All, Options: All, Require: all granted}
DocumentRoot: /var/html/sitenameA.com
Formula_Append: |
<IfModule mod_fastcgi.c>
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -appConnTimeout 10 -idle-timeout 310 -flush -pass-header Authorization
</IfModule>
ServerName: sitenameA.com
sitenameB.com:
enabled: True
Directory:
default: {AllowOverride: All, Options: All, Require: all granted}
DocumentRoot: /var/html/sitenameB.com
Formula_Append: |
<IfModule mod_fastcgi.c>
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -appConnTimeout 10 -idle-timeout 310 -flush -pass-header Authorization
</IfModule>
ServerName: sitenameB.com
php.sls:
php:
ng:
fpm:
service:
enabled: True
config:
ini:
opts:
recurse: True
settings:
PHP:
engine: 'Off'
extension_dir: '/usr/lib/php5/20121212/'
extension: [pdo, pdo_mysql.so, pdo_pgsql.so, iconv.so, openssl.so, curl.so, gd.so, geoip.so, imagick.so, json.so, ldap.so, mysqli.so, mysql.so, readline.so, recode.so]
conf:
opts:
recurse: True
settings:
global:
pid: /var/run/php5-fpm.pid
pools:
'www.conf':
enabled: True
opts:
replace: True
settings:
www:
user: www-data
group: www-data
listen: /var/run/php5-fpm.sock
listen.owner: www-data
listen.group: www-data
listen.mode: 0660
pm: ondemand
pm.max_children: 5
pm.start_servers: 3
pm.min_spare_servers: 2
pm.max_spare_servers: 4
pm.max_requests: 200
'php_admin_value[memory_limit]': 300M
mysql.sls:
mysql:
server:
root_user: 'root'
root_password: 'somepass'
user: mysql
mysqld:
bind-address: 0.0.0.0
log_bin: /var/log/mysql/mysql-bin.log
port: 3306
binlog_do_db: foo
auto_increment_increment: 5
database:
- siteAdb
- siteBdb
user:
siteAdbuser:
password: 'siteAdbpass'
host: localhost
databases:
- database: siteAdb
grants: ['all privileges']
siteBdbuser:
password: 'siteBdbpass'
host: localhost
databases:
- database: siteBdb
grants: ['all privileges']
wordpress.sls:
wordpress:
cli:
source: https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
hash: https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar.md5
sites:
sitenameA.com:
username: siteAuser
password: siteApass
database: siteAdb
dbhost: localhost
dbuser: siteAdbuser
dbpass: siteAdbpass
url: http://siteA.com
title: 'siteA title'
email: [email protected]
sitenameB.com:
username: siteBuser
password: siteBpass
database: siteBdb
dbhost: localhost
dbuser: siteBdbuser
dbpass: siteBdbpass
url: http://siteB.com
title: 'siteB title'
email: [email protected]
suites:
- name: high
provisioner:
state_top:
base:
'*':
- apache
- apache.config
- apache.vhosts.standard
- php.ng
- php.ng.mysql
- mysql
- wordpress
- name: wordpress_cli
provisioner:
state_top:
base:
'*':
- wordpress.cli
- name: wordpress_config
provisioner:
state_top:
base:
'*':
- wordpress.config