Skip to content

dstroppa/ecs-cdk-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Successful Deployment of CI/CD Pipelines with Containers and CDK

This is the code for the demo of the 'Successful Deployment of CI/CD Pipelines with Containers and CDK' session.

Setup

To setup the demo in your environment follow these steps:

  • Clone this repository to your local environment
    git clone https://github.com/dstroppa/ecs-cdk-demo
  • Create your own sample app repository and a Github OAuth token
  • Store your token in Secrets Manager
    aws secretsmanager create-secret --name /your/secret/github/token --secret-string '{"github-token":"MY_SECRET_TOKEN"}'
  • If you haven't done it already, install CDK
    npm install -g aws-cdk
  • From within the cdk folder, install the required npm packages
    cd ecs-cdk-demo/cdk
    npm install
  • Modify the ecs-cdk-demo/cdk/lib/cicd-stack.ts and add the details of your own repo and token
    // Source Action
    // NOTE: Replace 'owner' and 'oauthToken' with your own, see README.
    const sourceAction = new actions.GitHubSourceAction({
      actionName: "GitHub-Source",
      owner: "YOUR_OWN_GITHUB_ID",
      repo: "ecs-sample-app",
      branch: "master",
      oauthToken: cdk.SecretValue.secretsManager("/your/own/secret/github/token"),
      output: sourceOutput
    });
  • Deploy the app
    cdk deploy '*'

Cleanup

Once completed, make sure to delete the resource created with cdk destroy '*'.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published