-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontinuous-pipe.yml
267 lines (231 loc) · 8.52 KB
/
continuous-pipe.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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
defaults:
cluster: ${CLUSTER}
environment:
name: '"magento2-demo-" ~ code_reference.branch'
variables:
- name: MAGENTO_MODE
value: production
- name: PRODUCTION_ENVIRONMENT
value: 'false'
tasks:
images:
build:
services:
web:
image: quay.io/richdynamix/demo-magento2
environment:
- name: MAGENTO_USERNAME
value: ${MAGENTO_USERNAME}
- name: MAGENTO_PASSWORD
value: ${MAGENTO_PASSWORD}
storage:
deploy:
services:
database:
specification:
volumes:
- type: persistent
name: database-volume
capacity: 5Gi
storage_class: default
volume_mounts:
- name: database-volume
mount_path: /var/lib/mysql
command:
- /usr/local/bin/docker-entrypoint.sh
- mysqld
- --ignore-db-dir=lost+found
- --max_allowed_packet=128M
ports:
- 3306
resources:
requests:
cpu: 50m
memory: 250Mi
limits:
cpu: 500m
memory: 2Gi
environment_variables:
- name: MYSQL_PASSWORD
value: ${DATABASE_PASSWORD}
- name: MYSQL_ROOT_PASSWORD
value: ${DATABASE_ROOT_PASSWORD}
- name: MYSQL_DATABASE
value: magento2
- name: MYSQL_USER
value: magento2
redis:
deployment_strategy:
readiness_probe:
type: tcp
port: 6379
specification:
ports:
- 6379
resources:
requests:
cpu: 50m
memory: 50Mi
limits:
cpu: 250m
memory: 250Mi
reserve_ip:
deploy:
services:
proxy:
specification:
source:
image: docker.io/continuouspipe/landing-page
tag: latest
accessibility:
from_external: true
ports:
- 80
- 443
filter:
expression: 'tasks.storage.services.database.created'
setup:
run:
image:
from_service: web
commands:
- bash /usr/local/share/magento2/development/install.sh
environment_variables: &WEB_ENV_VARS
- name: PRODUCTION_ENVIRONMENT
value: ${PRODUCTION_ENVIRONMENT}
- name: PUBLIC_ADDRESS
value: https://${SERVICE_PROXY_PUBLIC_ENDPOINT}/
- name: MAGENTO_CRYPT_KEY
value: ${MAGENTO_CRYPT_KEY}
- name: APP_USER_LOCAL
value: false
- name: DATABASE_NAME
value: magento2
- name: DATABASE_USER
value: magento2
- name: DATABASE_PASSWORD
value: ${DATABASE_PASSWORD}
- name: DATABASE_ROOT_PASSWORD
value: ${DATABASE_ROOT_PASSWORD}
- name: DEVELOPMENT_MODE
value: false
filter:
expression: 'tasks.storage.services.database.created'
deployment:
deploy:
services:
proxy:
specification:
accessibility:
from_external: true
ports:
- 80
- 443
resources:
requests:
cpu: 50m
memory: 50Mi
limits:
cpu: 1
memory: 200Mi
environment_variables:
- name: AUTH_HTTP_ENABLED
value: true
- name: AUTH_HTTP_HTPASSWD
value: ${AUTH_HTTP_HTPASSWD}
deployment_strategy:
readiness_probe:
type: tcp
port: 80
liveness_probe:
type: exec
command:
- curl
- -k
- -I
- -X GET
- -H
- "Authorization: Basic ${AUTH_HTTP_AUTHORISATION_STRING}"
- https://localhost/
initial_delay_seconds: 300
period_seconds: 300
success_threshold: 1
failure_threshold: 10
varnish:
specification:
source:
image: quay.io/continuouspipe/magento2-varnish4
tag: stable
accessibility:
from_external: false
resources:
requests:
cpu: 50m
memory: 50Mi
limits:
cpu: 1
memory: 1G # Varnish is configured with malloc,1g
ports:
- 80
web:
specification:
accessibility:
from_external: false
environment_variables:
<<: *WEB_ENV_VARS
resources:
requests:
cpu: 50m
memory: 50Mi
limits:
cpu: 1
memory: 2G
ports:
- 80
deployment_strategy:
readiness_probe:
type: tcp
port: 80
liveness_probe:
type: exec
command:
- curl
- -I
- -X GET
- http://localhost/
initial_delay_seconds: 300
period_seconds: 300
success_threshold: 1
failure_threshold: 10
pipelines:
- name: Production
tasks:
- images
- storage
- reserve_ip
- setup
- deployment
condition: 'code_reference.branch in ["master", "develop"]'
- name: Features
tasks:
- images
- storage
- reserve_ip
- setup
- deployment
condition: 'not(code_reference.branch in ["master", "develop"]) and not(code_reference.branch matches "/^cpdev/")'
- name: Remote
tasks:
- images
- storage
- reserve_ip
- setup
- deployment
variables:
- name: MAGENTO_MODE
value: developer
- name: DEVELOPMENT_MODE
value: 0
- name: PRODUCTION_ENVIRONMENT
value: 'false'
condition: 'code_reference.branch matches "/^cpdev/"'