This repo serves as a starting point for creating the core infra, that will be later used by consumer apps.
Bootstrapping is a term use to get the core infra initially deployed manually so that it can take over and deploy its self. This can also be referred to as the chicken and egg situation.
As mentioned we will have to bootstrap the core infra once manually, then the CiCd stack will take over with the CdkPipeline (called DeployProject).
Steps:
- Clone this repo (https://github.com/cdk-cosmos/cosmos-core-cdk.git).
- Run
npm install
- Open
bin/main.ts
and change the project name fromDemo
to your core project name.- Also change cidr ranges for galaxies (Accounts)
- Also Change anything else as needed.
- Though We recommend you leave any solar system disabled during bootstrap (Enabled later).
- Aws Cli Login.
- Bootstrap Ci/Cd, run
npx cdk deploy Core-${Project}-${Account}-CiCd-SolarSystem
(Please change to your project and account name). - Bootstrap Accounts, run
npx cdk deploy Core-${Project}-${Account}-Galaxy
for each account that you have (you will need to change credentials). - Update git remote url
git remote set-url origin "https://git-codecommit.ap-southeast-2.amazonaws.com/v1/repos/core-cdk-repo"
(Please change region etc as required). - Enable your Solar Systems, commit, push and then deploy your changes using the pipeline (
git commit
andgit push
, run PipelineCore-Cdk-Pipeline
). - Your Done: Now use the core cdk pipeline to deploy any further changes to your app cdk code.
TODO: