-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathtrain-deploy.yaml
177 lines (168 loc) · 6.29 KB
/
train-deploy.yaml
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
train_version: 1.0
# train deploy spec at http://wiki.ms.com/MSDETrain/TrainSpecFileForDeploy
# train deploy language reference at http://devdocs.ms.com/docs/msde_deployment-docs_default/html/train_deploy_language.html
# train deploy demos at http://wiki.ms.com/MSDETrain/TrainDeployDemos
# When making changes to this file, always verify it:
# Full verification docs at http://devdocs.ms.com/docs/msde_deployment-docs_default/html/traincli-deploy/core_commands.html#train-verify-schema
# ie:
# train verify schema --manifest ./train-deploy.yaml
tools:
# train will create a shell script that runs "module load msde/deploy-endpoints/prod"
# and that will make tools such as `flip_releaselink`, `zapp` and `zapp_verify` available.
# For a full list of available tools see https://jive.ms.com/community/msde/train/train-deployment/pages/deploy-endpoints-languages
- msde/deploy-endpoints/prod
# used to call the aq client and verify the broker is up and running
- aquilon/prod
- cloud/treadmill/3
# dev tam environment class
dev:
- name: alpha.execute
notify-email: aqd-eng
notification-policy: "strict"
stages:
- stage:
name: "Flip release link"
script:
- flip_releaselink
on_failure: "abort"
- stage:
name: "Restart services"
script:
- zapp restart-app --verify-after 10 --status-interval-time 5 --verification-iterations 3 --plant ec/aquilon-ny-2/dev --pattern '^(alpha-aqd|alpha-aq_notifyd|alpha-knc|alpha-aqweb)$' --continue-on-fail
on_failure: "abort"
- name: alpha.verify
notify-email: aqd-eng
stages:
- stage:
name: Verify releaselink
script:
- verify_releaselink --check_cells
- stage:
name: Verify aq alpha broker
script:
- aq status --aqhost aqdalpha1.new-york.ms.com --aqservice aqddev
- name: beta.execute
notify-email: aqd-eng
notification-policy: "strict"
stages:
- stage:
name: "Flip release link"
script:
- flip_releaselink
on_failure: "abort"
- stage:
name: "Restart services"
script:
- zapp restart-app --verify-after 10 --status-interval-time 5 --verification-iterations 3 --plant ec/aquilon-ny-2/dev --pattern '^(aqd-ro-instance|next-aqd|next-aq_notifyd|next-knc|next-aqweb)$' --continue-on-fail
on_failure: "continue"
- stage:
name: "Reconfiguring treadmill"
script:
- treadmill configure aqdqa.aqd-ro --manifest=treadmill/${TRAIN_DEPLOY_ENV}/manifest.yaml
- train-treadmill monitor sync --source-dir treadmill/monitors/${TRAIN_DEPLOY_ENV}/
on_failure: "abort"
- stage:
name: "Restarting treadmill instances"
script:
- train-treadmill monitor restart --application-ids aqdqa.aqd-ro --cells dd,dz
on_failure: "abort"
- name: beta.verify
notify-email: aqd-eng
stages:
- stage:
name: Verify releaselink
script:
- verify_releaselink --check_cells
- stage:
name: Verify aq beta broker
script:
- aq status --aqhost nyaqdbeta1.ms.com --aqservice aqdqa
- aq status --aqhost aqd-ro-beta.ms.com --aqservice aqdqa
- name: ring1-beta.execute
notify-email: aqd-eng
notification-policy: "strict"
stages:
- stage:
name: "Flip release link"
script:
- flip_releaselink
on_failure: "abort"
- stage:
name: "Restart services"
script:
- zapp restart-app --verify-after 10 --status-interval-time 5 --verification-iterations 3 --plant ec/aquilon-ny-2/dev --pattern '^(aqd-ring1-dev|aq_notifyd|knc-ring1-dev|aqweb-ring1-dev)$' --continue-on-fail
on_failure: "continue"
- name: ring1-beta.verify
notify-email: aqd-eng
stages:
- stage:
name: Verify releaselink
script:
- verify_releaselink --check_cells
- stage:
name: Verify aq ring1 dev broker
script:
- aq status --aqhost devr1aqd.ms.com --aqservice aqdr1dev
# prod tam environment class
prod:
- name: ring1-prod.execute
notification-policy: "strict"
notify-email: aqd-eng, auroraturn
autodeployuser: aqdautodeploy
stages:
- stage:
name: "Flip release link"
script:
- flip_releaselink
on_failure: "abort"
- stage:
name: "Restart services"
script:
- zapp restart-app --verify-after 10 --status-interval-time 5 --verification-iterations 3 --plant ec/aquilon-ring1-ny-1/prod --pattern '^(aqd|aq_notifyd|knc|aqweb)$' --continue-on-fail
on_failure: "continue"
- name: ring1-prod.verify
notification-policy: "strict"
notify-email: aqd-eng, auroraturn
stages:
- stage:
name: Verify releaselink
script:
- verify_releaselink --check_cells
- stage:
name: Verify aq ring1 prod broker
script:
- aq status --aqhost r1aqd.new-york.ms.com --aqservice aqdr1p
on_failure: "continue"
- name: prod.execute
notify-email: aqd-eng, auroraturn
notification-policy: "strict"
autodeployuser: aqdautodeploy
stages:
- stage:
name: "Flip release link"
script:
- flip_releaselink
on_failure: "abort"
- stage:
name: "Restart RW services"
script:
- zapp restart-app --verify-after 10 --status-interval-time 5 --verification-iterations 3 --plant ec/aquilon-ny-1/prod --pattern '^(aqd|aqd-noauth|aq_notifyd|knc|aqweb)$' --continue-on-fail
on_failure: "continue"
- stage:
name: "Restart RO services"
script:
- zapp restart-app --verify-after 10 --status-interval-time 5 --verification-iterations 3 --plant ec/aquilon-ny-1/prod --pattern '^(aqd-ro-instance-\d|aqd-ro-knc-\d|aqd-ro-batch-instance-\d|aqd-ro-batch-knc-\d|aqd-ro-dhcp-instance-\d|aqd-ro-dhcp-knc-\d)$' --continue-on-fail
on_failure: "continue"
- name: prod.verify
notification-policy: "strict"
notify-email: aqd-eng, auroraturn
stages:
- stage:
name: Verify releaselink
script:
- verify_releaselink --check_cells
- stage:
name: Verify aq prod broker
script:
- /ms/dist/aquilon/PROJ/aqd-scripts/prod/bin/checkout.pl
on_failure: "continue"