From 590848634b8ddebf2be45edb16037b2f58bafc74 Mon Sep 17 00:00:00 2001 From: Kostas Demiris Date: Tue, 11 Jun 2024 16:07:22 +0300 Subject: [PATCH] deploy clis in staging2 --- .../develop/deploy-indexer/action.yaml | 18 ++--- .../develop/deploy-operator/action.yaml | 18 ++--- .../actions/develop/initial-setup/action.yaml | 70 +++++++++---------- .github/workflows/cicd_clis_develop.yaml | 11 ++- 4 files changed, 58 insertions(+), 59 deletions(-) diff --git a/.github/actions/develop/deploy-indexer/action.yaml b/.github/actions/develop/deploy-indexer/action.yaml index fc9396f1..91cc2d09 100644 --- a/.github/actions/develop/deploy-indexer/action.yaml +++ b/.github/actions/develop/deploy-indexer/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-indexer' runs: using: 'composite' steps: - - name: -> V2 -- Deploy INDEXER cli in staging [namespace -> ${{ env.STG_COMMON_NAMESPACE_V2 }}] + - name: -> V2 -- Deploy INDEXER cli in staging2 uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.INDEXER_RELEASE_NAME_V2 }} # notice @@ -110,16 +110,16 @@ runs: --set datadog_tags.version=$RELEASE_NAME-${{ env.STG_HOLOGRAPH_INDEXER_HELM_CHART_VERSION }} \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=1 \ + --set replicaCountAvalanche=0 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=1 \ + --set replicaCountBinance=0 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=1 \ - --set replicaCountArbitrum=1 \ - --set replicaCountOptimism=1 \ - --set replicaCountBase=1 \ - --set replicaCountLinea=1 \ - --set replicaCountZora=1 \ + --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/develop/deploy-operator/action.yaml b/.github/actions/develop/deploy-operator/action.yaml index c8d562b3..c1086c6d 100644 --- a/.github/actions/develop/deploy-operator/action.yaml +++ b/.github/actions/develop/deploy-operator/action.yaml @@ -2,7 +2,7 @@ name: 'deploy-operator' runs: using: 'composite' steps: - - name: -> V2 -- Deploy OPERATOR cli in staging [namespace -> ${{ env.STG_COMMON_NAMESPACE_V2 }}] + - name: -> V2 -- Deploy OPERATOR cli in staging2 uses: tensor-hq/eksctl-helm-action@main env: RELEASE_NAME: ${{ env.OPERATOR_RELEASE_NAME_V2 }} # notice @@ -103,16 +103,16 @@ runs: --set dev_rpc_config_values.address=$DEV_OPERATOR_V2_DEV_WALLET_ADDRESS \ \ --set autoscaling.enabled=false \ - --set replicaCountAvalanche=1 \ + --set replicaCountAvalanche=0 \ --set replicaCountPolygon=0 \ - --set replicaCountBinance=1 \ + --set replicaCountBinance=0 \ --set replicaCountMantle=0 \ - --set replicaCountEthereum=1 \ - --set replicaCountArbitrum=1 \ - --set replicaCountOptimism=1 \ - --set replicaCountBase=1 \ - --set replicaCountLinea=1 \ - --set replicaCountZora=1 \ + --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/develop/initial-setup/action.yaml b/.github/actions/develop/initial-setup/action.yaml index d48f87d4..30be33ca 100644 --- a/.github/actions/develop/initial-setup/action.yaml +++ b/.github/actions/develop/initial-setup/action.yaml @@ -25,41 +25,41 @@ runs: - name: Checkout the code uses: actions/checkout@v4 - # 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_develop.yaml b/.github/workflows/cicd_clis_develop.yaml index bb6909c0..76eeff6e 100644 --- a/.github/workflows/cicd_clis_develop.yaml +++ b/.github/workflows/cicd_clis_develop.yaml @@ -1,4 +1,4 @@ -name: Deploy V2 holoclis to staging[develop-v2] +name: Deploy V2 clis to staging2[develop-v2] permissions: id-token: write @@ -9,9 +9,9 @@ env: IAM_ROLE: arn:aws:iam::177635894328:role/Github_role_to_access_ECR ECR_REPOSITORY: holo-cli-dev # notice: the same for all cli apps # - IMAGE_TAG: dev-${{ github.sha }} + IMAGE_TAG: dev-761cf971c70a0397eab22a4049d8d01c1acf982f #dev-${{ github.sha }} # - CLUSTER_NAME: staging + CLUSTER_NAME: 'staging2' # AWS_KEY_ID: ${{ secrets.NEWSTAGE_USER_AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY: ${{ secrets.NEWSTAGE_USER_AWS_SECRET_ACCESS_KEY }} @@ -26,8 +26,6 @@ env: HOLOGRAPH_ENVIRONMENT: develop BLOCK_PROCESSING_VERSION: 'V2' # - STG_DOMAIN: 'holograph.xyz' # needed only for the health checks - # # SQS User [indexer_processor_sqs_user] # STG_COMMON_NAMESPACE_V2: 'develop-v2' @@ -42,7 +40,8 @@ env: on: push: branches: - - 'develop' +# - 'develop' + - 'feat/staging2-cli-deployment' # Excluded branches - '!testnet' - '!main'