{"id":37344,"date":"2017-11-30T17:53:52","date_gmt":"2017-11-30T17:53:52","guid":{"rendered":"https:\/\/www.whizlabs.com\/?p=37344"},"modified":"2020-08-31T18:12:12","modified_gmt":"2020-08-31T18:12:12","slug":"deployment-with-elastic-beanstalk","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/deployment-with-elastic-beanstalk\/","title":{"rendered":"Deployment with Elastic Beanstalk"},"content":{"rendered":"<p style=\"text-align: justify;\"><b>Exam Objective<\/b><\/p>\n<p style=\"text-align: justify;\">&#8220;Elastic Beanstalk&#8221; addresses the Continuous Delivery and Process Automation topic as highlighted in the AWS Blueprint for the exam guide &#8211;<\/p>\n<p style=\"text-align: left;\">https:\/\/d0.awsstatic.com\/training-and-certification\/docs-devops-pro\/AWS_certified_devops_engineer_professional_blueprint.pdf<\/p>\n<blockquote><p>Get <a href=\"https:\/\/www.whizlabs.com\/aws-devops-certification-training\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS DevOps Engineer Professional<\/a> Certification Today!<\/p><\/blockquote>\n<p style=\"text-align: justify;\">Elastic Beanstalk is a service that allows one to quickly provision environments. It is preferably good for developers who need to get environments up and to run for their code. The Elastic Beanstalk environment currently supports the following programming languages and environments:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Packer Builder<\/li>\n<li>Single Container Docker<\/li>\n<li>Multicontainer Docker<\/li>\n<li>Preconfigured Docker<\/li>\n<li>Go<\/li>\n<li>Java SE<\/li>\n<li>Java with Tomcat<\/li>\n<li>.NET on Windows Server with IIS<\/li>\n<li>Node.js<\/li>\n<li>PHP<\/li>\n<li>Python<\/li>\n<li>Ruby<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">How does the Elastic Beanstalk Environment Operate?<\/h2>\n<p style=\"text-align: justify;\">The below diagram from AWS shows the basic structure of Elastic beanstalk workflow.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37349 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_1.png\" alt=\"Elastic Beanstalk Environment\" width=\"728\" height=\"199\" \/><\/p>\n<p style=\"text-align: justify;\">1) First, you create your application. (You can have multiple applications defined in Elastic Beanstalk.)<\/p>\n<p style=\"text-align: justify;\">2) Next, you define environments so that you can define multiple environments for your application. You can have a development, staging, and production environment created separately for your application.<\/p>\n<p style=\"text-align: justify;\">3) Then, you deploy your application to the environment.<\/p>\n<h4 style=\"text-align: justify;\">Types of Environments<\/h4>\n<p style=\"text-align: justify;\">There are two types of environments &#8211;<\/p>\n<p style=\"text-align: justify;\">Web Environment &#8211; An environment tier where the web application processes web requests,\u00a0is known as a\u00a0web server tier.<\/p>\n<p style=\"text-align: justify;\">Worker Environment &#8211; An environment tier where web application runs background jobs is known as a\u00a0worker tier.<\/p>\n<h2 style=\"text-align: justify;\">Implementing Elastic Beanstalk Environments and Applications<\/h2>\n<p style=\"text-align: justify;\">Now let\u2019s have a closer look at how we can work with the Elastic Beanstalk environment.<\/p>\n<p style=\"text-align: justify;\"><strong>Step 1)<\/strong> Log into your AWS Console. Go to the Compute-&gt;Elastic Beanstalk<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37350 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_2.png\" alt=\"Elastic Beanstalk\" width=\"221\" height=\"223\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 2)<\/strong> The first step is to create a new application.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37351 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_3.png\" alt=\"Creating New Application in Beanstalk\" width=\"1148\" height=\"291\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 3)<\/strong> Once the application is created, you need to create the environment.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37352 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_4.png\" alt=\"Beanstalk Environment\" width=\"1040\" height=\"298\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 4)<\/strong> Choose the type of environment \u2013 In our case we will choose the Web server environment.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37353 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_5.png\" alt=\"Web Server Environment\" width=\"559\" height=\"369\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 5)<\/strong> Next decide the domain for the application<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37354 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_6.png\" alt=\"Beanstalk\" width=\"968\" height=\"369\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 6)<\/strong> Next choose the type of platform required. For the purpose of our demo, we will create a Tomcat platform which can be used to host HTML pages.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37355 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_7.png\" alt=\"AWS Elastic Beanstalk\" width=\"512\" height=\"264\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 7)<\/strong> Then choose to upload your code<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37356 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_8.png\" alt=\"Beanstalk Application\" width=\"605\" height=\"275\" \/><\/p>\n<p style=\"text-align: justify;\">When uploading the code, ensure to give a proper name to the Application version. You can choose an S3 URL for your code or choose a zip file for your code.<\/p>\n<p style=\"text-align: justify;\">In our example, we have zipped a file called Demo.html and uploaded that file as an application.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37357 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_9.png\" alt=\"Amazon S3\" width=\"609\" height=\"384\" \/><\/p>\n<p style=\"text-align: justify;\">Now once the environment has been created and you browse to the provided elastic beanstalk URL and browse to the Demo.html file, you will get the below output.<\/p>\n<p style=\"text-align: justify;\"><strong>Step 8)<\/strong> if you want to deploy another version of your application, you can carry the following steps<\/p>\n<p style=\"text-align: justify;\">a) First, go to your application and choose \u2018Application versions\u2019<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37358 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_10.png\" alt=\"Elastic Beanstalk Applications\" width=\"1337\" height=\"236\" \/><\/p>\n<p style=\"text-align: justify;\">b) Choose the Upload option to upload a new version of your file. Give a version label and upload the application as a zip file. In our example, we have just made a change to the Demo.html file and uploaded it as a zip file.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37359 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_11.png\" alt=\"Beanstalk Demo\" width=\"1114\" height=\"328\" \/><\/p>\n<p style=\"text-align: justify;\">Finally, click the Upload button.<\/p>\n<p style=\"text-align: justify;\">c) Now when the file has been uploaded, it\u2019s time to deploy the application.<\/p>\n<p style=\"text-align: justify;\">Choose NewAppv1 version and click on the Deploy button.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37345 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_12.png\" alt=\"Beanstalk Application Version\" width=\"1120\" height=\"235\" \/><\/p>\n<p style=\"text-align: justify;\">Then it will ask you the environment where you need to deploy your file. Here you can choose any environment. We will choose our Demo-env environment.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37346 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_13.png\" alt=\"Beanstalk Environment\" width=\"1114\" height=\"295\" \/><\/p>\n<p style=\"text-align: justify;\">Then click on the Deploy button.<\/p>\n<p style=\"text-align: justify;\">Once the code has been deployed, you can see the running version in the Environment section. So go to your environment, and you will now see the NewAppv1 version running.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37347 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_14.png\" alt=\"Beanstalk Deployment\" width=\"1123\" height=\"282\" \/><\/p>\n<p style=\"text-align: justify;\">If you go to another tab and browse the Demo.html file, you will be able to see the new code.<\/p>\n<p style=\"padding-left: 60px; text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-37348 size-full\" src=\"https:\/\/www.whizlabs.com\/wp-content\/uploads\/2017\/09\/AWSDevOPS_dweb_15.png\" alt=\"Elastic Beanstalk\" width=\"526\" height=\"134\" \/><\/p>\n<h4 style=\"text-align: justify;\"><b>Final Points to Remember<\/b><\/h4>\n<ol style=\"text-align: justify;\">\n<li>Elastic Beanstalk takes care of provisioning all the infrastructure required for deploying your development and test applications. It can be used to get development teams up and running in no time with their application code.<\/li>\n<li>Elastic Beanstalk supports a variety of programming languages such as Java, PHP, DotNet, Node.js, Python, and Ruby.<\/li>\n<li>You can deploy custom code at any point in time in Elastic Beanstalk.<\/li>\n<li>Every environment has a CNAME (URL) that points to a load balancer. The load balancer sits in front of the Amazon EC2 instances, which are part of an Auto Scaling group. The software stack running on the Amazon EC2 instances is dependent on the\u00a0container type. A container type defines the infrastructure topology and software stack to be used for that environment. For example, an Elastic Beanstalk environment with an Apache Tomcat container uses the Amazon Linux operating system, Apache web server, and Apache Tomcat software.<\/li>\n<\/ol>\n<p>[divider \/]<\/p>\n<p style=\"text-align: justify;\">Whizlabs\u00a0<a href=\"https:\/\/www.whizlabs.com\/aws-devops-certification-training\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS DevOps Engineer Professional<\/a>\u00a0Practice Tests help students to get mentally prepared for the actual certification exam. Practicing several times through AWS\u00a0mock tests before the certification exam, makes you better prepared for the real one.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exam Objective &#8220;Elastic Beanstalk&#8221; addresses the Continuous Delivery and Process Automation topic as highlighted in the AWS Blueprint for the exam guide &#8211; https:\/\/d0.awsstatic.com\/training-and-certification\/docs-devops-pro\/AWS_certified_devops_engineer_professional_blueprint.pdf Get AWS DevOps Engineer Professional Certification Today! Elastic Beanstalk is a service that allows one to quickly provision environments. It is preferably good for developers who need to get environments up and to run for their code. The Elastic Beanstalk environment currently supports the following programming languages and environments: Packer Builder Single Container Docker Multicontainer Docker Preconfigured Docker Go Java SE Java with Tomcat .NET on Windows Server with IIS Node.js PHP Python Ruby How does [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":47421,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[201,277,371,372,373,604],"class_list":["post-37344","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws-certifications","tag-aws-certifications","tag-aws-elastic-beanstalk","tag-beanstalk-applications","tag-beanstalk-deployment","tag-beanstalk-implementation","tag-cloud-computing"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",560,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112-150x150.jpg",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",560,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",560,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",560,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",560,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",24,14,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",48,27,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",96,54,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",150,84,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",300,169,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112-250x250.jpg",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",560,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",96,54,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2017\/11\/112.jpg",150,84,false]},"uagb_author_info":{"display_name":"Pavan Gumaste","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/pavan\/"},"uagb_comment_info":0,"uagb_excerpt":"Exam Objective &#8220;Elastic Beanstalk&#8221; addresses the Continuous Delivery and Process Automation topic as highlighted in the AWS Blueprint for the exam guide &#8211; https:\/\/d0.awsstatic.com\/training-and-certification\/docs-devops-pro\/AWS_certified_devops_engineer_professional_blueprint.pdf Get AWS DevOps Engineer Professional Certification Today! Elastic Beanstalk is a service that allows one to quickly provision environments. It is preferably good for developers who need to get environments up&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/37344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=37344"}],"version-history":[{"count":1,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/37344\/revisions"}],"predecessor-version":[{"id":71713,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/37344\/revisions\/71713"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/47421"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=37344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=37344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=37344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}