SlideShare a Scribd company logo
1 of 14
Dockerizing & Orchestrating
a Flask Application on Elastic
Beanstalk
Arnold Okoth - Andela
What is Docker?
● Application containerization platform.
○ Package. Run Isolated. Shared OS.
● Eases application deployment.
● Uniform environment across multiple computers.
● Benefits:
○ Development teams run applications on identical environments.
○ Isolates applications dependencies from OS dependencies.
Docker workflow
● The Docker workflow can be summarized as follows:
Docker workflow continued...
● Dockerfile: Creates a repeatable and portable way of building a Docker image. It is passed
to the `docker build` command to create an image.
● Image: An image is an inert, immutable file that is essentially a snapshot of a container.
● Container: A container is a running image. The image is passed to the `docker run` with
different options to create a running instance of the image.
Demo Application
● Really basic flask web application with 2 routes.
○ `/`
○ `/hello/<string:name>`
● Walkthrough existing Dockerfile
● Build & run image.
The Dockerfile
Dockerfile Directives
● FROM: This directive initializes a new build stage and sets the base image for subsequent
instructions.
● RUN: Execute any command in a new layer on top of the current image and commit the
results.
● COPY: Copies files or directories from source (first argument) and adds them to the file
system of the container at the destination path (second argument).
● WORKDIR: Sets the working directory for any directive that follows it in the Dockerfile.
● ENTRYPOINT: Allows you to configure a container that will run as an executable. In our
case we run our application.
The Image
● As depicted on our Docker workflow chart, the image comes about as a result of instructing
the Docker engine to build the contents of our Dockerfile.
● This is accomplished using the `docker build` command.
The Container
● The container is a running image. We achieve this by passing the image we built to `docker
run` command.
Elastic Beanstalk
● Service that allows quick deployment and easy management of applications on AWS.
● It allows developers to upload an application while it automatically handles capacity
provisioning, load balancing, monitoring and scaling.
● Elastic Beanstalk leverages different services on AWS e.g. S3, Elastic Load Balancing,
CloudWatch etc. and there are no extra costs incurred when using EB.
● There are numerous ways of interacting with EB i.e. Amazon Web Console, EB CLI & the
API. We will be using the EB CLI and the Amazon Web Console in the demo.
EB Application
● Elastic Beanstalk is made up of different components that work together to enable you to
easily manage and deploy your application. The first component is the application.
● An application is a logical collection of EB components including environments, versions
and environment configurations.
● To create an application we run: `eb init`
Dockerrun.aws.json
● A Dockerrun.aws.json file describes how to deploy a Docker container as an Elastic
Beanstalk application. This JSON file is specific to Elastic Beanstalk.
NB: There are certain rules to using this file as specified in the official documentation. One that
stood out was this; “When you provide both files i.e. Dockerfile and Dockerrun.aws.json, do not
specify an image in the Dockerrun.aws.json file. Elastic Beanstalk builds and uses the image
described in the Dockerfile and ignores the image specified in the Dockerrun.aws.json file”
EB Environment
● An environment is a version that is deployed onto AWS resources.
● Each environment runs only a single application version at a time, however you can run the
same version or different versions in many environments at the same time.
● When you create an environment, Elastic Beanstalk provisions the resources needed to run
the application version you specified. An application version refers to a specific, labeled
iteration of deployable code for a web application.
● We create an environment using: `eb create`
Q & A.
arnold.okoth@andela.com
https://github.com/arnoldokoth

More Related Content

What's hot

Docker compose and swarm
Docker compose and swarmDocker compose and swarm
Docker compose and swarmTanmay Mehra
 
Docker introduction
Docker introductionDocker introduction
Docker introductionGourav Varma
 
Introduction to Dockers and containers
Introduction to Dockers and containers Introduction to Dockers and containers
Introduction to Dockers and containers Sri Padaraj M S
 
Docker Global Hack Day #3
Docker Global Hack Day #3 Docker Global Hack Day #3
Docker Global Hack Day #3 Docker, Inc.
 
Docker Platform 1.9
Docker Platform 1.9Docker Platform 1.9
Docker Platform 1.9Docker, Inc.
 
OpenStack with-docker-team-17
OpenStack with-docker-team-17OpenStack with-docker-team-17
OpenStack with-docker-team-17Jaspreet Singh
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET DevelopersTaswar Bhatti
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET DevelopersTaswar Bhatti
 
Docker with Selenium by Thirumalai Vignesh
Docker with Selenium by Thirumalai VigneshDocker with Selenium by Thirumalai Vignesh
Docker with Selenium by Thirumalai VigneshSoftware Testing Board
 
Docker lightning
Docker lightningDocker lightning
Docker lightningroadster43
 
Introduction to Docker - Getting Started with Docker
Introduction to Docker - Getting Started with DockerIntroduction to Docker - Getting Started with Docker
Introduction to Docker - Getting Started with DockerAiyana Shukla
 
Docker introduction
Docker introductionDocker introduction
Docker introductionAnssi Soinu
 
Docker get started
Docker get startedDocker get started
Docker get startedTruong LD
 

What's hot (20)

Docker - fundamental
Docker  - fundamentalDocker  - fundamental
Docker - fundamental
 
Docker compose and swarm
Docker compose and swarmDocker compose and swarm
Docker compose and swarm
 
Docker introduction - Part 1
Docker introduction - Part 1Docker introduction - Part 1
Docker introduction - Part 1
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Introduction to Dockers and containers
Introduction to Dockers and containers Introduction to Dockers and containers
Introduction to Dockers and containers
 
JOSA TechTalks - Docker in Production
JOSA TechTalks - Docker in ProductionJOSA TechTalks - Docker in Production
JOSA TechTalks - Docker in Production
 
Docker Global Hack Day #3
Docker Global Hack Day #3 Docker Global Hack Day #3
Docker Global Hack Day #3
 
Docker Platform 1.9
Docker Platform 1.9Docker Platform 1.9
Docker Platform 1.9
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
OpenStack with-docker-team-17
OpenStack with-docker-team-17OpenStack with-docker-team-17
OpenStack with-docker-team-17
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
Docker with Selenium by Thirumalai Vignesh
Docker with Selenium by Thirumalai VigneshDocker with Selenium by Thirumalai Vignesh
Docker with Selenium by Thirumalai Vignesh
 
Docker basics
Docker basicsDocker basics
Docker basics
 
Docker lightning
Docker lightningDocker lightning
Docker lightning
 
Introduction to Docker - Getting Started with Docker
Introduction to Docker - Getting Started with DockerIntroduction to Docker - Getting Started with Docker
Introduction to Docker - Getting Started with Docker
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker mentorweek
Docker mentorweekDocker mentorweek
Docker mentorweek
 
Docker get started
Docker get startedDocker get started
Docker get started
 

Similar to Py Con 2017

[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101Naukri.com
 
Rome .NET Conference 2024 - Remote Conference
Rome .NET Conference 2024  - Remote ConferenceRome .NET Conference 2024  - Remote Conference
Rome .NET Conference 2024 - Remote ConferenceHamida Rebai Trabelsi
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tipsSamuel Chow
 
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Binary Studio
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with dockerMichelle Liu
 
Introduction to Containers & Diving a little deeper into the benefits of Con...
 Introduction to Containers & Diving a little deeper into the benefits of Con... Introduction to Containers & Diving a little deeper into the benefits of Con...
Introduction to Containers & Diving a little deeper into the benefits of Con...Synergetics Learning and Cloud Consulting
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Simon Storm
 
Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2Binary Studio
 
Using Docker and Elastic Beanstalk in Production
Using Docker and Elastic Beanstalk in ProductionUsing Docker and Elastic Beanstalk in Production
Using Docker and Elastic Beanstalk in ProductionRyan Marr
 
Docker
DockerDocker
Dockersubbul
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataInfluxData
 

Similar to Py Con 2017 (20)

Docker
DockerDocker
Docker
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Rome .NET Conference 2024 - Remote Conference
Rome .NET Conference 2024  - Remote ConferenceRome .NET Conference 2024  - Remote Conference
Rome .NET Conference 2024 - Remote Conference
 
Let's dockerize
Let's dockerizeLet's dockerize
Let's dockerize
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2
 
Docker
DockerDocker
Docker
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with docker
 
Docker @ Atlogys
Docker @ AtlogysDocker @ Atlogys
Docker @ Atlogys
 
Introduction to Containers & Diving a little deeper into the benefits of Con...
 Introduction to Containers & Diving a little deeper into the benefits of Con... Introduction to Containers & Diving a little deeper into the benefits of Con...
Introduction to Containers & Diving a little deeper into the benefits of Con...
 
docker.pdf
docker.pdfdocker.pdf
docker.pdf
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14
 
Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2
 
Using Docker and Elastic Beanstalk in Production
Using Docker and Elastic Beanstalk in ProductionUsing Docker and Elastic Beanstalk in Production
Using Docker and Elastic Beanstalk in Production
 
Docker
DockerDocker
Docker
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxData
 

Recently uploaded

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 

Recently uploaded (20)

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 

Py Con 2017

  • 1. Dockerizing & Orchestrating a Flask Application on Elastic Beanstalk Arnold Okoth - Andela
  • 2. What is Docker? ● Application containerization platform. ○ Package. Run Isolated. Shared OS. ● Eases application deployment. ● Uniform environment across multiple computers. ● Benefits: ○ Development teams run applications on identical environments. ○ Isolates applications dependencies from OS dependencies.
  • 3. Docker workflow ● The Docker workflow can be summarized as follows:
  • 4. Docker workflow continued... ● Dockerfile: Creates a repeatable and portable way of building a Docker image. It is passed to the `docker build` command to create an image. ● Image: An image is an inert, immutable file that is essentially a snapshot of a container. ● Container: A container is a running image. The image is passed to the `docker run` with different options to create a running instance of the image.
  • 5. Demo Application ● Really basic flask web application with 2 routes. ○ `/` ○ `/hello/<string:name>` ● Walkthrough existing Dockerfile ● Build & run image.
  • 7. Dockerfile Directives ● FROM: This directive initializes a new build stage and sets the base image for subsequent instructions. ● RUN: Execute any command in a new layer on top of the current image and commit the results. ● COPY: Copies files or directories from source (first argument) and adds them to the file system of the container at the destination path (second argument). ● WORKDIR: Sets the working directory for any directive that follows it in the Dockerfile. ● ENTRYPOINT: Allows you to configure a container that will run as an executable. In our case we run our application.
  • 8. The Image ● As depicted on our Docker workflow chart, the image comes about as a result of instructing the Docker engine to build the contents of our Dockerfile. ● This is accomplished using the `docker build` command.
  • 9. The Container ● The container is a running image. We achieve this by passing the image we built to `docker run` command.
  • 10. Elastic Beanstalk ● Service that allows quick deployment and easy management of applications on AWS. ● It allows developers to upload an application while it automatically handles capacity provisioning, load balancing, monitoring and scaling. ● Elastic Beanstalk leverages different services on AWS e.g. S3, Elastic Load Balancing, CloudWatch etc. and there are no extra costs incurred when using EB. ● There are numerous ways of interacting with EB i.e. Amazon Web Console, EB CLI & the API. We will be using the EB CLI and the Amazon Web Console in the demo.
  • 11. EB Application ● Elastic Beanstalk is made up of different components that work together to enable you to easily manage and deploy your application. The first component is the application. ● An application is a logical collection of EB components including environments, versions and environment configurations. ● To create an application we run: `eb init`
  • 12. Dockerrun.aws.json ● A Dockerrun.aws.json file describes how to deploy a Docker container as an Elastic Beanstalk application. This JSON file is specific to Elastic Beanstalk. NB: There are certain rules to using this file as specified in the official documentation. One that stood out was this; “When you provide both files i.e. Dockerfile and Dockerrun.aws.json, do not specify an image in the Dockerrun.aws.json file. Elastic Beanstalk builds and uses the image described in the Dockerfile and ignores the image specified in the Dockerrun.aws.json file”
  • 13. EB Environment ● An environment is a version that is deployed onto AWS resources. ● Each environment runs only a single application version at a time, however you can run the same version or different versions in many environments at the same time. ● When you create an environment, Elastic Beanstalk provisions the resources needed to run the application version you specified. An application version refers to a specific, labeled iteration of deployable code for a web application. ● We create an environment using: `eb create`

Editor's Notes

  1. Official Docker Website: https://www.docker.com/what-docker Containers are a way to package software in a format that can run isolated on a shared operating system. Unlike VMs, containers do not bundle a full operating system - only libraries and settings required to make the software work are needed. This makes for efficient, lightweight, self-contained systems and guarantees that software will always run the same, regardless of where it’s deployed.
  2. Official Dockerfile Reference: https://docs.docker.com/engine/reference/builder/
  3. Dockerrun Documentation: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_image.html