Code Monkey home page Code Monkey logo

aws-cdk-zaloni-arena's Introduction

AWS CDK Infrastructure as Code for Zaloni Arena POC/MVP Prerequisites

This project is meant to automate the deployment of all the prerequsite resources required to deploy Zaloni Arena on AWS using AWS CDK in Typescript. The code deploys the resoruces into a new isolated VPC.

Architecture

Getting started

Clone this repository and issue the following commands to bootstrap cdk in your default aws profile account/region

cd aws-cdk-zaloni-arena
npm install -g yarn
npm install
npx cdk bootstrap --cloudformation-execution-policies \
  arn:aws:iam::aws:policy/AdministratorAccess

To install the stack with this configuration

npx cdk deploy dev/aws-cdk-zaloni-arena

CI/CD Pipeline

Create the AWS CodeCommit repository that our pipeline will use as source

aws codecommit create-repository --repository-name aws-cdk-zaloni-arena

Create a local branch and commit it to the AWS Code Commit repository

pip3 install git-remote-codecommit
git remote add pipeline codecommit://aws-cdk-zaloni-arena
git checkout -b pipeline
git add  cdk.context.json
git commit -m"added cdk context file"
git push pipeline pipeline 

Install the pipeline stack

npx cdk deploy --require-approval never

After the pipeline stack has been created, the pipeline itself will automatically be triggered but will not install anything as there are no configuration files. To create a stage for test or prod

cp ./config/dev.yaml ./config/test.yaml

Edit test.yaml to suit your setup and, if the stack will be installed in a different account or region, you would need to edit the env dictionary with the AWS account and region of choice. In addition you will need to bootstrap cdk in the said account/region

npx cdk bootstrap \
  --profile <test_account_profile> \
  --trust <pipeline_account_no> \
  --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
  aws://<test_account_no>/<test_region> 

And finally commit the test.yaml and cdk.context.json and push it to the pipeline repo

git add ./config/test.yaml cdk.context.json
git commit -m"adding test staging"
git push pipeline pipeline 

Wait for the pipeline to be triggered again and the test stack will be created. Look at each stack outputs in AWS CloudFormation for relevant information on how to access the resources created by the stacks.

Security

See CONTRIBUTING for more information.

License

This code is licensed under the MIT-0 License. See the LICENSE file.

aws-cdk-zaloni-arena's People

Contributors

amazon-auto avatar fzafar-zaloni avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.