Skip to content

Latest commit

 

History

History
67 lines (40 loc) · 1.81 KB

README.md

File metadata and controls

67 lines (40 loc) · 1.81 KB

SaaS

CI Infrastructure Quality Gate Status

Pre-requisites

DNS

A couple of steps to set some base resources for the main domain.

  • Add the HostedZone for the root domain: example.com
  • Create a Certificate for the domain and add its record to Route53

(Note: prod is done manual to keep the NS records the same and to not accidentally delete prod DNS via code)

Resources

An initial infrastructure cdk deploy is required to get some global resources deployed.

cd infrastructure && npx cdk bootstrap
npm run cdk-init -w infrastructure

This will create the following resources:

Resource Value Description
IAM Role saas-github-oidc-provider-role Assumed by GitHub Actions
ECR image <AWS_ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com/saas-base:latest Contains CLI tools: node, aws-cli, git, jq

Workflows

  1. ci.yml - runs code checks and deploys any CDK tool changes (deploy-cdk-tools.yml)
  2. deploy-cdk-env.yml - once CI is complete and merged in, deploys any dev CDK infrastrucutre changes

GitHub

Repository variables

  • BASE_IMAGE_NAME - saas-base
  • AWS_ACCOUNT_ID
  • AWS_REGION

Repository secrets

  • SONAR_TOKEN

Environments

  • dev
    • NODE_ENV - dev

AWS

To keep consistent with environment resource names and prefixes, use the following conventions:

  • Parameter Store prefix - /saas/dev/*
  • AWS resource names prefix - saas-dev-*