This project is a CDK TypeScript implementation for a DevOps web application infrastructure.
The DevOps Web project uses AWS CDK to define and provision cloud infrastructure resources for a web application. It includes components for serverless computing, database management, and CI/CD pipelines.
- Node.js (v14.x or later)
- AWS CLI configured with appropriate credentials
- AWS CDK CLI (v2.x)
-
Clone the repository:
git clone https://github.com/your-repo/devops-web.git cd devops-web
-
Install dependencies:
npm install
vi cdk.json
Example:
- githubOwner: animesh303
- githubRepo": tactictoe
- githubBranch": main
- githubToken": Refer to Generate a GitHub Repository Personal Access Token
npx cdk deploy
Check the output of the CloudFormation Stack for Website URL.
bin/devops-web.ts
: Entry point for the CDK applib/devops-web-stack.ts
: Main stack definition
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsnpx cdk deploy
deploy this stack to your default AWS account/regionnpx cdk diff
compare deployed stack with current statenpx cdk synth
emits the synthesized CloudFormation template
This project is licensed under the MIT License - see the LICENSE file for details.
Log in to GitHub: Go to GitHub and log in to your account.
In the top right corner, click on your profile picture. Select Settings. Scroll down and click Developer settings.
In the left-hand menu, select Personal access tokens > Tokens (classic). Click on the Generate new token button.
Note: For AWS CodePipeline, the token must have the following permissions:
- repo: Grants access to repositories. This is essential for CodePipeline to read and clone the GitHub repository.
- admin: Allows CodePipeline to set up a webhook to trigger the pipeline when new commits are pushed. Optionally, you can set the expiration date for the token.
Once you have set the necessary permissions, click the Generate token button at the bottom of the page.
Once the token is generated, make sure to copy it. You won’t be able to view it again after leaving the page.