Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ This repo include the followings:
* A cloudformation template that creates an pair of Elastic Beanstalk application and environment. The pair is to be used as the deployment target of a codepipeline.
* A Cloudformation template that creates an AWS codepipeline. The pipeline gets its source from a github repo, builds and tests using an AWS codebuild project, and deploys the application to an Elastic Beanstalk environment.

# Features of the Elastic Beanstalk environment:
## Features of the Elastic Beanstalk environment:
* An ELB fronts an autoscaling group.
* The ELB logs access to an S3 bucket.
* The TargetGroup response time triggers scaling action of the auto scaling group.
* Instance logs are streams to CloudWatch log.

# Features of the codepipeline:
## Features of the codepipeline:
* Test the application in a codebuild container.
* Deploy application only tests passes.

# Create the elastic beanstalk application and environment, and get the application and environment Ids
## Steps

### Step 1: Create the elastic beanstalk application and environment, and get the application and environment Ids
```
aws cloudformation deploy --stack-name <elastic beanstalk stack name> --template-file elasticBeanStalk_setup.yml \
--capabilities CAPABILITY_IAM \
Expand All @@ -25,7 +27,7 @@ aws cloudformation deploy --stack-name <elastic beanstalk stack name> --template
aws cloudformation describe-stacks --stack-name <stack_name> | jq ".Stacks[0].Outputs[]"
```

# Create the codepipeline
### Step 2: Create the codepipeline
```
aws cloudformation deploy --stack-name <codepipeline stack name> --template-file codepipeline_template.yml \
--capabilities CAPABILITY_IAM \
Expand All @@ -40,8 +42,8 @@ aws cloudformation deploy --stack-name <codepipeline stack name> --template-file
CloudWatchLogStream=<codebuild log stream>
```

# Test deployed application
### Step 3: Test deployed application
After pipeline creation, there will be an initial release. Open the URL for the Elastic Beanstalk environment to verify that the application is running.

# Update the application
### (Optional) Step 4: Update the application
Push a change to the application repo branch, the codepipeline should execute.