Skip to content

Commit

Permalink
1873 deploy passport to staging via new infra (passportxyz#1923)
Browse files Browse the repository at this point in the history
* update staging config to deploy new infra

* add passport vc secret

* update node version

* modify passport record

* modify passport record name

* update passport domain record

* enable create log group

* modify region for log group

---------

Co-authored-by: Larisa-Roxana Bucur <[email protected]>
  • Loading branch information
larisa17 and Larisa-Roxana Bucur authored Nov 21, 2023
1 parent 92dfa3b commit a86e5d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/iam-promote-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
with:
ref: ${{ github.event.inputs.commit }}
# run tests
- name: Use Node.js 16
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "yarn"
- name: Install Packages
run: yarn install
Expand All @@ -43,7 +43,7 @@ jobs:
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_STAGING }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGING }}
aws-region: us-east-1
aws-region: us-west-2

# login to docker for AWS
- name: Login to Amazon ECR
Expand Down Expand Up @@ -75,25 +75,26 @@ jobs:
cache-dependency-path: infra/package-lock.json
# Update the pulumi stack with new image
- run: |
cd aws
npm install
cd staging
pulumi stack select -c gitcoin/dpopp/staging
pulumi config -s gitcoin/dpopp/staging set aws:region us-east-1 --non-interactive
pulumi stack select -c gitcoin/passport/staging
pulumi config -s gitcoin/passport/staging set aws:region us-west-2 --non-interactive
working-directory: infra
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
- uses: pulumi/actions@v3
id: pulumi
with:
command: up
stack-name: gitcoin/dpopp/staging
stack-name: gitcoin/passport/staging
upsert: false
work-dir: infra/staging
work-dir: infra/aws
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_STAGING }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGING }}
DOCKER_GTC_PASSPORT_IAM_IMAGE: ${{secrets.ECR_URL_STAGING}}:${{ needs.build-and-test.outputs.dockerTag }}
ROUTE_53_ZONE: ${{ secrets.ROUTE53_ZONE_ID_STAGING }}
DOMAIN: ${{ secrets.DOMAIN_STAGING }}
ROUTE_53_DOMAIN: ${{ secrets.DOMAIN_STAGING }}
IAM_SERVER_SSM_ARN: ${{ secrets.IAM_SERVER_SSM_ARN_STAGING }}
PASSPORT_VC_SECRETS_ARN: ${{ secrets.PASSPORT_VC_SECRETS_ARN_STAGING }}
4 changes: 3 additions & 1 deletion infra/aws/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ const taskDefinition = new aws.ecs.TaskDefinition(`passport-iam`, {
logDriver: "awslogs",
options: {
"awslogs-group": "passport-iam", // "${serviceLogGroup.name}`,
"awslogs-region": `${regionId}`,
"awslogs-region": "us-west-2", // `${regionId}`,
"awslogs-create-group": "true",
"awslogs-stream-prefix": "iam"
}
},
Expand Down Expand Up @@ -444,3 +445,4 @@ const serviceRecord = new aws.route53.Record("passport-record", {
evaluateTargetHealth: true
}]
});

0 comments on commit a86e5d0

Please sign in to comment.