Skip to content

Commit

Permalink
moving gateway to us-e-2
Browse files Browse the repository at this point in the history
  • Loading branch information
nymd committed Mar 31, 2021
1 parent e4bb5a9 commit 7106b5d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/production-ap-southeast-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Production Deployment ap-southeast-1

on:
push:
branches: [ master ]
branches: [ master-off ]

jobs:
deploy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
aws-region: us-east-2

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Make envfile us-east-1
- name: Make envfile us-east-2
uses: SpicyPizza/create-envfile@v1
with:
envkey_GATEWAY_CLIENT_PRIVATE_KEY: ${{ secrets.POCKET_NETWORK_PRODUCTION_CLIENT_PRIVATE_KEY }}
Expand All @@ -37,10 +37,10 @@ jobs:
envkey_AWS_S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
envkey_AWS_S3_LOGS_BUCKET: pocket-gateway
envkey_AWS_S3_LOGS_FOLDER: logs/mainnet
envkey_AWS_S3_LOGS_REGION: us-east-1
envkey_AWS_S3_LOGS_REGION: us-east-2
envkey_DISPATCH_URL: https://node1.mainnet.pokt.network,https://node2.mainnet.pokt.network,https://node3.mainnet.pokt.network,https://node4.mainnet.pokt.network,https://node5.mainnet.pokt.network,https://node6.mainnet.pokt.network,https://node7.mainnet.pokt.network,https://node8.mainnet.pokt.network,https://node9.mainnet.pokt.network,https://node10.mainnet.pokt.network,https://node11.mainnet.pokt.network,https://node12.mainnet.pokt.network,https://node13.mainnet.pokt.network,https://node14.mainnet.pokt.network,https://node15.mainnet.pokt.network,https://node16.mainnet.pokt.network,https://node17.mainnet.pokt.network,https://node18.mainnet.pokt.network,https://node19.mainnet.pokt.network,https://node20.mainnet.pokt.network
envkey_FALLBACK_URL: https://alt1.mainnet.pokt.network,https://alt2.mainnet.pokt.network,https://alt3.mainnet.pokt.network,https://alt4.mainnet.pokt.network,https://alt5.mainnet.pokt.network,https://alt6.mainnet.pokt.network,https://alt7.mainnet.pokt.network,https://alt8.mainnet.pokt.network,https://alt9.mainnet.pokt.network,https://alt10.mainnet.pokt.network
envkey_REDIS_ENDPOINT: gateway-ro.ydxbbz.ng.0001.use1.cache.amazonaws.com:6379
envkey_REDIS_ENDPOINT: gateway.pzdhdc.ng.0001.use2.cache.amazonaws.com:6379
envkey_REDIS_PORT: 6379
envkey_POCKET_SESSION_BLOCK_FREQUENCY: 4
envkey_POCKET_BLOCK_TIME: 1038000
Expand All @@ -58,18 +58,18 @@ jobs:
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
- name: Fill in the new image ID / us-east-1
id: task-def-us-east-1
- name: Fill in the new image ID / us-east-2
id: task-def-us-east-2
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: pocket-gateway/ecs-task-us-east-1.json
task-definition: pocket-gateway/ecs-task-us-east-2.json
container-name: gateway
image: ${{ steps.build-image.outputs.image }}

- name: Deploy / us-east-1
- name: Deploy / us-east-2
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def-us-east-1.outputs.task-definition }}
task-definition: ${{ steps.task-def-us-east-2.outputs.task-definition }}
service: gateway-service
cluster: gateway
wait-for-service-stability: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production-us-west-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Production Deployment us-west-2

on:
push:
branches: [ master ]
branches: [ master-off ]

jobs:
deploy:
Expand Down
4 changes: 2 additions & 2 deletions pocket-gateway/ecs-task-ap-southeast-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"environment": [],
"command": [],
"linuxParameters": null,
"cpu": 0,
"cpu": 4096,
"resourceRequirements": null,
"ulimits": [
{
Expand All @@ -39,7 +39,7 @@
"workingDirectory": null,
"dockerSecurityOptions": null,
"memory": null,
"memoryReservation": 7168,
"memoryReservation": 8192,
"volumesFrom": [],
"stopTimeout": null,
"image": "059424750518.dkr.ecr.us-west-2.amazonaws.com/gateway:latest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"secretOptions": null,
"options": {
"awslogs-group": "/ecs/gateway",
"awslogs-region": "us-east-1",
"awslogs-region": "us-east-2",
"awslogs-stream-prefix": "ecs"
}
},
Expand All @@ -25,7 +25,7 @@
"environment": [],
"command": [],
"linuxParameters": null,
"cpu": 0,
"cpu": 4096,
"resourceRequirements": null,
"ulimits": [
{
Expand All @@ -42,7 +42,7 @@
"memoryReservation": 8192,
"volumesFrom": [],
"stopTimeout": null,
"image": "059424750518.dkr.ecr.us-west-2.amazonaws.com/gateway:latest",
"image": "059424750518.dkr.ecr.us-east-2.amazonaws.com/gateway:latest",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
Expand Down
4 changes: 2 additions & 2 deletions pocket-gateway/ecs-task-us-west-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"environment": [],
"command": [],
"linuxParameters": null,
"cpu": 0,
"cpu": 4096,
"resourceRequirements": null,
"ulimits": [
{
Expand All @@ -39,7 +39,7 @@
"workingDirectory": null,
"dockerSecurityOptions": null,
"memory": null,
"memoryReservation": 7168,
"memoryReservation": 8192,
"volumesFrom": [],
"stopTimeout": null,
"image": "059424750518.dkr.ecr.us-west-2.amazonaws.com/gateway:latest",
Expand Down

0 comments on commit 7106b5d

Please sign in to comment.