-
Notifications
You must be signed in to change notification settings - Fork 14
executable file
·685 lines (657 loc) · 33 KB
/
DEPR-cicd_mainnet_prod.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
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
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
name: Deploy holoclis to prod[mainnet]
permissions:
id-token: write
contents: read # This is required for actions/checkout@v2
env:
AWS_REGION: us-west-2
IAM_ROLE: arn:aws:iam::177635894328:role/Github_role_to_access_ECR
ECR_REPOSITORY: holo-cli # notice: the same for all cli apps
#
IMAGE_TAG: mainnet-${{ github.sha }}
#
CLUSTER_NAME: prod0
#
AWS_KEY_ID: ${{ secrets.PROD0_CICD_USER_AWS_ACCESS_KEY_ID }}
AWS_ACCESS_KEY: ${{ secrets.PROD0_CICD_USER_AWS_SECRET_ACCESS_KEY }}
#
# MAINNET_HOLOGRAPH_INDEXER_HOST: 'http://blondie-holo-api.mainnet.svc.cluster.local:443'
# MAINNET_HOLOGRAPH_OPERATOR_HOST: 'http://blondie-holo-api.mainnet.svc.cluster.local:443'
#
MAINNET_HOLO_INDEXER_PASSWORD: ${{ secrets.MAINNET_HOLO_INDEXER_PASSWORD }}
MAINNET_HOLO_OPERATOR_PASSWORD: ${{ secrets.MAINNET_HOLO_OPERATOR_PASSWORD }}
V2_MAINNET_HOLO_OPERATOR_PASSWORD: ${{ secrets.V2_MAINNET_HOLO_OPERATOR_PASSWORD }}
#
# set the RPC endpoints config files
INDEXER_HOLO_CONFIG_FILE_DATA: mainnet-config-file
OPERATOR_HOLO_CONFIG_FILE_DATA: mainnet-config-file
#
HOLOGRAPH_ENVIRONMENT: mainnet
HOLOGRAPH_ADDRESS: ${{ secrets.MAINNET_HOLOGRAPH_ADDRESS }}
BLOCK_PROCESSING_VERSION: 'V2'
#
MAINNET_DOMAIN: 'holograph.xyz' # needed only for the health checks
#
MAINNET_COMMON_NAMESPACE: 'mainnet'
MAINNET_COMMON_NAMESPACE_V2: 'mainnet-v2'
#######################################
MAINNET_HOLO_INDEXER_HELM_CHART_VERSION: 0.1.85
INDEXER_RELEASE_NAME: 'blondie-indexer-mainnet' # format -> [release_name]-indexer-[env]
INDEXER_RELEASE_NAME_V2: 'blondie-indexer-mainnet-v2'
#
MAINNET_HOLO_OPERATOR_HELM_CHART_VERSION: 0.1.16
OPERATOR_RELEASE_NAME: 'blondie-operator-mainnet' # format -> [release_name]-operator-[env]
OPERATOR_RELEASE_NAME_V2: 'blondie-operator-mainnet-v2'
#######################################
## notice: the trigger
#on:
# push:
# branches:
# - 'something'
# # Excluded branches
# - '!develop'
# - '!main'
# - '!master'
# notice: the trigger
on:
pull_request:
branches:
- 'deactivated'
# - 'mainnet'
types: [closed]
jobs:
deploy-to-prod-mainnet:
if: github.event.pull_request.merged == true # so no workflow runs when some PR is just closed without being merged
name: Deploy-to-prod[mainnet]
runs-on: ubuntu-latest
steps:
- name: Use Githubs federated identity with AWS
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ env.IAM_ROLE }}
aws-region: ${{ env.AWS_REGION }}
- name: Get secrets from AWS Secrets Manager
uses: aws-actions/aws-secretsmanager-get-secrets@v1
with:
aws-region: ${{ env.AWS_REGION }}
secret-ids: |
MAINNET_INDEXER_V1
MAINNET_OPERATOR_V1
MAINNET_INDEXER_V2
MAINNET_OPERATOR_V2
COMMON
parse-json-secrets: true # to be able to get the json k/v pairs
- name: Login to ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Checkout the code
uses: actions/checkout@v2
# This is a separate action that sets up buildx runner
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
# So now you can use Actions' own caching!
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx
# And make it available for builds
- name: Build image
uses: docker/build-push-action@v2
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
file: Dockerfile
build-args: AWS_ECR_URL=${{ steps.login-ecr.outputs.registry }}
platforms: linux/amd64
tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
push: true # set false to deactivate the push to ECR
# This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB.
# https://github.com/docker/build-push-action/issues/252 & https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Configure AWS creds to access EKS
# TIP: the deployment user must be in the masters group in the aws-auth config map in the cluster
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ env.AWS_KEY_ID }} #notice: unique for each env
aws-secret-access-key: ${{ env.AWS_ACCESS_KEY }} #notice: unique for each env
aws-region: ${{ env.AWS_REGION }}
# - name: Create ns [${{ env.MAINNET_COMMON_NAMESPACE }}]
# uses: tensor-hq/eksctl-helm-action@main
# with:
# eks_cluster: ${{ env.CLUSTER_NAME }}
# command: |-
# kubectl create namespace ${{ env.MAINNET_COMMON_NAMESPACE }} --dry-run=client -o yaml | kubectl apply -f -
# NOTICE: --- INDEXER ---
- name: Pull the holograph-indexer helm chart version x.x.x from ECR
shell: bash
env:
#
CHART_REPO: holo-indexer
CHART_VERSION: ${{ env.MAINNET_HOLO_INDEXER_HELM_CHART_VERSION }}
#
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
helm pull oci://$ECR_REGISTRY/$CHART_REPO --version $CHART_VERSION
helm pull --untar oci://$ECR_REGISTRY/$CHART_REPO --version $CHART_VERSION
# NOTICE: ##### V1 deployments ######
- name: -> V1 -- Deploy INDEXER cli in MAINNET [namespace -> ${{ env.MAINNET_COMMON_NAMESPACE }}]
uses: tensor-hq/eksctl-helm-action@main
env:
RELEASE_NAME: ${{ env.INDEXER_RELEASE_NAME }} # notice
HOLOGRAPH_VERSION: 'V1'
#
ENABLE_DEBUG: 'true'
HEALTHCHECK: 'true'
MODE: 'auto'
ENABLE_UNSAFE: 'true'
ENABLE_SYNC: 'true'
ENABLE_PROCESS_BLOCK_RANGE: 'true' # undefined/true
UPDATE_BLOCK_HEIGHT: 'api' # api/file/disable
#
ENABLE_PROCESS_BLOCK_RANGE_arbitrum: 'true' # undefined/true
ENABLE_PROCESS_BLOCK_RANGE_optimism: 'true'
ENABLE_PROCESS_BLOCK_RANGE_binance: 'true'
ENABLE_PROCESS_BLOCK_RANGE_mantle: 'true'
ENABLE_PROCESS_BLOCK_RANGE_zora: 'true'
ENABLE_PROCESS_BLOCK_RANGE_avalanche: 'true'
ENABLE_PROCESS_BLOCK_RANGE_ethereum: 'true'
ENABLE_PROCESS_BLOCK_RANGE_polygon: 'true'
ENABLE_PROCESS_BLOCK_RANGE_base: 'true'
#
AVALANCHE_NETWORK: 'avalanche'
POLYGON_NETWORK: '{polygon}'
BINANCE_NETWORK: 'binanceSmartChain'
MANTLE_NETWORK: '{mantle}'
ETHEREUM_NETWORK: '{ethereum}'
OPTIMISM_NETWORK: '{optimism}'
ARBITRUM_NETWORK: '{arbitrumOne}'
ZORA_NETWORK: '{zora}'
BASE_NETWORK: '{base}'
with:
eks_cluster: ${{ env.CLUSTER_NAME }}
command: |-
helm upgrade --install $RELEASE_NAME \
holo-indexer-${{ env.MAINNET_HOLO_INDEXER_HELM_CHART_VERSION }}.tgz \
-n ${{ env.MAINNET_COMMON_NAMESPACE }} \
\
--set dummy_deployment_namespace=mainnet-cli-dummies \
\
--set image.repository=${{ env.ECR_REPOSITORY }} \
--set image.image_tag=${{ env.IMAGE_TAG }} \
--set config_file_data=${{ env.INDEXER_HOLO_CONFIG_FILE_DATA }} \
--set holo_indexer_password=${{ env.MAINNET_HOLO_INDEXER_PASSWORD }} \
--set HOLO_INDEXER_HOST=$MAINNET_INDEXER_V1_HOLO_INDEXER_HOST \
--set OPERATOR_API_KEY=$MAINNET_INDEXER_V1_OPERATOR_API_KEY \
--set HOLOGRAPH_ENVIRONMENT=${{ env.HOLOGRAPH_ENVIRONMENT }} \
--set HOLOGRAPH_VERSION=${{ env.HOLOGRAPH_VERSION }} \
--set BLOCK_PROCESSING_VERSION=${{ env.BLOCK_PROCESSING_VERSION }} \
\
--set ENABLE_DEBUG=$ENABLE_DEBUG \
--set ENABLE_SYNC=$ENABLE_SYNC \
--set HEALTHCHECK=$HEALTHCHECK \
--set MODE=$MODE \
\
--set AVALANCHE_NETWORK="${AVALANCHE_NETWORK}" \
--set POLYGON_NETWORK="${POLYGON_NETWORK}" \
--set BINANCE_NETWORK="${BINANCE_NETWORK}" \
--set MANTLE_NETWORK="${MANTLE_NETWORK}" \
--set ETHEREUM_NETWORK="${ETHEREUM_NETWORK}" \
--set OPTIMISM_NETWORK="${OPTIMISM_NETWORK}" \
--set ARBITRUM_NETWORK="${ARBITRUM_NETWORK}" \
--set ZORA_NETWORK="${ZORA_NETWORK}" \
--set BASE_NETWORK="${BASE_NETWORK}" \
\
--set ENABLE_UNSAFE="${ENABLE_UNSAFE}" \
--set UPDATE_BLOCK_HEIGHT=$UPDATE_BLOCK_HEIGHT \
\
--set ENABLE_PROCESS_BLOCK_RANGE.arbitrum=$ENABLE_PROCESS_BLOCK_RANGE_arbitrum \
--set ENABLE_PROCESS_BLOCK_RANGE.binance=$ENABLE_PROCESS_BLOCK_RANGE_binance \
--set ENABLE_PROCESS_BLOCK_RANGE.avalanche=$ENABLE_PROCESS_BLOCK_RANGE_avalanche \
--set ENABLE_PROCESS_BLOCK_RANGE.optimism=$ENABLE_PROCESS_BLOCK_RANGE_optimism \
--set ENABLE_PROCESS_BLOCK_RANGE.ethereum=$ENABLE_PROCESS_BLOCK_RANGE_ethereum \
--set ENABLE_PROCESS_BLOCK_RANGE.polygon=$ENABLE_PROCESS_BLOCK_RANGE_polygon \
--set ENABLE_PROCESS_BLOCK_RANGE.mantle=$ENABLE_PROCESS_BLOCK_RANGE_mantle \
--set ENABLE_PROCESS_BLOCK_RANGE.zora=$ENABLE_PROCESS_BLOCK_RANGE_zora \
--set ENABLE_PROCESS_BLOCK_RANGE.base=$ENABLE_PROCESS_BLOCK_RANGE_base \
\
--set mainnet_rpc_config_values.avalanche_rpc_url=$MAINNET_INDEXER_V1_AVALANCHE_RPC_URL \
--set mainnet_rpc_config_values.polygon_rpc_url=$MAINNET_INDEXER_V1_POLYGON_RPC_URL \
--set mainnet_rpc_config_values.ethereum_rpc_url=$MAINNET_INDEXER_V1_ETHEREUM_RPC_URL \
--set mainnet_rpc_config_values.optimism_rpc_url=$MAINNET_INDEXER_V1_OPTIMISM_RPC_URL \
--set mainnet_rpc_config_values.arbitrum_rpc_url=$MAINNET_INDEXER_V1_ARBITRUM_ONE_RPC_URL \
--set mainnet_rpc_config_values.binance_rpc_url=$MAINNET_INDEXER_V1_BINANCE_SMART_CHAIN_RPC_URL \
--set mainnet_rpc_config_values.mantle_rpc_url=$MAINNET_INDEXER_V1_MANTLE_RPC_URL \
--set mainnet_rpc_config_values.zora_rpc_url=$MAINNET_INDEXER_V1_ZORA_RPC_URL \
--set mainnet_rpc_config_values.base_rpc_url=$MAINNET_INDEXER_V1_BASE_RPC_URL \
\
--set mainnet_rpc_config_values.private_key=$MAINNET_INDEXER_V1_PRIVATE_KEY \
--set mainnet_rpc_config_values.address=$MAINNET_INDEXER_V1_MAINNET_V1_WALLET_ADDRESS \
--set mainnet_rpc_config_values.version="beta3" \
\
--set datadog_tags.env=${{ env.CLUSTER_NAME }} \
--set datadog_tags.service=$RELEASE_NAME \
--set datadog_tags.version=$RELEASE_NAME-${{ env.MAINNET_HOLO_INDEXER_HELM_CHART_VERSION }} \
\
--set autoscaling.enabled=false \
--set replicaCountAvalanche=1 \
--set replicaCountPolygon=1 \
--set replicaCountBinance=1 \
--set replicaCountMantle=1 \
--set replicaCountEthereum=1 \
--set replicaCountArbitrum=1 \
--set replicaCountOptimism=1 \
--set replicaCountBase=0 \
--set replicaCountLinea=0 \
--set replicaCountZora=1 \
\
--set sqs.SQS_USER_AWS_ACCESS_KEY_ID=$COMMON_AWS_ACCESS_KEY_ID_SQS \
--set sqs.SQS_USER_AWS_SECRET_ACCESS_KEY=$COMMON_AWS_SECRET_ACCESS_KEY_SQS \
--set sqs.SQS_ENDPOINT=$MAINNET_INDEXER_V1_SQS_ENDPOINT \
--set sqs.SQS_QUEUE_URL=$MAINNET_INDEXER_V1_SQS_QUEUE_URL \
--set sqs.AWS_REGION=$COMMON_AWS_REGION \
\
--values ./holo-indexer/values-v1-mainnet-iv.yaml
- name: Pause for 60 seconds
shell: bash
run: |
sleep 60
# NOTICE: --- OPERATOR ---
- name: Pull the holograph-operator helm chart version x.x.x from ECR
shell: bash
env:
#
CHART_REPO: holo-operator
CHART_VERSION: ${{ env.MAINNET_HOLO_OPERATOR_HELM_CHART_VERSION }}
#
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
helm pull oci://$ECR_REGISTRY/$CHART_REPO --version $CHART_VERSION
helm pull --untar oci://$ECR_REGISTRY/$CHART_REPO --version $CHART_VERSION
- name: -> V1 -- Deploy OPERATOR cli in MAINNET [namespace -> ${{ env.MAINNET_COMMON_NAMESPACE }}]
uses: tensor-hq/eksctl-helm-action@main
env:
RELEASE_NAME: ${{ env.OPERATOR_RELEASE_NAME }} # notice
HOLOGRAPH_VERSION: 'V1'
#
ENABLE_DEBUG: 'true'
ENABLE_SYNC: 'true'
HEALTHCHECK: 'true'
MODE: 'auto'
ENABLE_UNSAFE: 'true'
ENABLE_PROCESS_BLOCK_RANGE: 'true' # undefined/true
UPDATE_BLOCK_HEIGHT: 'api' # api/file/disable
#
ENABLE_PROCESS_BLOCK_RANGE_arbitrum: 'true' # undefined/true
ENABLE_PROCESS_BLOCK_RANGE_optimism: 'true'
ENABLE_PROCESS_BLOCK_RANGE_binance: 'true'
ENABLE_PROCESS_BLOCK_RANGE_mantle: 'true'
ENABLE_PROCESS_BLOCK_RANGE_zora: 'true'
ENABLE_PROCESS_BLOCK_RANGE_avalanche: 'true'
ENABLE_PROCESS_BLOCK_RANGE_ethereum: 'true'
ENABLE_PROCESS_BLOCK_RANGE_polygon: 'true'
ENABLE_PROCESS_BLOCK_RANGE_base: 'true'
#
AVALANCHE_NETWORK: 'avalanche'
POLYGON_NETWORK: '{polygon}'
BINANCE_NETWORK: 'binanceSmartChain'
MANTLE_NETWORK: '{mantle}'
ETHEREUM_NETWORK: '{eth}'
OPTIMISM_NETWORK: '{optimism}'
ARBITRUM_NETWORK: '{arbitrumOne}'
ZORA_NETWORK: '{zora}'
BASE_NETWORK: '{base}'
with:
eks_cluster: ${{ env.CLUSTER_NAME }}
command: |-
helm upgrade --install $RELEASE_NAME \
holo-operator-${{ env.MAINNET_HOLO_OPERATOR_HELM_CHART_VERSION }}.tgz \
-n ${{ env.MAINNET_COMMON_NAMESPACE }} \
\
--set dummy_deployment_namespace=mainnet-cli-dummies \
\
--set image.repository=${{ env.ECR_REPOSITORY }} \
--set image.image_tag=${{ env.IMAGE_TAG }} \
--set config_file_data=${{ env.OPERATOR_HOLO_CONFIG_FILE_DATA }} \
--set holo_operator_password=${{ env.MAINNET_HOLO_OPERATOR_PASSWORD }} \
--set HOLO_OPERATOR_HOST=$MAINNET_OPERATOR_V1_HOLO_OPERATOR_HOST \
--set OPERATOR_API_KEY=$MAINNET_OPERATOR_V1_OPERATOR_API_KEY \
--set HOLOGRAPH_ENVIRONMENT=${{ env.HOLOGRAPH_ENVIRONMENT }} \
--set HOLOGRAPH_VERSION=${{ env.HOLOGRAPH_VERSION }} \
\
--set ENABLE_DEBUG=$ENABLE_DEBUG \
--set ENABLE_SYNC=$ENABLE_SYNC \
--set HEALTHCHECK=$HEALTHCHECK \
--set MODE=$MODE \
--set ENABLE_UNSAFE="${ENABLE_UNSAFE}" \
--set UPDATE_BLOCK_HEIGHT=$UPDATE_BLOCK_HEIGHT \
\
--set ENABLE_PROCESS_BLOCK_RANGE.arbitrum=$ENABLE_PROCESS_BLOCK_RANGE_arbitrum \
--set ENABLE_PROCESS_BLOCK_RANGE.binance=$ENABLE_PROCESS_BLOCK_RANGE_binance \
--set ENABLE_PROCESS_BLOCK_RANGE.avalanche=$ENABLE_PROCESS_BLOCK_RANGE_avalanche \
--set ENABLE_PROCESS_BLOCK_RANGE.optimism=$ENABLE_PROCESS_BLOCK_RANGE_optimism \
--set ENABLE_PROCESS_BLOCK_RANGE.ethereum=$ENABLE_PROCESS_BLOCK_RANGE_ethereum \
--set ENABLE_PROCESS_BLOCK_RANGE.polygon=$ENABLE_PROCESS_BLOCK_RANGE_polygon \
--set ENABLE_PROCESS_BLOCK_RANGE.mantle=$ENABLE_PROCESS_BLOCK_RANGE_mantle \
--set ENABLE_PROCESS_BLOCK_RANGE.zora=$ENABLE_PROCESS_BLOCK_RANGE_zora \
--set ENABLE_PROCESS_BLOCK_RANGE.base=$ENABLE_PROCESS_BLOCK_RANGE_base \
\
--set AVALANCHE_NETWORK="${AVALANCHE_NETWORK}" \
--set POLYGON_NETWORK="${POLYGON_NETWORK}" \
--set BINANCE_NETWORK="${BINANCE_NETWORK}" \
--set MANTLE_NETWORK="${MANTLE_NETWORK}" \
--set ETHEREUM_NETWORK="${ETHEREUM_NETWORK}" \
--set OPTIMISM_NETWORK="${OPTIMISM_NETWORK}" \
--set ARBITRUM_NETWORK="${ARBITRUM_NETWORK}" \
--set ZORA_NETWORK="${ZORA_NETWORK}" \
--set BASE_NETWORK="${BASE_NETWORK}" \
\
--set mainnet_rpc_config_values.avalanche_rpc_url=$MAINNET_OPERATOR_V1_AVALANCHE_RPC_URL \
--set mainnet_rpc_config_values.polygon_rpc_url=$MAINNET_OPERATOR_V1_POLYGON_RPC_URL \
--set mainnet_rpc_config_values.binance_rpc_url=$MAINNET_OPERATOR_V1_BINANCE_SMART_CHAIN_RPC_URL \
--set mainnet_rpc_config_values.mantle_rpc_url=$MAINNET_OPERATOR_V1_MANTLE_RPC_URL \
--set mainnet_rpc_config_values.ethereum_rpc_url=$MAINNET_OPERATOR_V1_ETHEREUM_RPC_URL \
--set mainnet_rpc_config_values.optimism_rpc_url=$MAINNET_OPERATOR_V1_OPTIMISM_RPC_URL \
--set mainnet_rpc_config_values.arbitrum_rpc_url=$MAINNET_OPERATOR_V1_ARBITRUM_ONE_RPC_URL \
--set mainnet_rpc_config_values.zora_rpc_url=$MAINNET_OPERATOR_V1_ZORA_RPC_URL \
--set mainnet_rpc_config_values.base_rpc_url=$MAINNET_OPERATOR_V1_BASE_RPC_URL \
\
--set mainnet_rpc_config_values.private_key=$MAINNET_OPERATOR_V1_PRIVATE_KEY \
--set mainnet_rpc_config_values.address=$MAINNET_OPERATOR_V1_MAINNET_V1_WALLET_ADDRESS \
\
--set autoscaling.enabled=false \
--set replicaCountAvalanche=1 \
--set replicaCountPolygon=1 \
--set replicaCountBinance=1 \
--set replicaCountMantle=1 \
--set replicaCountEthereum=1 \
--set replicaCountArbitrum=1 \
--set replicaCountOptimism=1 \
--set replicaCountBase=0 \
--set replicaCountLinea=0 \
--set replicaCountZora=1 \
\
--set datadog_tags.env=${{ env.CLUSTER_NAME }} \
--set datadog_tags.service=$RELEASE_NAME \
--set datadog_tags.version=$RELEASE_NAME-${{ env.MAINNET_HOLO_OPERATOR_HELM_CHART_VERSION }} \
\
--values ./holo-operator/values-v1-mainnet-iv.yaml
- name: -> V1 -- Info for the new V1 deployments
uses: tensor-hq/eksctl-helm-action@main
env:
INDEXER_RELEASE_NAME: ${{ env.INDEXER_RELEASE_NAME }}
OPERATOR_RELEASE_NAME: ${{ env.OPERATOR_RELEASE_NAME }}
with:
eks_cluster: ${{ env.CLUSTER_NAME }}
command: |-
echo "------------------------- Last n Helm releases -------------------------"
echo "--INDEXER--"
helm history $INDEXER_RELEASE_NAME -n ${{ env.MAINNET_COMMON_NAMESPACE }} --max 3
echo "--OPERATOR--"
helm history $OPERATOR_RELEASE_NAME -n ${{ env.MAINNET_COMMON_NAMESPACE }} --max 3
echo "------------------------ Newly deployed image [same for all clis] ------------------------ "
echo "$IMAGE_TAG"
# NOTICE: ##### V2 deployments ######
- name: -> V2 -- Deploy INDEXER cli in MAINNET [namespace -> ${{ env.MAINNET_COMMON_NAMESPACE_V2 }}]
uses: tensor-hq/eksctl-helm-action@main
env:
RELEASE_NAME: ${{ env.INDEXER_RELEASE_NAME_V2 }} # notice
HOLOGRAPH_VERSION: 'V2'
#
ENABLE_DEBUG: 'true'
HEALTHCHECK: 'true'
MODE: 'auto'
ENABLE_UNSAFE: 'true'
ENABLE_SYNC: 'true'
ENABLE_PROCESS_BLOCK_RANGE: 'true' # undefined/true
UPDATE_BLOCK_HEIGHT: 'api' # api/file/disable
#
ENABLE_PROCESS_BLOCK_RANGE_arbitrum: 'true' # undefined/true
ENABLE_PROCESS_BLOCK_RANGE_optimism: 'true'
ENABLE_PROCESS_BLOCK_RANGE_binance: 'true'
ENABLE_PROCESS_BLOCK_RANGE_mantle: 'true'
ENABLE_PROCESS_BLOCK_RANGE_zora: 'true'
ENABLE_PROCESS_BLOCK_RANGE_avalanche: 'true'
ENABLE_PROCESS_BLOCK_RANGE_ethereum: 'true'
ENABLE_PROCESS_BLOCK_RANGE_polygon: 'true'
ENABLE_PROCESS_BLOCK_RANGE_base: 'true'
ENABLE_PROCESS_BLOCK_RANGE_linea: 'true'
#
AVALANCHE_NETWORK: 'avalanche'
POLYGON_NETWORK: '{polygon}'
BINANCE_NETWORK: 'binanceSmartChain'
MANTLE_NETWORK: '{mantle}'
ETHEREUM_NETWORK: '{ethereum}'
OPTIMISM_NETWORK: '{optimism}'
ARBITRUM_NETWORK: '{arbitrumOne}'
ZORA_NETWORK: '{zora}'
BASE_NETWORK: '{base}'
LINEA_NETWORK: '{linea}'
with:
eks_cluster: ${{ env.CLUSTER_NAME }}
command: |-
helm upgrade --install $RELEASE_NAME \
holo-indexer-${{ env.MAINNET_HOLO_INDEXER_HELM_CHART_VERSION }}.tgz \
-n ${{ env.MAINNET_COMMON_NAMESPACE_V2 }} \
\
--set dummy_deployment_namespace=mainnet-cli-dummies \
\
--set image.repository=${{ env.ECR_REPOSITORY }} \
--set image.image_tag=${{ env.IMAGE_TAG }} \
--set config_file_data=${{ env.INDEXER_HOLO_CONFIG_FILE_DATA }} \
--set holo_indexer_password=${{ env.MAINNET_HOLO_INDEXER_PASSWORD }} \
--set HOLO_INDEXER_HOST=$MAINNET_INDEXER_V2_HOLO_INDEXER_HOST \
--set OPERATOR_API_KEY=$MAINNET_INDEXER_V2_OPERATOR_API_KEY \
--set HOLOGRAPH_ENVIRONMENT=${{ env.HOLOGRAPH_ENVIRONMENT }} \
--set HOLOGRAPH_ADDRESS=${{ env.HOLOGRAPH_ADDRESS }} \
--set HOLOGRAPH_VERSION=${{ env.HOLOGRAPH_VERSION }} \
--set BLOCK_PROCESSING_VERSION=${{ env.BLOCK_PROCESSING_VERSION }} \
\
--set ENABLE_DEBUG=$ENABLE_DEBUG \
--set ENABLE_SYNC=$ENABLE_SYNC \
--set HEALTHCHECK=$HEALTHCHECK \
--set MODE=$MODE \
\
--set AVALANCHE_NETWORK="${AVALANCHE_NETWORK}" \
--set POLYGON_NETWORK="${POLYGON_NETWORK}" \
--set BINANCE_NETWORK="${BINANCE_NETWORK}" \
--set MANTLE_NETWORK="${MANTLE_NETWORK}" \
--set ETHEREUM_NETWORK="${ETHEREUM_NETWORK}" \
--set OPTIMISM_NETWORK="${OPTIMISM_NETWORK}" \
--set ARBITRUM_NETWORK="${ARBITRUM_NETWORK}" \
--set ZORA_NETWORK="${ZORA_NETWORK}" \
--set BASE_NETWORK="${BASE_NETWORK}" \
--set LINEA_NETWORK="${LINEA_NETWORK}" \
\
--set ENABLE_UNSAFE="${ENABLE_UNSAFE}" \
--set UPDATE_BLOCK_HEIGHT=$UPDATE_BLOCK_HEIGHT \
\
--set ENABLE_PROCESS_BLOCK_RANGE.arbitrum=$ENABLE_PROCESS_BLOCK_RANGE_arbitrum \
--set ENABLE_PROCESS_BLOCK_RANGE.binance=$ENABLE_PROCESS_BLOCK_RANGE_binance \
--set ENABLE_PROCESS_BLOCK_RANGE.avalanche=$ENABLE_PROCESS_BLOCK_RANGE_avalanche \
--set ENABLE_PROCESS_BLOCK_RANGE.optimism=$ENABLE_PROCESS_BLOCK_RANGE_optimism \
--set ENABLE_PROCESS_BLOCK_RANGE.ethereum=$ENABLE_PROCESS_BLOCK_RANGE_ethereum \
--set ENABLE_PROCESS_BLOCK_RANGE.polygon=$ENABLE_PROCESS_BLOCK_RANGE_polygon \
--set ENABLE_PROCESS_BLOCK_RANGE.mantle=$ENABLE_PROCESS_BLOCK_RANGE_mantle \
--set ENABLE_PROCESS_BLOCK_RANGE.zora=$ENABLE_PROCESS_BLOCK_RANGE_zora \
--set ENABLE_PROCESS_BLOCK_RANGE.base=$ENABLE_PROCESS_BLOCK_RANGE_base \
--set ENABLE_PROCESS_BLOCK_RANGE.linea=$ENABLE_PROCESS_BLOCK_RANGE_linea \
\
--set mainnet_rpc_config_values.avalanche_rpc_url=$MAINNET_INDEXER_V2_AVALANCHE_RPC_URL \
--set mainnet_rpc_config_values.polygon_rpc_url=$MAINNET_INDEXER_V2_POLYGON_RPC_URL \
--set mainnet_rpc_config_values.ethereum_rpc_url=$MAINNET_INDEXER_V2_ETHEREUM_RPC_URL \
--set mainnet_rpc_config_values.optimism_rpc_url=$MAINNET_INDEXER_V2_OPTIMISM_RPC_URL \
--set mainnet_rpc_config_values.arbitrum_rpc_url=$MAINNET_INDEXER_V2_ARBITRUM_ONE_RPC_URL \
--set mainnet_rpc_config_values.binance_rpc_url=$MAINNET_INDEXER_V2_BINANCE_SMART_CHAIN_RPC_URL \
--set mainnet_rpc_config_values.mantle_rpc_url=$MAINNET_INDEXER_V2_MANTLE_RPC_URL \
--set mainnet_rpc_config_values.zora_rpc_url=$MAINNET_INDEXER_V2_ZORA_RPC_URL \
--set mainnet_rpc_config_values.base_rpc_url=$MAINNET_INDEXER_V2_BASE_RPC_URL \
--set mainnet_rpc_config_values.linea_rpc_url=$MAINNET_INDEXER_V2_LINEA_RPC_URL \
\
--set mainnet_rpc_config_values.private_key=$MAINNET_INDEXER_V2_PRIVATE_KEY \
--set mainnet_rpc_config_values.address=$MAINNET_INDEXER_V2_MAINNET_V2_WALLET_ADDRESS \
--set mainnet_rpc_config_values.version="beta3" \
\
--set datadog_tags.env=${{ env.CLUSTER_NAME }} \
--set datadog_tags.service=$RELEASE_NAME \
--set datadog_tags.version=$RELEASE_NAME-${{ env.MAINNET_HOLO_INDEXER_HELM_CHART_VERSION }} \
\
--set autoscaling.enabled=false \
--set replicaCountAvalanche=1 \
--set replicaCountPolygon=1 \
--set replicaCountBinance=1 \
--set replicaCountMantle=1 \
--set replicaCountEthereum=1 \
--set replicaCountArbitrum=1 \
--set replicaCountOptimism=1 \
--set replicaCountBase=1 \
--set replicaCountLinea=1 \
--set replicaCountZora=1 \
\
--set sqs.SQS_USER_AWS_ACCESS_KEY_ID=$COMMON_AWS_ACCESS_KEY_ID_SQS \
--set sqs.SQS_USER_AWS_SECRET_ACCESS_KEY=$COMMON_AWS_SECRET_ACCESS_KEY_SQS \
--set sqs.SQS_ENDPOINT=$MAINNET_INDEXER_V2_SQS_ENDPOINT \
--set sqs.SQS_QUEUE_URL=$MAINNET_INDEXER_V2_SQS_QUEUE_URL \
--set sqs.AWS_REGION=$COMMON_AWS_REGION \
\
--values ./holo-indexer/values-v2-mainnet-iv.yaml
- name: Pause for 60 seconds
shell: bash
run: |
sleep 60
- name: -> V2 -- Deploy OPERATOR cli in MAINNET [namespace -> ${{ env.MAINNET_COMMON_NAMESPACE_V2 }}]
uses: tensor-hq/eksctl-helm-action@main
env:
RELEASE_NAME: ${{ env.OPERATOR_RELEASE_NAME_V2 }} # notice
HOLOGRAPH_VERSION: 'V2'
#
ENABLE_DEBUG: 'true'
ENABLE_SYNC: 'true'
HEALTHCHECK: 'true'
MODE: 'auto'
ENABLE_UNSAFE: 'true'
ENABLE_PROCESS_BLOCK_RANGE: 'true' # undefined/true
UPDATE_BLOCK_HEIGHT: 'api' # api/file/disable
#
ENABLE_PROCESS_BLOCK_RANGE_arbitrum: 'true' # undefined/true
ENABLE_PROCESS_BLOCK_RANGE_optimism: 'true'
ENABLE_PROCESS_BLOCK_RANGE_binance: 'true'
ENABLE_PROCESS_BLOCK_RANGE_mantle: 'true'
ENABLE_PROCESS_BLOCK_RANGE_zora: 'true'
ENABLE_PROCESS_BLOCK_RANGE_avalanche: 'true'
ENABLE_PROCESS_BLOCK_RANGE_ethereum: 'true'
ENABLE_PROCESS_BLOCK_RANGE_polygon: 'true'
ENABLE_PROCESS_BLOCK_RANGE_base: 'true'
ENABLE_PROCESS_BLOCK_RANGE_linea: 'true'
#
AVALANCHE_NETWORK: 'avalanche'
POLYGON_NETWORK: '{polygon}'
BINANCE_NETWORK: 'binanceSmartChain'
MANTLE_NETWORK: '{mantle}'
ETHEREUM_NETWORK: '{eth}'
OPTIMISM_NETWORK: '{optimism}'
ARBITRUM_NETWORK: '{arbitrumOne}'
ZORA_NETWORK: '{zora}'
BASE_NETWORK: '{base}'
LINEA_NETWORK: '{linea}'
with:
eks_cluster: ${{ env.CLUSTER_NAME }}
command: |-
helm upgrade --install $RELEASE_NAME \
holo-operator-${{ env.MAINNET_HOLO_OPERATOR_HELM_CHART_VERSION }}.tgz \
-n ${{ env.MAINNET_COMMON_NAMESPACE_V2 }} \
\
--set dummy_deployment_namespace=mainnet-cli-dummies \
\
--set image.repository=${{ env.ECR_REPOSITORY }} \
--set image.image_tag=${{ env.IMAGE_TAG }} \
--set config_file_data=${{ env.OPERATOR_HOLO_CONFIG_FILE_DATA }} \
--set holo_operator_password=${{ env.V2_MAINNET_HOLO_OPERATOR_PASSWORD }} \
--set HOLO_OPERATOR_HOST=$MAINNET_OPERATOR_V2_HOLO_OPERATOR_HOST \
--set OPERATOR_API_KEY=$MAINNET_OPERATOR_V2_OPERATOR_API_KEY \
--set HOLOGRAPH_ENVIRONMENT=${{ env.HOLOGRAPH_ENVIRONMENT }} \
--set HOLOGRAPH_ADDRESS=${{ env.HOLOGRAPH_ADDRESS }} \
--set HOLOGRAPH_VERSION=${{ env.HOLOGRAPH_VERSION }} \
\
--set ENABLE_DEBUG=$ENABLE_DEBUG \
--set ENABLE_SYNC=$ENABLE_SYNC \
--set HEALTHCHECK=$HEALTHCHECK \
--set MODE=$MODE \
--set ENABLE_UNSAFE="${ENABLE_UNSAFE}" \
--set UPDATE_BLOCK_HEIGHT=$UPDATE_BLOCK_HEIGHT \
\
--set ENABLE_PROCESS_BLOCK_RANGE.arbitrum=$ENABLE_PROCESS_BLOCK_RANGE_arbitrum \
--set ENABLE_PROCESS_BLOCK_RANGE.binance=$ENABLE_PROCESS_BLOCK_RANGE_binance \
--set ENABLE_PROCESS_BLOCK_RANGE.avalanche=$ENABLE_PROCESS_BLOCK_RANGE_avalanche \
--set ENABLE_PROCESS_BLOCK_RANGE.optimism=$ENABLE_PROCESS_BLOCK_RANGE_optimism \
--set ENABLE_PROCESS_BLOCK_RANGE.ethereum=$ENABLE_PROCESS_BLOCK_RANGE_ethereum \
--set ENABLE_PROCESS_BLOCK_RANGE.polygon=$ENABLE_PROCESS_BLOCK_RANGE_polygon \
--set ENABLE_PROCESS_BLOCK_RANGE.mantle=$ENABLE_PROCESS_BLOCK_RANGE_mantle \
--set ENABLE_PROCESS_BLOCK_RANGE.zora=$ENABLE_PROCESS_BLOCK_RANGE_zora \
--set ENABLE_PROCESS_BLOCK_RANGE.base=$ENABLE_PROCESS_BLOCK_RANGE_base \
--set ENABLE_PROCESS_BLOCK_RANGE.linea=$ENABLE_PROCESS_BLOCK_RANGE_linea \
\
--set AVALANCHE_NETWORK="${AVALANCHE_NETWORK}" \
--set POLYGON_NETWORK="${POLYGON_NETWORK}" \
--set BINANCE_NETWORK="${BINANCE_NETWORK}" \
--set MANTLE_NETWORK="${MANTLE_NETWORK}" \
--set ETHEREUM_NETWORK="${ETHEREUM_NETWORK}" \
--set OPTIMISM_NETWORK="${OPTIMISM_NETWORK}" \
--set ARBITRUM_NETWORK="${ARBITRUM_NETWORK}" \
--set ZORA_NETWORK="${ZORA_NETWORK}" \
--set BASE_NETWORK="${BASE_NETWORK}" \
--set LINEA_NETWORK="${LINEA_NETWORK}" \
\
--set mainnet_rpc_config_values.avalanche_rpc_url=$MAINNET_OPERATOR_V2_AVALANCHE_RPC_URL \
--set mainnet_rpc_config_values.polygon_rpc_url=$MAINNET_OPERATOR_V2_POLYGON_RPC_URL \
--set mainnet_rpc_config_values.binance_rpc_url=$MAINNET_OPERATOR_V2_BINANCE_SMART_CHAIN_RPC_URL \
--set mainnet_rpc_config_values.mantle_rpc_url=$MAINNET_OPERATOR_V2_MANTLE_RPC_URL \
--set mainnet_rpc_config_values.ethereum_rpc_url=$MAINNET_OPERATOR_V2_ETHEREUM_RPC_URL \
--set mainnet_rpc_config_values.optimism_rpc_url=$MAINNET_OPERATOR_V2_OPTIMISM_RPC_URL \
--set mainnet_rpc_config_values.arbitrum_rpc_url=$MAINNET_OPERATOR_V2_ARBITRUM_ONE_RPC_URL \
--set mainnet_rpc_config_values.zora_rpc_url=$MAINNET_OPERATOR_V2_ZORA_RPC_URL \
--set mainnet_rpc_config_values.base_rpc_url=$MAINNET_OPERATOR_V2_BASE_RPC_URL \
--set mainnet_rpc_config_values.linea_rpc_url=$MAINNET_OPERATOR_V2_LINEA_RPC_URL \
\
--set mainnet_rpc_config_values.private_key=$MAINNET_OPERATOR_V2_PRIVATE_KEY \
--set mainnet_rpc_config_values.address=$MAINNET_OPERATOR_V2_MAINNET_V2_WALLET_ADDRESS \
\
--set autoscaling.enabled=false \
--set replicaCountAvalanche=1 \
--set replicaCountPolygon=1 \
--set replicaCountBinance=1 \
--set replicaCountMantle=1 \
--set replicaCountEthereum=1 \
--set replicaCountArbitrum=1 \
--set replicaCountOptimism=1 \
--set replicaCountBase=1 \
--set replicaCountLinea=1 \
--set replicaCountZora=1 \
\
--set datadog_tags.env=${{ env.CLUSTER_NAME }} \
--set datadog_tags.service=$RELEASE_NAME \
--set datadog_tags.version=$RELEASE_NAME-${{ env.MAINNET_HOLO_OPERATOR_HELM_CHART_VERSION }} \
\
--values ./holo-operator/values-v2-mainnet-iv.yaml
- name: -> V2 -- Info for the new V2 deployments
uses: tensor-hq/eksctl-helm-action@main
env:
INDEXER_RELEASE_NAME: ${{ env.INDEXER_RELEASE_NAME_V2 }}
OPERATOR_RELEASE_NAME: ${{ env.OPERATOR_RELEASE_NAME_V2 }}
with:
eks_cluster: ${{ env.CLUSTER_NAME }}
command: |-
echo "------------------------- Last n Helm releases -------------------------"
echo "--V2 INDEXER--"
helm history $INDEXER_RELEASE_NAME -n ${{ env.MAINNET_COMMON_NAMESPACE_V2 }} --max 3
echo "--V2 OPERATOR--"
helm history $OPERATOR_RELEASE_NAME -n ${{ env.MAINNET_COMMON_NAMESPACE_V2 }} --max 3
echo "------------------------ Newly deployed image [same for all apps] ------------------------"
echo "$IMAGE_TAG"