-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
482 lines (470 loc) · 26.4 KB
/
entrypoint.sh
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
#!/bin/bash
#Preparing
ibmcloud login --apikey $API_KEY --no-region
ibmcloud target -g Default
export IBMCLOUD_HOME=/usr/local/bin/
ibmcloud plugin install container-registry
ibmcloud plugin install hpvs
ibmcloud cr region-set eu-central
release=`echo $RELEASE_VERSION|sed 's/\./-/g'`
ibmcloud cr namespace-add $CR_NAME-$release
mkdir ~/.ssh
cat << EOF > ~/.ssh/temp
$GIT_PRIVATE
EOF
cat ~/.ssh/temp | base64 -d > ~/.ssh/id_rsa
chmod 400 ~/.ssh/id_rsa
rm ~/.ssh/temp
git clone https://github.com/ibm-hyper-protect/secure-build-cli.git
cd secure-build-cli
pip3 install -r requirements.txt
apt install pinentry-tty
#Create secure build server registartion file
cat <<EOF > secure_build.asc
-----BEGIN PGP MESSAGE-----
Comment: https://gopenpgp.org
Version: GopenPGP 2.5.0
wcFMAxpkEC0f/4+uAQ/9GcamI6ST3+6jXg2QrLXqzBD/P/U4ob5kcAQ4ZWnSP9mQ
aAnebaejgxX6uAuWJbwHJD0kxJKxbzGXzwtoFfztQNkXZxhvpj80/O1EH8sOSv4z
fgABYqVAKpS3Zl4n1YUip0/y92jHlcrsrUkcWhdqYqBv9+uS0w9c1uVmuImscLDR
e2hz9PSUxNAPeqbrhXUlbiVDfu9uAfFhetYhq0di/d12HLqLPNjNX6BmHfU10NuI
XS316DF8OAhLkgHvwTIsGjIGM45BjCESIFPdfYsn3FQl6Ntcjad11pu2XI0o9kFQ
x5oIgTBp5YjxWIpRN5qcHv9kImyxFt03u1XUeqrBLe+A0xfsP9E88fZmL/W5pCeA
eJaHjzTkA3mjtkLVNYXluTc7AB0AxW0BpjP9rpM5IDfe6hzaRuKKBjCDlbiuPPDC
yvuGdr9Jf1MpJ170474yvH5dvmp0Iv4m8qH334mx2PgG2GZS4mdKfloMEPmJ8IIX
5bWR/jIRVqlTZRqL514/C1O9XfmEL/lFvpV47dJxfuziMRw3NF9DUWT4d7SrKGzJ
L4XJZXisIxYCmYXzjcdePg63o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IIvLIgsIbcOj2T
U1Gg0jW2nPIS/QHC4BrPHUZLtzD+EFKt8GdmkKJHCcoQ3T+1+UrtGHh3lhtVUZda
Fxj++vmk25rJEC6eS1zh9ADrt7PWGBzYvJDflUrHYbkqggASrzYqYpAtyvjkwGCC
/YInZ8eZG9gN81EWkZrP8jRObirL77rzi+sceeiV2PKJBiFUeyf6BQQlwcGGRZIq
Uf3YZ4D9AcWW7UgQiCpkjosrGY1k7evgMZoMoViDRNZGFxZisPEV12qdqpEK0dIc
DkrXQTicJCrpBeWgX5Dj+Xhc7CDhk0W4I837iHZPl5AOG4iQB3rhS3ZRomfQUuXS
j/lLHltrcRnxqOBhmvCVBFucGUwb7kS6Aj+Sm8a50o+Gt9cS/wp6FewDGceYirlZ
FV2IizLUqDxFYIJLYRrV/zmKPymN9A7e5Ex5GbDxpqMg
=c6rC
-----END PGP MESSAGE-----
EOF
#Create config file
cat <<EOF > sbs-config.json
{
"HOSTNAME": "$HOSTNAME",
"RUNTIME_TYPE": "classic",
"CICD_PUBLIC_IP": "x.x.x.x",
"CICD_PORT": "443",
"IMAGE_TAG": "1.3.0.11",
"CONTAINER_NAME": "$CONTAINER_NAME",
"GITHUB_KEY_FILE": "~/.ssh/id_rsa",
"GITHUB_URL": "$GIT_URL",
"GITHUB_BRANCH": "master",
"IMAGE_TAG_PREFIX": "$RELEASE_VERSION",
"REPO_ID": "sbs",
"DOCKER_REPO": "$CR_NAME-$release/$CONTAINER_NAME",
"DOCKER_USER": "iamapikey",
"DOCKER_PASSWORD": "$IAMAPI_KEY",
"DOCKER_RO_USER": "iamapikey",
"DOCKER_RO_PASSWORD": "$IAMAPI_KEY",
"DOCKER_CONTENT_TRUST_BASE": "False",
"DOCKER_CONTENT_TRUST_BASE_SERVER": "",
"DOCKER_BASE_SERVER": "de.icr.io",
"DOCKER_PUSH_SERVER": "de.icr.io",
"DOCKER_CONTENT_TRUST_PUSH_SERVER": "de.icr.io",
"ENV_WHITELIST": [
"ZHSM",
"APIKEY",
"IAM_ENDPOINT",
"JAVA_OPTS",
"INSTANCE_NAME",
"LOGGING_ELASTIC_INDEX_PREFIX",
"LOGGING_ELASTIC_NODE_URLS"
]
}
EOF
#Build secure image
./build.py create-client-cert --env sbs-config.json
./build.py create-server-cert --env sbs-config.json
export GPG_TTY=$(tty)
build_out=$(./build.py instance-env --env sbs-config.json)
echo build_out=$build_out
env_certs=$(echo $build_out | awk -F"secure_build.asc " '{print $3}')
echo env_certs=$env_certs
cat <<EOF > temp
ibmcloud hpvs instance-create $BUILD_SERVER free fra05 --rd-path "secure_build.asc" -i 1.3.0.11 $env_certs
EOF
echo cat temp
cat temp
sh temp
echo "---------------------------------------------------------------------"
echo " Waiting build server "
echo "---------------------------------------------------------------------"
echo ""
echo ""
sleep 600
build_ip=`ibmcloud hpvs instance $BUILD_SERVER 2>&1|grep "Public IP address"|awk '{print $4}'`
sed -i "s/x.x.x.x/$build_ip/g" sbs-config.json
echo "$build_ip $HOSTNAME" >> /etc/hosts
./build.py init --env sbs-config.json
./build.py build --env sbs-config.json
echo "---------------------------------------------------------------------"
echo " Waiting for the build to complete "
echo "---------------------------------------------------------------------"
echo ""
echo ""
sleep 500
deploy_tag=`./build.py log --log build --env sbs-config.json |grep image_tag|awk '{print $5}'|awk -F'-' '{print $2}'`
echo build.py log
./build.py log --log build --env sbs-config.json
echo build.py get-state-image
./build.py get-state-image --env sbs-config.json
echo build.py get-manifest
./build.py get-manifest --env sbs-config.json --verify-manifest
tag_out=$(./build.py log --log build --env sbs-config.json|grep image_tag|awk -F- '{print $5}')
echo tag_out=$tag_out
image_tag=$(echo $tag_out)
echo image_tag=$image_tag
echo deploy_tag=$deploy_tag
echo PWD
pwd
echo change gpg-agent pinentry-program
echo "pinentry-program /usr/bin/pinentry-tty" > /github/home/.gnupg/gpg-agent.conf
echo reload gpg-agent
gpg-connect-agent reloadagent /bye
# to check selection run update-alternatives --config pinentry
cat << EOF > pass.sh
export GPG_TTY=\$(tty)
./build.py get-config-json --env /github/workspace/secure-build-cli/sbs-config.json --key-id $CONTAINER_NAME-$deploy_tag
EOF
echo cat ./pass.sh
cat ./pass.sh
echo expect \<\< DONE > expect.sh
echo " exp_internal -f expect.log 0" >> expect.sh
echo " spawn sh ./pass.sh" >> expect.sh
echo " expect \"Passphrase:\" {send \"$PASSPHRASE\\\r\"}" >> expect.sh
echo " expect \"Repeat:\" {send \"$PASSPHRASE\\\r\"}" >> expect.sh
echo " expect \"Passphrase:\" {send \"$PASSPHRASE\\\r\"}" >> expect.sh
echo " expect eof" >> expect.sh
echo "DONE" >> expect.sh
echo cat ./expect.sh
cat ./expect.sh
echo run ./expect.sh
sh ./expect.sh
echo cat ./expect.log
cat ./expect.log
#Cleaning up orphan resources
ibmcloud hpvs instance-delete $BUILD_SERVER -f
sleep 10
reclamation_id=`ibmcloud resource reclamations|grep SCHEDULED|awk '{print $1}'`
ibmcloud resource reclamation-delete $reclamation_id -f
#ibmcloud cr namespace-rm $CR_NAME -f
#Artifacts
mkdir /github/workspace/deploy
cp sbs.enc /github/workspace/deploy/
echo "# Launch application as an HPVS instance" > /github/workspace/deploy/deploy-instructions.md
echo " " >> /github/workspace/deploy/deploy-instructions.md
echo "Login to IBM cloud via ibcmcloud cli" >> /github/workspace/deploy/deploy-instructions.md
echo " " >> /github/workspace/deploy/deploy-instructions.md
echo "Download the encrypted registration file (`sbs.enc`) for the image." >> /github/workspace/deploy/deploy-instructions.md
echo " " >> /github/workspace/deploy/deploy-instructions.md
echo "You need to make some changes in the command below:" >> /github/workspace/deploy/deploy-instructions.md
echo " " >> /github/workspace/deploy/deploy-instructions.md
echo "- You need to change \`HPVS-NAME\`" >> /github/workspace/deploy/deploy-instructions.md
echo "- You need to change \`YOUR-LOCATION\` to one of the locations as explained in the following paragraphs." >> /github/workspace/deploy/deploy-instructions.md
echo " - If you logged in to the \`us-east\`, then choose one of these three locations: \`wdc04\`, \`wdc06\` or \`wdc07\`" >> /github/workspace/deploy/deploy-instructions.md
echo " - If you logged in to the \`au-syd\`, then choose one of these three locations: \`syd01\`, \`syd04\` or \`syd05\`" >> /github/workspace/deploy/deploy-instructions.md
echo " - If you logged in to the \`eu-de\`, then choose one of these three locations: \`fra02\`, \`fra04\` or \`fra05\`" >> /github/workspace/deploy/deploy-instructions.md
echo " " >> /github/workspace/deploy/deploy-instructions.md
echo "Add parametrs to environment variables:" >> /github/workspace/deploy/deploy-instructions.md
echo " " >> /github/workspace/deploy/deploy-instructions.md
echo "- \`INSTANCE_NAME\`" >> /github/workspace/deploy/deploy-instructions.md
echo "- \`LOGGING_ELASTIC_INDEX_PREFIX\`" >> /github/workspace/deploy/deploy-instructions.md
echo "- \`LOGGING_ELASTIC_NODE_URLS\`" >> /github/workspace/deploy/deploy-instructions.md
echo " " >> /github/workspace/deploy/deploy-instructions.md
echo " or leave them empty" >> /github/workspace/deploy/deploy-instructions.md
echo " " >> /github/workspace/deploy/deploy-instructions.md
echo "Launch application:" >> /github/workspace/deploy/deploy-instructions.md
echo " " >> /github/workspace/deploy/deploy-instructions.md
echo "\`\`\`bash" >> /github/workspace/deploy/deploy-instructions.md
echo "ibmcloud hpvs instance-create HPVS-NAME entry YOUR-LOCATION --rd-path sbs.enc -i $RELEASE_VERSION-$deploy_tag -e JAVA_OPTS="-Xms64m -Xmx2048m" -e "INSTANCE_NAME"="" -e "LOGGING_ELASTIC_INDEX_PREFIX"="" -e "LOGGING_ELASTIC_NODE_URLS"="" " >> /github/workspace/deploy/deploy-instructions.md
echo "\`\`\`" >> /github/workspace/deploy/deploy-instructions.md
ls -la /github/workspace/deploy/