From 84931adf8686d56a8cea34ede3a1b0a9d78f93a7 Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Fri, 21 Jun 2024 16:57:06 +0300 Subject: [PATCH 1/4] deploy CLIs V1 in mainnet prod2 --- .../mainnet/deploy-v1-indexer/action.yaml | 18 ++-- .../mainnet/deploy-v1-operator/action.yaml | 18 ++-- .../mainnet/deploy-v2-indexer/action.yaml | 22 ++--- .../mainnet/deploy-v2-operator/action.yaml | 22 ++--- .../actions/mainnet/initial-setup/action.yaml | 86 +++++++++--------- .github/workflows/cicd_clis_mainnet.yaml | 90 +++++++++---------- 6 files changed, 126 insertions(+), 130 deletions(-) diff --git a/.github/actions/mainnet/deploy-v1-indexer/action.yaml b/.github/actions/mainnet/deploy-v1-indexer/action.yaml index be1944f2..32bb4eb1 100644 --- a/.github/actions/mainnet/deploy-v1-indexer/action.yaml +++ b/.github/actions/mainnet/deploy-v1-indexer/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-v1-indexer' runs: using: 'composite' steps: - - name: -> V1 -- Deploy INDEXER cli in MAINNET [namespace -> ${{ env.MAINNET_COMMON_NAMESPACE }}] + - name: -> V1 -- Deploy INDEXER cli in MAINNET uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.INDEXER_RELEASE_NAME }} # notice @@ -102,16 +102,16 @@ runs: --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 replicaCountAvalanche=0 \ + --set replicaCountPolygon=0 \ + --set replicaCountBinance=0 \ + --set replicaCountMantle=0 \ + --set replicaCountEthereum=0 \ + --set replicaCountArbitrum=0 \ + --set replicaCountOptimism=0 \ --set replicaCountBase=0 \ --set replicaCountLinea=0 \ - --set replicaCountZora=1 \ + --set replicaCountZora=0 \ \ --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 \ diff --git a/.github/actions/mainnet/deploy-v1-operator/action.yaml b/.github/actions/mainnet/deploy-v1-operator/action.yaml index 28b3430a..4caefc01 100644 --- a/.github/actions/mainnet/deploy-v1-operator/action.yaml +++ b/.github/actions/mainnet/deploy-v1-operator/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-v1-operator' runs: using: 'composite' steps: - - name: -> V1 -- Deploy OPERATOR cli in MAINNET [namespace -> ${{ env.MAINNET_COMMON_NAMESPACE }}] + - name: -> V1 -- Deploy OPERATOR cli in MAINNET uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.OPERATOR_RELEASE_NAME }} # notice @@ -95,16 +95,16 @@ runs: --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 replicaCountAvalanche=0 \ + --set replicaCountPolygon=0 \ + --set replicaCountBinance=0 \ + --set replicaCountMantle=0 \ + --set replicaCountEthereum=0 \ + --set replicaCountArbitrum=0 \ + --set replicaCountOptimism=0 \ --set replicaCountBase=0 \ --set replicaCountLinea=0 \ - --set replicaCountZora=1 \ + --set replicaCountZora=0 \ \ --set datadog_tags.env=${{ env.CLUSTER_NAME }} \ --set datadog_tags.service=$RELEASE_NAME \ diff --git a/.github/actions/mainnet/deploy-v2-indexer/action.yaml b/.github/actions/mainnet/deploy-v2-indexer/action.yaml index 1cffa692..2dac708a 100644 --- a/.github/actions/mainnet/deploy-v2-indexer/action.yaml +++ b/.github/actions/mainnet/deploy-v2-indexer/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-v2-indexer' runs: using: 'composite' steps: - - name: -> V2 -- Deploy INDEXER cli in MAINNET [namespace -> ${{ env.MAINNET_COMMON_NAMESPACE_V2 }}] + - name: -> V2 -- Deploy INDEXER cli in MAINNET uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.INDEXER_RELEASE_NAME_V2 }} # notice @@ -107,16 +107,16 @@ runs: --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 replicaCountAvalanche=0 \ + --set replicaCountPolygon=0 \ + --set replicaCountBinance=0 \ + --set replicaCountMantle=0 \ + --set replicaCountEthereum=0 \ + --set replicaCountArbitrum=0 \ + --set replicaCountOptimism=0 \ + --set replicaCountBase=0 \ + --set replicaCountLinea=0 \ + --set replicaCountZora=0 \ \ --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 \ diff --git a/.github/actions/mainnet/deploy-v2-operator/action.yaml b/.github/actions/mainnet/deploy-v2-operator/action.yaml index 5abce690..5e3f6ae6 100644 --- a/.github/actions/mainnet/deploy-v2-operator/action.yaml +++ b/.github/actions/mainnet/deploy-v2-operator/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-v2-operator' runs: using: 'composite' steps: - - name: -> V2 -- Deploy OPERATOR cli in MAINNET [namespace -> ${{ env.MAINNET_COMMON_NAMESPACE_V2 }}] + - name: -> V2 -- Deploy OPERATOR cli in MAINNET uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.OPERATOR_RELEASE_NAME_V2 }} # notice @@ -100,16 +100,16 @@ runs: --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 replicaCountAvalanche=0 \ + --set replicaCountPolygon=0 \ + --set replicaCountBinance=0 \ + --set replicaCountMantle=0 \ + --set replicaCountEthereum=0 \ + --set replicaCountArbitrum=0 \ + --set replicaCountOptimism=0 \ + --set replicaCountBase=0 \ + --set replicaCountLinea=0 \ + --set replicaCountZora=0 \ \ --set datadog_tags.env=${{ env.CLUSTER_NAME }} \ --set datadog_tags.service=$RELEASE_NAME \ diff --git a/.github/actions/mainnet/initial-setup/action.yaml b/.github/actions/mainnet/initial-setup/action.yaml index 44a31aa9..8932306a 100644 --- a/.github/actions/mainnet/initial-setup/action.yaml +++ b/.github/actions/mainnet/initial-setup/action.yaml @@ -27,41 +27,41 @@ runs: - 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 - shell: bash - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache +# # 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 +# shell: bash +# 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 @@ -71,21 +71,19 @@ runs: 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 - + #- 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 @@ -95,10 +93,8 @@ runs: - 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 diff --git a/.github/workflows/cicd_clis_mainnet.yaml b/.github/workflows/cicd_clis_mainnet.yaml index e409d164..640b2eb8 100644 --- a/.github/workflows/cicd_clis_mainnet.yaml +++ b/.github/workflows/cicd_clis_mainnet.yaml @@ -1,4 +1,4 @@ -name: Deploy holoclis to prod[mainnet] +name: Deploy holoclis to prod2[mainnet] permissions: id-token: write @@ -7,11 +7,11 @@ permissions: 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 + ECR_REPOSITORY: holo-cli # - IMAGE_TAG: mainnet-${{ github.sha }} + IMAGE_TAG: mainnet-fa7c42b200a85dac05767e5ee20e1689bbf9f7f9 #mainnet-${{ github.sha }} # - CLUSTER_NAME: prod0 + CLUSTER_NAME: 'prod2' # AWS_KEY_ID: ${{ secrets.PROD0_CICD_USER_AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY: ${{ secrets.PROD0_CICD_USER_AWS_SECRET_ACCESS_KEY }} @@ -46,24 +46,24 @@ env: ####################################### ## notice: the trigger -#on: -# push: -# branches: -# - 'something' -# # Excluded branches -# - '!develop' -# - '!main' -# - '!master' -# notice: the trigger on: - pull_request: + push: branches: - - 'mainnet' - types: [closed] + - 'feat/deploy-mainnet-cli-into-prod2' + # Excluded branches + - '!develop' + - '!main' + - '!master' +# notice: the trigger +#on: +# pull_request: +# branches: +# - '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 + deploy-to-prod2-mainnet: +# if: github.event.pull_request.merged == true # so no workflow runs when some PR is just closed without being merged name: Deploy-on-mainnet runs-on: ubuntu-latest @@ -101,30 +101,30 @@ jobs: echo "------------------------ Newly deployed image [same for all clis] ------------------------ " echo "$IMAGE_TAG" - # --- Notice: V2 --- - - name: Deploy V2 Indexer [composite action] - uses: ./.github/actions/mainnet/deploy-v2-indexer - # - - name: Pause for 60 seconds - shell: bash - run: sleep 60 - # - - name: Deploy V2 Operator [composite action] - uses: ./.github/actions/mainnet/deploy-v2-operator - # - - 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" +# # --- Notice: V2 --- +# - name: Deploy V2 Indexer [composite action] +# uses: ./.github/actions/mainnet/deploy-v2-indexer +# # +# - name: Pause for 60 seconds +# shell: bash +# run: sleep 60 +# # +# - name: Deploy V2 Operator [composite action] +# uses: ./.github/actions/mainnet/deploy-v2-operator +# # +# - 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" From 576565f563dd45db90d29d9a62261f9f5464f76d Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Fri, 21 Jun 2024 17:01:00 +0300 Subject: [PATCH 2/4] deploy CLIs V2 in mainnet prod2 --- .github/workflows/cicd_clis_mainnet.yaml | 54 ++++++++++++------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/cicd_clis_mainnet.yaml b/.github/workflows/cicd_clis_mainnet.yaml index 640b2eb8..1f8e9583 100644 --- a/.github/workflows/cicd_clis_mainnet.yaml +++ b/.github/workflows/cicd_clis_mainnet.yaml @@ -101,30 +101,30 @@ jobs: echo "------------------------ Newly deployed image [same for all clis] ------------------------ " echo "$IMAGE_TAG" -# # --- Notice: V2 --- -# - name: Deploy V2 Indexer [composite action] -# uses: ./.github/actions/mainnet/deploy-v2-indexer -# # -# - name: Pause for 60 seconds -# shell: bash -# run: sleep 60 -# # -# - name: Deploy V2 Operator [composite action] -# uses: ./.github/actions/mainnet/deploy-v2-operator -# # -# - 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" + # --- Notice: V2 --- + - name: Deploy V2 Indexer [composite action] + uses: ./.github/actions/mainnet/deploy-v2-indexer + # + - name: Pause for 60 seconds + shell: bash + run: sleep 60 + # + - name: Deploy V2 Operator [composite action] + uses: ./.github/actions/mainnet/deploy-v2-operator + # + - 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" From 63a7d1aad0abc2879224bd8a9471042a2c9ea6ca Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Fri, 21 Jun 2024 17:24:44 +0300 Subject: [PATCH 3/4] ready for PR into mainnet --- .../mainnet/deploy-v1-indexer/action.yaml | 16 ++--- .../mainnet/deploy-v1-operator/action.yaml | 16 ++--- .../mainnet/deploy-v2-indexer/action.yaml | 20 +++--- .../mainnet/deploy-v2-operator/action.yaml | 20 +++--- .../actions/mainnet/initial-setup/action.yaml | 70 +++++++++---------- .github/workflows/cicd_clis_mainnet.yaml | 28 ++++---- 6 files changed, 85 insertions(+), 85 deletions(-) diff --git a/.github/actions/mainnet/deploy-v1-indexer/action.yaml b/.github/actions/mainnet/deploy-v1-indexer/action.yaml index 32bb4eb1..e124f435 100644 --- a/.github/actions/mainnet/deploy-v1-indexer/action.yaml +++ b/.github/actions/mainnet/deploy-v1-indexer/action.yaml @@ -102,16 +102,16 @@ runs: --set datadog_tags.version=$RELEASE_NAME-${{ env.MAINNET_HOLO_INDEXER_HELM_CHART_VERSION }} \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=0 \ - --set replicaCountPolygon=0 \ - --set replicaCountBinance=0 \ - --set replicaCountMantle=0 \ - --set replicaCountEthereum=0 \ - --set replicaCountArbitrum=0 \ - --set replicaCountOptimism=0 \ + --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=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 \ diff --git a/.github/actions/mainnet/deploy-v1-operator/action.yaml b/.github/actions/mainnet/deploy-v1-operator/action.yaml index 4caefc01..63c0ee56 100644 --- a/.github/actions/mainnet/deploy-v1-operator/action.yaml +++ b/.github/actions/mainnet/deploy-v1-operator/action.yaml @@ -95,16 +95,16 @@ runs: --set mainnet_rpc_config_values.address=$MAINNET_OPERATOR_V1_MAINNET_V1_WALLET_ADDRESS \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=0 \ - --set replicaCountPolygon=0 \ - --set replicaCountBinance=0 \ - --set replicaCountMantle=0 \ - --set replicaCountEthereum=0 \ - --set replicaCountArbitrum=0 \ - --set replicaCountOptimism=0 \ + --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=0 \ + --set replicaCountZora=1 \ \ --set datadog_tags.env=${{ env.CLUSTER_NAME }} \ --set datadog_tags.service=$RELEASE_NAME \ diff --git a/.github/actions/mainnet/deploy-v2-indexer/action.yaml b/.github/actions/mainnet/deploy-v2-indexer/action.yaml index 2dac708a..efac38a7 100644 --- a/.github/actions/mainnet/deploy-v2-indexer/action.yaml +++ b/.github/actions/mainnet/deploy-v2-indexer/action.yaml @@ -107,16 +107,16 @@ runs: --set datadog_tags.version=$RELEASE_NAME-${{ env.MAINNET_HOLO_INDEXER_HELM_CHART_VERSION }} \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=0 \ - --set replicaCountPolygon=0 \ - --set replicaCountBinance=0 \ - --set replicaCountMantle=0 \ - --set replicaCountEthereum=0 \ - --set replicaCountArbitrum=0 \ - --set replicaCountOptimism=0 \ - --set replicaCountBase=0 \ - --set replicaCountLinea=0 \ - --set replicaCountZora=0 \ + --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 \ diff --git a/.github/actions/mainnet/deploy-v2-operator/action.yaml b/.github/actions/mainnet/deploy-v2-operator/action.yaml index 5e3f6ae6..302107c8 100644 --- a/.github/actions/mainnet/deploy-v2-operator/action.yaml +++ b/.github/actions/mainnet/deploy-v2-operator/action.yaml @@ -100,16 +100,16 @@ runs: --set mainnet_rpc_config_values.address=$MAINNET_OPERATOR_V2_MAINNET_V2_WALLET_ADDRESS \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=0 \ - --set replicaCountPolygon=0 \ - --set replicaCountBinance=0 \ - --set replicaCountMantle=0 \ - --set replicaCountEthereum=0 \ - --set replicaCountArbitrum=0 \ - --set replicaCountOptimism=0 \ - --set replicaCountBase=0 \ - --set replicaCountLinea=0 \ - --set replicaCountZora=0 \ + --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 \ diff --git a/.github/actions/mainnet/initial-setup/action.yaml b/.github/actions/mainnet/initial-setup/action.yaml index 8932306a..24e54e2f 100644 --- a/.github/actions/mainnet/initial-setup/action.yaml +++ b/.github/actions/mainnet/initial-setup/action.yaml @@ -27,41 +27,41 @@ runs: - 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 -# shell: bash -# run: | -# rm -rf /tmp/.buildx-cache -# mv /tmp/.buildx-cache-new /tmp/.buildx-cache + # 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 + shell: bash + 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 diff --git a/.github/workflows/cicd_clis_mainnet.yaml b/.github/workflows/cicd_clis_mainnet.yaml index 1f8e9583..1be2dde8 100644 --- a/.github/workflows/cicd_clis_mainnet.yaml +++ b/.github/workflows/cicd_clis_mainnet.yaml @@ -9,7 +9,7 @@ env: IAM_ROLE: arn:aws:iam::177635894328:role/Github_role_to_access_ECR ECR_REPOSITORY: holo-cli # - IMAGE_TAG: mainnet-fa7c42b200a85dac05767e5ee20e1689bbf9f7f9 #mainnet-${{ github.sha }} + IMAGE_TAG: mainnet-${{ github.sha }} # CLUSTER_NAME: 'prod2' # @@ -46,24 +46,24 @@ env: ####################################### ## notice: the trigger -on: - push: - branches: - - 'feat/deploy-mainnet-cli-into-prod2' - # Excluded branches - - '!develop' - - '!main' - - '!master' -# notice: the trigger #on: -# pull_request: +# push: # branches: -# - 'mainnet' -# types: [closed] +# - 'feat/deploy-mainnet-cli-into-prod2' +# # Excluded branches +# - '!develop' +# - '!main' +# - '!master' +# notice: the trigger +on: + pull_request: + branches: + - 'mainnet' + types: [closed] jobs: deploy-to-prod2-mainnet: -# if: github.event.pull_request.merged == true # so no workflow runs when some PR is just closed without being merged + if: github.event.pull_request.merged == true # so no workflow runs when some PR is just closed without being merged name: Deploy-on-mainnet runs-on: ubuntu-latest From ad45838ef6ceeeb2c5c8a7775886a8889c141755 Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Wed, 26 Jun 2024 14:37:54 +0300 Subject: [PATCH 4/4] updated the helm charts --- .github/workflows/cicd_clis_mainnet.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd_clis_mainnet.yaml b/.github/workflows/cicd_clis_mainnet.yaml index 1be2dde8..e45caaf4 100644 --- a/.github/workflows/cicd_clis_mainnet.yaml +++ b/.github/workflows/cicd_clis_mainnet.yaml @@ -36,11 +36,11 @@ env: MAINNET_COMMON_NAMESPACE: 'mainnet' MAINNET_COMMON_NAMESPACE_V2: 'mainnet-v2' ####################################### - MAINNET_HOLO_INDEXER_HELM_CHART_VERSION: 0.1.88 + MAINNET_HOLO_INDEXER_HELM_CHART_VERSION: 0.1.89 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.20 + MAINNET_HOLO_OPERATOR_HELM_CHART_VERSION: 0.1.21 OPERATOR_RELEASE_NAME: 'blondie-operator-mainnet' # format -> [release_name]-operator-[env] OPERATOR_RELEASE_NAME_V2: 'blondie-operator-mainnet-v2' #######################################