Demonstrates creation of a CI CD pipeline in AWS for a Angular boot application.
The sample Angular Boot application used for this exercise resides at this location
https://github.com/nj11/Angular_starter
The AWS CI / CD tools used are:
- AWS CodeBuild
- AWS CodePipeline
- AWS Beanstalk for deployment environment.
Amazon developer console account login.If you don't have an account create it here.
https://aws.amazon.com/console/
- GitHub --> Code Repository
- AWS Beanstalk --> Deployment environment
- AWS CodeBuild --> Build tool that builds artifacts from source code
- S3 --> Artifacts are staged here after build.
- AWS CodePipeline --> Code checked into Github triggers a AWS build which deploys artifacts to S3 and then deploys them to AWS Beanstalk environment.
- Sign in to to AWS console using your account .Navigate to
My Account--> AWS Management Console.
Go toServices-->Elastic beanstalk
and then selectCreate a new application.
-
Select the appropriate tier.In this case we are selecting Web server environment.
-
Enter your application details.
- Enter application platform, in this case it's Java
-
For now choose sample application.We will upload and deploy application jar later.
-
Environment creation takes a few minutes.
- Once the environment is ready, click on the enviornment name link as highlighted.
- You can check the environment page, along with configuration details like enviornment variables,logs and application URL.
- Make sure the buildspec.yml exists in the root folder of your github project
- Select Developer Tools --> CodePipeline--> Create Pipeline
- Enter pipeline name and service role for this pipeline.
- Enter Artifact store and enryption key.Defaults are used here.
- Enter source code location.GitHub in this case.Can also select AWS CodeCommit if that is the case.
- Create a build stage.
- Enter build configuration details.
- Enter deploy stage details.Deploy provider is AWS Beanstalk.Enter Beanstalk environment and application name to deploy to.
- Review and create pipeline.
- Pipeline runs after it's created.Anytime source code changes,pipeline is triggered automatically.
- AWS S3 stores the build and deploy artifacts for this pipeline.