Please enable JavaScript.
Coggle requires JavaScript to display documents.
AWS Elastic Beanstalk (EB) Deploying Containers on EB (Agenda (Elastic…
AWS Elastic Beanstalk (EB)
Deploying Containers on EB
Agenda
Elastic Beanstalk vs. DIY
How to use Elastic Beanstalk
Multi-Container Docker with AWS EB
Recently Added Features
Use Cases
Websites
API Backends
Mobile Backends
Async. workers
Image Processor: Images uploaded to your website, worker tier will compress it as thumbnail and upload it
Benefits
Fast & Simple to begin
Developer Productivity
Impossible to outgrow
Complete resource control
Getting Started
Information required to deploy application
Region
Stack (container) type
Single instance OR Load Balanced with auto-scaling
Recommend Single instance to save money
Database (RDS)
How to deploy applications
Via AWS Management Console
Via AWS Toolkit for Eclipse and Visual Studio IDE
Via AWS SDK's and CLI
via EB command line interface
eb deploy
Deploy
Follow the prompts to configure the environment
Create your Elastic Beanstalk app
$eb init
Download sample application
$ git clone
https://gitclone.com/awslabs/eb-node-express-example.git
Install the AWS Elastic Beanstalk command line interface (EB CLI)
$pip install --upgrade awsebcli
create the resources and launch the application
$ eb create
Update
Update your code
Add & commit code to repository
$git add .
,
$git commit -m "v2.0"
,
$eb deploy
Open application once deployment completes.
$ eb open
Docker with AWS EB
Benefits
Automation of capacity provisioning, load balancing, scaling, and application health monitoring.
One stop management of your application in an environment that supports range of services that are integrated with Elastic Beanstalk, including but not limited to VPC, RDS, and IAM.
I've built my containers, how do I...?
Store my container images?
Amazon ECR
Beanstalk can interfact with any Docker Repository
Options include
Dockerhub, Amazon ECR, and private repos
Amazon ECR allows access control via IAM for fine-grained permissions
EB can automatically authenticate with ECR
Configure containers for Beanstalk?
Test my config?
Deploy to Beanstalk?
Update my application?
Deploy
IMPORATNT
: :!:Most important part of deploying docker containers through beanstalk, is the configuration file called
*Dockerrun.aws.json
AWSEBDockerrunVersion - Specifies the version number as the value "2" for multicontainer Docker environments
Volumes - Mount points in the container instance that a container can use
Container Definition - an array of container definitions
Choose the right BS container platform
Single Container Docker
Multi-Container Docker
Each environment has its own ECS Cluster
Supports a single ECS Task definition per environment
The ECS Task is defined in the Dockerrun.aws.json file
Uses a flood scheduling mechanism
Provides out of the box auto scalling for ECS Tasks
Update your application: Deployment Policies
Rolling
: Deploy new version in batches
Rolling with addtional batch:
Deploy in batches, +1 extra batch
Immutable:
Deploy to fresh group of instances
All at once:
Deploy new version to all instasnces simultaneously