Skip to content

Commit

Permalink
deploy clis in staging2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostas Demiris committed Jun 11, 2024
1 parent 761cf97 commit 5908486
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 59 deletions.
18 changes: 9 additions & 9 deletions .github/actions/develop/deploy-indexer/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down
18 changes: 9 additions & 9 deletions .github/actions/develop/deploy-operator/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down
70 changes: 35 additions & 35 deletions .github/actions/develop/initial-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/cicd_clis_develop.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy V2 holoclis to staging[develop-v2]
name: Deploy V2 clis to staging2[develop-v2]

permissions:
id-token: write
Expand All @@ -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 }}
Expand All @@ -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'
Expand All @@ -42,7 +40,8 @@ env:
on:
push:
branches:
- 'develop'
# - 'develop'
- 'feat/staging2-cli-deployment'
# Excluded branches
- '!testnet'
- '!main'
Expand Down

0 comments on commit 5908486

Please sign in to comment.