To setup the project from scratch, there are a few steps to take and a few pre-requirements.
- A pulumi account with an organization
- Locally installed pulumi cli tool
- AWS account with configured local access for cli tools
- Create a new pulumi access token to be used in the github actions
- In the github organization settings, create a new secret named
PULUMI_ACCESS_TOKENand paste the pulumi access token there- Settings -> Security -> Secrets and Variables -> New organization secret
- In the github organization settings, create a new secret named
AWS_REGIONand paste the intended default AWS region there- Settings -> Security -> Secrets and Variables -> New organization secret
- Create a new github personal access token (PAT) to be used in the github actions
- Settings -> Developer settings -> Personal access tokens -> Generate new token
- Give the token a name and select the
reposcope - The intent of this token is to grant access to the projects repository composite actions to use github cli tool to initiate deployments on other organization repositories
- In the projects repository settings page, create a repository secret named
VFD_PROJECTS_PATand paste the github personal access token (PAT) there - In each repository (Phase 1 and/or Phase 2) github page, create a new deployment environment that is named to match the intented stack name (eg. dev, staging)
- Settings -> Environments -> New environment
- In the infrastructure repository with a command line tool, create a new stack that matches the name of the deployment environment:
pulumi stack select <pulumi-organization>/<stack-name> --create- eg.
pulumi stack select virtualfinland/dev --create
- eg.
- In the infrastructure repository with a command line tool, manually deploy the stack:
pulumi up- this will create the AWS resources needed for the CI/CD pipeline to work for the rest of the repositories
- In the projects repository github actions page run the Phase 1 or Phase 2 deployment.
- The
Phase 2includes thePhase 1, so there is no need to run thePhase 1deployment if thePhase 2is run.
- If there is a custom domain name configured with the Access Finland MVP deployments live environment, the initial deployment flow of the Access Finland MVP app will fail at the step
Initial deployment domain checkas the created SSL-certificates need verification that takes some time to actualize. - To continue the
Phase 2github actions-flow, re-run the flow (for speed, choose the "failed jobs only" option) only after the SSL-certificates have been verified by AWS. Read more at af-mvp app deployment instructions. - After that, deploy the infrastructure-project once more to finish the email service domain name related configurations. Read more at infrastructure email instructions.
- In the monitoring repository reconfigure alerts etc. and redeploy as need be.
- In AWS Console, configure the access credentials to the AWS Cognito user and indentity pool created by the Access Finland MVP app. Read more at mvp-app deployment instructions.