Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

liatrio/cloudformation-tomcat-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS CloudFormation/CodePipeline Example

This project uses CloudFormation to spin up a CICD pipeline for Java applications using CodeBuild, CodeDeploy, CodePipeline, and an EC2 instance.

Launching the Stack

  1. Before launching the stack, create a fork of this sample java application. It contains specifications on how CodeBuild and CodeDeploy should build and deploy the app.

  2. Launch the CloudFormation stack by clicking this button: Launch Stack

  3. Fill in the parameters and follow the prompts to complete the launch. For the GitHub user/repo/branch provide your GitHub username and the master branch of the fork you created in step 1. If you don't have a GitHub OAuth token, you can generate one here.

  4. Watch and wait while CloudFormation provisions all of the resources required this stack. The process should take roughly 5 minutes.

CloudFormation Outputs

  1. When the stack is complete, retrieve the CodePipeline url from the output tab and navigate to it. A new revision will have triggered and should be making its way down the pipeline.

CodePipeline pre-approval

  1. After the revision builds, click "Approve" on the approval gate to deploy it to the EC2 server

CodePipeline post-deployment

  1. When the deployment completes, retrieve the EC2 instance public DNS name from the output tab of the CloudFormation stack. Then navigate to /petclinic.

Petclinic application

Programmatically Approving a Pipeline Manual-approval-step

See put-approval-result directory for three ways to approve a manual approval step in a Code Pipeline.
The first way can be ran via Python 2.7 anywhere basic.py.
viaAlexa.py returns a result that is configured for Alexa.
viaIoT.py is meant to be utilized in a Lambda function triggered by an IoT Button.

About

A cloudformation template for building and deploying java servlet applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published