Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scorer core vpc prd #543

Merged
merged 3 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/api-promote-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,20 +293,20 @@ jobs:
# Update the pulumi stack with new image
- run: |
npm install
cd prod
pulumi stack select -c gitcoin/prod/scorer-production
pulumi config -s gitcoin/prod/scorer-production set aws:region us-west-2 --non-interactive
cd aws
pulumi stack select -c gitcoin/passport-scorer/production
pulumi config -s gitcoin/passport-scorer/production 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/prod/scorer-production
command: preview
stack-name: gitcoin/passport-scorer/production
upsert: false
work-dir: infra/prod
work-dir: infra/aws
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
2 changes: 2 additions & 0 deletions infra/aws/Pulumi.production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config:
aws:region: us-west-2
12 changes: 7 additions & 5 deletions infra/aws/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const pagerDutyIntegrationEndpoint = `${process.env["PAGERDUTY_INTEGRATION_ENDPO

const coreInfraStack = new pulumi.StackReference(`gitcoin/core-infra/${stack}`);
const RDS_SECRET_ARN = coreInfraStack.getOutput("rdsSecretArn");
// coreInfraStack.getOutput("MIGRATION_HARDCODED_RDS_SECRET"); //coreInfraStack.getOutput("test_rdsSecretArn");// coreInfraStack.getOutput("rdsSecretArn"); // test_rdsSecretArn

const vpcID = coreInfraStack.getOutput("vpcId");
const vpcPrivateSubnetIds = coreInfraStack.getOutput("privateSubnetIds");
Expand Down Expand Up @@ -121,10 +122,11 @@ const privateSubnetSecurityGroup = new aws.ec2.SecurityGroup(
);

const scorerDbProxyEndpoint = coreInfraStack.getOutput("rdsProxyEndpoint");
// coreInfraStack.getOutput("MIGRATION_HARDCODED_DB_ENDPOINT"); // coreInfraStack.getOutput("test_rdsProxyEndpoint"); // coreInfraStack.getOutput("rdsProxyEndpoint"); // test_rdsProxyEndpoint
const scorerDbProxyEndpointConn = coreInfraStack.getOutput("rdsProxyConnectionUrl");
const readreplica0ConnectionUrl = coreInfraStack.getOutput(
"readreplica0ConnectionUrl"
);
// coreInfraStack.getOutput("MIGRATION_HARDCODED_DB_CONN_URL"); // coreInfraStack.getOutput("test_rdsProxyConnectionUrl"); // coreInfraStack.getOutput("rdsProxyConnectionUrl"); // test_rdsProxyConnectionUrl
const readreplica0ConnectionUrl = coreInfraStack.getOutput("readreplica0ConnectionUrl");
// coreInfraStack.getOutput("MIGRATION_HARDCODED_DB_CONN_URL_READ"); // coreInfraStack.getOutput("readreplica0ConnectionUrl"); // test_readreplica0ConnectionUrl

//////////////////////////////////////////////////////////////
// Set up ALB and ECS cluster
Expand All @@ -139,7 +141,7 @@ export const clusterId = cluster.id;
// Create bucket for access logs
const accessLogsBucket = new aws.s3.Bucket(`gitcoin-scorer-access-logs`, {
acl: "private",
forceDestroy: true,
forceDestroy: stack == "production" ? false: true,
});

const serviceAccount = aws.elb.getServiceAccount({});
Expand Down Expand Up @@ -706,7 +708,7 @@ let dbSubnetGroupId = `core-rds`;
const redashDb = new aws.rds.Instance(
"redash-db-0",
{
identifier: "redash-db-0",
identifier: "redash-db",
allocatedStorage: 20,
maxAllocatedStorage: 20,
engine: "postgres",
Expand Down
Loading