AWS Tutorial | Elastic Beanstalk Masterclass

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys what's up and welcome back in this master class will see that how to make use of lastly preinstalled will deploy your applications and services without getting into the complexities of infrastructure so let's see the list of topics that will be included in this masterclass we'll start with the elastic beanstalk overview over here we'll see that what's the purpose of the elastic beanstalk and why we use it in it of layers then we'll start with the elastic beanstalk components now in the last minute or components we have three main categories application application version and environment then we'll just deploy our elastic beanstalk first environment so this would be a simple environment will not go into much complex details and we'll see that how you can make use of elastic beanstalk to deploy a node.js application then we'll just launch an advanced of fraud environment this would be an advanced or the production level environment we'll use the high availability configuration preset so we use the high availability option to use the load balancer and order scaling to be included as a part of our elastic beanstalk environment there is discuss the deployment options or policies so there are multiple deployment options and policies will discuss ranging from all at once then rolling rolling with additional patches immutable then we'll have the hands-on so discussed that how you make use of velocity Beanstalk to deploy an environment using the immutable deployment policy through this update our existing application using the immutable deployment policy then will this implement blue/green deployment now the purpose of the blue/green deployment is that you can make use of two different environments and you can split a traffic into half using the route 53 dns settings so we see that how you implement that there it is discuss the advanced concepts in the advanced concepts will discuss about the extension files the lifecycle policy and we'll discuss about the two type of environment shields that you can deploy one is the web server tier and the other one is the worker tier they will see that how you can add a database to an existing elastic Beanstalk environment so in this lab session we'll see that how we can add on a MySQL database assistance to be the part of our existing elastic beanstalk environment last but not least will see that how candy couple and Amazon RDS instance from an elastic means took environment now this is very important because once you incorporate the database with the last realistic environment in that case if you delete your environment your database is also deleted or terminated so in that case we'll see the process the hands-on process the step-by-step process to decouple the existing rdst resistance from the elastic boost of environment so these are things we'll discuss one by one in detail so let's jump over to our first lecture and we discuss step a step topic by topic to complete the entire last leap in stock master class so let's get started the very first thing we'll see that what are the challenges or issues being faced by developers if they have to deploy their applications upon a doubles cloud platform let's suppose that we have to deploy a three-tier architecture this means that there are multiple components that need to be created and configured when you have to deploy a three-tier application or the architecture and you might need to deploy multiple applications each application will consist of several environments like test dev and fraud and you can maintain multiple application versions of each application at the same time this means that there are a lot of complexities involved in the management and the deployment of an infrastructure you might have some skinny concerns you will be using auto scaling in most of the applications so then you can use auto scaling to automatically scale out or scale in I would say increase or decrease the number of instances based upon the patterns of the incoming traffic time of day and the demand you want to achieve consistency across different applications and environments overall as a developer you want your code to run so you'd be using Beanstalk to solve these challenges or issues what is elastic beanstalk it's a developer centric view of deploying an application on it appears you can quickly deploy and manage applications you don't have to look into the infrastructure you don't have to load up infrastructure components like easy to load balancer autos current groups elastic I appease and so on that runs those applications so you just manage your applications and you don't have to look into the details or the complexities of infrastructure it reduces management complexity without restricting choice or control you simply upload your application and elastic Beanstalk will take care of everything study from capacity provisioning load balancing scaling an application health monitoring let's see some of the basic components of the elastic beanstalk we have three main components application application version and environment let's start the application an application is nothing but it's a logical collection or it's a combination of multiple elastic Beanstalk components including environments versions and environment configurations then we have application version it is nothing but it is a application source bundle or it's a deployable code for example a java wer file so you make use of the application versions or a package a source bundle or a piece of code and that's the application version that you use to deploy your applications an application version is a part of an application applications can have many versions and each application version is unique the third component is environment and environment is nothing but it's a logical collection of eight of these resources that you use to run an application version each environment runs only one application version at a time you can run the same application version or different application versions in many environments simultaneously when you create an environment elastic Beanstalk provisions the resources needed to run the operation version is specified so these are the three main components of your elastic Beanstalk let's see the workflow how elastic Beanstalk works for you let's imagine you want to create an application you want to deploy an application so you upload an application version the source bundle or it's a dip level code so you upload the application version and it will launch an environment so an environment is nothing but it's a collection of AIDS resources that you need to run an application version and you can manage your environment so this means that whenever you create an application and when you deploy an environment you have deployed a new application version after that you can also update that application version by using or changing the source code so this is the workflow of the nasty Beanstalk last but not least let's see that how you've been charged for using this service there's no additional charge for using in a subpoena stock you don't have to pay even a single penny for it however you pay for the underlying eight of these resources that you use or that your application consumes for example you might deploy Eastern stresses load balancers or any other resource so you have to pay for those resources however you don't have to pay for elastic beanstalk as a service so that's how you're being charged for using the services I would say the resources but for elastic Beanstalk is no charge to pay for the underlying resources like instances load balancers etc so that's the overview of the elastic Beanstalk we'll just jump to our IDO spammer console and we'll deploy a simple application using the elastic Beanstalk first of all we'll just go to the compute section and click on elastic Beanstalk I click on create new application on the right hand side and now I have to assign a name to this application I can just name it my app demo and I can just include a description however I can skip it you can add a tag but this is optional so once you set a name click on create and this creates an application now for that application you have to create an environment so click on create one now I choose the web environment so don't want to run a website a web application or web api that serves HTTP requests in that case you make use of the web server environment so I go with the web server environment because I want to deploy a web application or websites in the front end I click on select right now and now you have to define some specifications for this environment first of all I include the name so I just keep a name as it is if you want to can change it I can copy this name and include that as my domain name so if I just click on check availability this means that I can use this domain to access the website that would be created using this environment we can assign a description however we just leave it as it is it is not important or essential the next thing we have to choose is the base configuration under base configuration you have its use the platform published and maintained by being stock now these are the pre-configured platforms you can make use of for example we have Dhakal multi container docker we have go dotnet Java node.js loopy PHP Python Tom Kent GlassFish so you can make use of any one of these pre-configured platforms in our example we go with Python then we have to choose the application code that will be used to deploy this environment now I'll use sample application because I'm not using any of the pre-configured template or code so choose the sample application I click on create an environment and now it would start deploying the things by itself including the instance it's IP address its security group st bucket everything will be deployed from scratch from beginning to the end the best part is that you can manage these resources afterwards so as if now we have to wait for a few minutes because it will take some time for it to deploy all the resources from scratch to the end let's wait at pause this video once this entire deployment is done then I'll show you that what things it has deployed welcome back as you can see that it deployed everything from scratch it launched instance its IP address it configured every attribute of the instance and it deployed my Buyten platform upon which I can start deploying my applications or Stav the development now just click on this URL I click on this right now you can say that it's displaying this webpage so this gives a platform for any developer to start using it and start with the deployment process of applications and services that's all about deploying a web server environment using elastic Beanstalk hey guys what's up and welcome back in this video we'll deploy an elastic beanstalk environment which will be much more advanced in nature because we'll be using the high availability preset to ensure that we can include some advanced capabilities like the load balancers and auto scaling troops etc so that we can create a production level environment so let's get started and let's start with the entire process we have back to our 8 of this management console and the very first thing we'll do that that would is go to the compute section and under compute this click on elastic Beanstalk so that we can just go to the elastic Beanstalk - boat now let's go to get started let's click on that so once you click on get started we have to create a web app now this is the application that we will deploy and the very first environment would be a test environment so it would not be the advanced environment and once we deploy the test environment then we'll discover the production type of environment or the advanced environment so I'll just go ahead and define the name of the application so I just named it as node.js app the platform that I'll choose would be node.js and the application code would be the sample application I just go here to click on create' application now it will just choose the default parameters and it will deploy a complete application with an environment with some default settings so it will take some time and we'll just deploy my environment within the application with a basic minimum configuration now I just want to go advanced because I want to maintain two different environments one would be the my test environment and the other one would be the production level environment so this is my test environment so if it is go to my app you will see that as if now it's going to deploy my test environment right so in the meantime I would deploy another environment which would be my production level environment so how do I do that I just go to the actions on the top right hand corner and click on create environment so this is the second environment that we want to manufacture now the thing is that you will see there two options out there two type of environments that you have so there are two environment tools that you can deploy one is the webserver environment and the other one one is the worker environment so we'll discuss the details or differences between these two afterwards but just to give you a brief overview the web server environment is used to deploy some web applications and the voc environment is used for the processes that take a long time to execute so if you want to run some batches or do some processing then you just create the volkl environment but as if now we want to deploy the web server environment because we want to deploy a web application an HTTP web site so this is my second environment and this would be the web server environment so I choose this option I click on select now we have to choose some options over here the very first thing is that I deploy this environment with the environment name as for example I can just type anything I can just type my domain name or anything so I can step in for exam proud environment something like that so you can just define any name over here and that's it this is my production environment then the next thing I will do is that I define the domain name so this domain name can be linked with my own domain in huge 53 I just type in my domain name my app in short something like that now I need to see that whether this this domain name is available or not so let's click on check availability and yes this is available now I get us define a description so I will type in this is my production environment so I can type any description to briefly describe the purpose behind this environment and once I do that a scroll down and choose the base configuration the very first thing we'll do said we'll choose a pre-configured platform I'll choose note j/s and the application code will be the sample application right so let's go with the sample one now this time I will not just straight away go to this option create environment and just click on that instead and go to configure more options now this is where the main thing has to be done you have to go with the some advanced options so that you can deploy a production level environment now these are some of the presets some of the advanced presets for example we have high variability synchronous using support instance high availability using spot and Aunty - Tessa's custom configuration and so on so you can go with any one of the advanced options so I want to go with the high availability advanced preset and these are the things that I'll get wants that go with a high availability for example let's go through some of the options out there if I go with a high availability it will include a load balancer so if it is to the low bands the settings so I choose load balancer you can modify you will see that right now are in this environment it will include an Appalachian load balancer okay if I want I can change to classic or network but let's go with the application so it will include an application load balancer with this environment ok I just click on cancel and go back now for example I want to just go to some more advanced settings for example I want to look for the capacity so I just go to the capacity on the right hand side and you will see that it also includes the auto scaling it is click on modify you can see that this is the environment type load balanced this is the minimum and the maximum number of instances so I can change for example 5 as they make some nonprofit stresses to be deployed fleet composition would be on 2 - Tess's and I can change all these parameters if I bought right so for example I can change the triggers so instead of choosing the metric as Network out I can choose CPU utilization and the statistic would be average unit would be the percentage and I'll not change the time modes the period the preached duration the upper threshold I would choose as 70% and the lower threshold would be 30% so I can change these parameters if I want I can change the attributes I go ahead and click on save as as if now I have accepted the default load balancer options and I have changed some of the auto scaling options and if I want I can just go with the notifications I just go to notifications over here and click on modify I can specify my email address so that I will be notified if any of the events trigger within this environment so for example if the auto scaling will launch terminate some instances so in that case in case of launching or termination of the stresses to fight so it will send a shoot an email to this email id okay I do not say right now and that's been done so I can change any one of these parameters if I want so I've changed few parameters some attributes if I want I can include some databases I can include some tags so this is all about the stuff as of now because I have changed some of the parameters from high availability it has switched to the custom configuration because I've customized a few settings now let's go ahead a click on create environment and now it will just encapsulate or just take all the different parameters or the things that are included and it will deploy my production environment now I'll just go ahead and click on the node.js app on the left hand side you can see that my test environment has been deployed and my production environment is still in progress now if it let's go to my test environment you will see that I can just go to the events on the left-hand side and these are the resources that it has deployed it has just deployed one single instance with no load balancer no auto scaling simple instance with a node.js package or the platform is stored upon it so you can see that over here it just added one instance it attached this elastic IP to that instance and all the different attributes of instance and so on that's it no load balancer no auto scaling simple test environment and I if I just click on the the URL it will show me this web page now going back I just go back to my node.js app and you can see that my production environment is still pending it's still in progress it's still getting deployed so let's go to my prod environment my production level environment and you can see that it's still working behind the scenes and it will deploy every single component that was included in my custom configuration so we have to wait for some time it will take three to four minutes before we can see this vine meant to be up and running so I'll pause this video and once this is over I just resume and show you all different components to be deployed welcome back as you can see that this environment is being deployed completely this is my production environment and as you can see that this is the health it's ok so the status is OK this means that everything is being deployed properly without any issues I assure you the events you can see that in this environment it deployed everything ready from the instances my load balancer and the auto scan group etc so if you see from scratch this is the SNS topic that it manufactured and then this is the target group of my load balancer the auto swing launch configuration and auto scaling group the instance load balancer listener configuration auto screen group policy so we can change the policies but it's going to the auto scaling and we can just manipulate or we can modify these settings the cloud watch and everything so you can see that a lot many things were deployed within this environment which will much more advanced in nature so it included the load balancer plus the auto screen group and other advanced settings so this is my production level environment now if let's go to my node.js app so on the left hand side this is my test environment and this is my prod environment so this is how you can maintain multiple environments in a single application and we deployed this advanced environment this production laminate environment this prod environment with some advanced settings so what do you have to do is that you have to just go to the Advanced Options configure more options and you can choose any of the presets running from the custom configuration high availability and so on so you can customize the settings during the time when you want to deploy an environment and you get some customized settings depend upon your choice and your preference so that's how you do that that's how you deploy an advanced or I would say the products to level environment in your application and you can maintain multiple environments in a single application so that's all about from my site that is so very much in this video of the lecture we'll discuss the deployment options or policies starting from all at once rolling rolling with additional patches and immutable let's have a brief overview all at once which means that you deploy everything in one go this is the fastest of entire lot but instances are not available to serve traffic for a pet so there's a downtime we have rolling which means that you update a few stresses at a time you take a batch size so once you update one batch of mistresses and once that badge is healthy you move on to the next batch of mistresses rolling with initial batches over here just to ensure that you don't lose the capacity you spin up some new batches and then you discover the same concept immutable you spit up new stresses in a new order screen group you deploy a version to these new stresses and then you swap all the stresses when everything is healthy now we just move on and discuss each of these things in detail all at once so let's imagine you have four different instances with the version one application running upon them and you want to update all these foreign stresses once you go with this deployment strategy or you want to update these instances you have to take down all the instances so all distances will be out of service and you update all the stresses with a new application version it is version 2 so this is great because this is fastest of the entire lot but over here this is a downtime because before version 2 is updated before you stress is something updated with the latest version of your software or the application there's a downtime so this is the fastest deployment of the entire lot the application has some downtime it is great for quick iterations in development environment however there's no additional cost so these are the features and the benefits of this climate or the update strategy the next one is rolling now let's imagine you have four different instances and you want to update all of them instead of updating all this thesis at once we take a bad-sized for example we take the first twist SS because a batch of sizes - and we shut down or we take the first twist as it's out of service we upgrade these first two instances with a new version of for our application with this version - so once the first two stresses are being updated with the latest version of our application we take the another batch size of two and we take the last two instances out of service and then we update the last two stresses with the latest version of our application so now we have all the fallen stresses with the version 2 running upon them so this is because have top rolling now this is great however over here you will see one thing you lose the capacity because uh once your batch size is taken for the upgradation you lose half of the capacity so let's see the features the application will be running below capacity so during the time when you you take the batch size and you batch is being updated for example in our case two stresses are getting updated so at that time an application will be running below capacity you can set the batch size if you want the application will run both versions simultaneously there's no additional cost involved this there's a long deployment because once you go with this updation policy or you upgrade your application you have to go with with patches conserved so you go batch by batch so this means that this facilitates or this will lead to longer deployment then we have rolling with additional patches now this is the advanced version of rolling over here you have the same number of businesses for with version word rent upon them now what we do is that at the initial stage we will just add on two newest testers with the latest version right upon them that is version 2 so over here we have four instances with version of one running upon them and with two additional batches I would say not to additional batches to additional instances so we take a bath size of two we initiate a new batch over here an initial batch with the latest application version running upon de-stresses now we have the batch size of Tim so we take the first two stresses out of service and we upgrade these stresses to the version two of our application then we take the another batch which means third and fourth instance and we take the third and fourth instances out of service and we upgrade our third and fourth instances with the latest version of our application which is version 2 now we have 6 stresses with the same version 2 running upon them you have two extreme stresses so in the next stage we will terminate these two stresses because we don't need them anymore so in this process in this entire overview if we just go with the rolling with additional batches we have to initiate an extra batch at the initial stage the purpose of deploying an extra batch is that you don't lose your capacity because enrolling as we have seen in the previous demonstration or the previous deployment policy we have seen that if we just take half of these tests out we lose the capacity to solve that issue we go with additional batches so we just deploy the additional batch over here to ensure that we don't lose the capacity but the downside of this deployment strategy is that it will incur use some additional cost because you have to pay for two expense tenses so let's say the features right now the application is running add capacity you can set the batch size the application will be running both the versions simultaneously there is a small additional cost because we'd be executing or you'd be initiating new batches and initial stages the initial batch is moved at the end of the deployment because you don't need that after all units tests are being upgraded and this leads to longer deployment it's good for the production environment so that's all about the rolling with additional batches so if you compare rolling and rolling with additional batches the only difference is that in rolling with additional batches you execute a new batch an initial stage and what's your anti fleet is being updated that extra batch of hysteresis is being removed so that's all about the rolling with additional batches last but not least if we have immutable in this concept of the deployment strategy you make use of the auto scaling group so we involve or we include all these dresses in our auto scaling group so over here we have three instances with the version one of our application running upon them included in one of our existing auto scaling group I want to update these stresses to the latest version velocity version two what we do is then we deploy a new auto scaling group that's a temporary auto screen group with the same number of instances however those three instances over here in our case will have the latest version running upon them afterwards we manage or this diploma strategy will include all these new stresses in the existing version of our auto scaling or I would say in the current order screen group in the existing order screen group these three instances would be included so now we have six instances up and running so the first princesses will be running the previous version of the software or the application and the last three instances will be running the latest version or the version 2 of our application in the next stage or the last stage the version 1 is Tessa Simon terminated and we keep the version 2 instances and the temporary order saying cube is also being deleted or terminated so this is all about the immutable deployment strategy let's see the features right now it has zero downtime new code is deployed to noon stresses on an temporary auto-scaling truth this has a high cost because he go double the capacity because you are increasing the naproxen instances or your you are going with double capacity so this will lead to high cost this has the longest deployment but the benefit that you get from this deployment policy is that you get a quick roll back in case of failures just in case if the new application version is not working for you if it's not working properly then you can just terminate that new auto scaling group and then you can just retain your existing one and this is great for production environment this one more strategy that I want to discuss with you that's called Bluegreen deployment it's not one of the main strategies out there but you can use it so what happens in the Bluegreen deployment is let's say an example you have the users and they send the web traffic they will generate the HTTP or the HTTP traffic that web traffic will hit D route 53 DNS servers and 90% of the traffic is been sent to the blue environment because the blue environment will consist of the version 1 of your application and rest 10% is been sent to the latest version or the version 2 of your application so you have just split your environment in two different categories blue environment and green environment you use the vated routing policy in route 53 and you split the traffic in such a way that 90 percent of the traffic is being sent to the blue environment which consists of the version one of the software and the 10% of the deep traffic is been sent to the version 2 of your application which is included in your green environment now the thing is that once in green environment it passes the health check then you can use a concept called swap URLs I'll show you afterwards at how you do that and you send the entire traffic to the green environment and thereafter you tillman 8 the blue environment so how this works for you the blue-green deployment will increase the availability and reduce your risk the blue environment is the production environment that normally handles the live traffic green environment is created with an updated version then you swap the URLs between these two environments so that the entire traffic's been sent to the green environment which has the latest version running upon these dese's so that's all about the deployment strategies or the update strategies I'll show you that how you apply these different deployment techniques it's very easy so I'll show that how you can apply the immutable deployment strategy and also how you apply or implement Bluegreen deployment strategy so that's all about this thing thank you so very much hey guys what's up and welcome back in this video or the lecture will see that how you can make use of the immutable deployment policy to ensure that you can update an existing environment so you can choose a different application version and you can choose the immutable deployment policy to update that environment or to upload or mention the new application version so let's get started now this is our elastic Beanstalk - boat and this is the node.js app so if you see this thing this is the application and these are the two different environments so let's go to the fraud environment and if it is go to this environment as click on the URL or the link with us being a part of this environment so if it's click on this link this is the home page or the server page that it displays now if you see the background color itself green so I want to change the background color to blue so I'll change the background display from green to blue now I will change the application version so I need to upload a new piece of application code or the source code and how to do that let us go to my prod environment and to upload the new application version I'll just go ahead and click on upload and deploy now I need to choose the file the source code so I just click on this option and it's already there in my downloads now include this zip package this source code this application version sauce bundle in the resources session so that it can perform the same things the same lab session by itself so choose the zip folder click on choose so this is the updated application version or the city's source code that will change the background color to blue and version label if you want you can change the label if you want to but I just keep it as this now you have to go to deployment preferences and by default the deployment policy is all advanced now we already discussed these four different of five different deployment policies or advanced roll rolling rolling with additional batch immutable and it's the fifth one which is the blue clear deployment but is additional one so these are four main deployment policies all at once rolling rolling with additional bash and immutable all it was is the default option now let's go to immutable now as we've discussed in the immutable it will just launch a new auto scaling group with the instances with the existing application version pink running upon them and then these newest essence of the new or the temporary auto scaling group would be merged in the existing auto scaling group and once these new stresses passed the health check the previous auto scaling group and the old distances would be terminated such is immutable I'll just keep all the cells as it is healthy threshold I will choose okay ignore health check I can set it to false so that even if this is not up and running or it fails in that case it doesn't goes back to the previous configuration batch size I choose the fixed percentage I am not change any of the default settings so I'll choose the immutable deployment preference so that this is a different preference or this update policy will be used to update the application to update the environment to push the deal application version to change the web page color from green to blue so let's gonna deploy and it will come into action but it will take some time for this to be up and running so if you see that it says environment update is starting so this pause this video so that once this entire process is completed then we can test the URL and see that everything is up and running so let's pause and once this entire process is completed I will resume and you'll see that how it performs all the actions welcome back as you can see that this environment is updated successfully and to test it as go to the URL or just click on that and you can see this the blue colored web page or the home page that I get so that's how you update your existing applications you can push the source code and you can choose any of the deployment policies you can choose rolling which is the option in which the path size is being included rolling with additional patches immutable so you can choose any of the existing deployment policies or you can discover the default one that's all at once in our case we have choosen the immutable deployment policy and if assure you the events behind the scenes so that we can exactly see that what happened I just go to the events on the left hand side and if you see the entire process what it did is that if you see from scratch it initiated a new auto scaling group and it also terminated the priestesses so you can see over here that it created or it manufactured a temporary auto scaling group then it added the newest SS to the group and it waited for instances to pass the health checks I am talking about the new stresses that are a part of this temporary auto scaling group damn it detached the new stresses from the temporary auto scaling group and included that to the permanent auto scaling group you can see over here it detached the new stresses with a new application version from the temporary auto scaling group and added those stresses to the permanent one after that it tillman ated the old distances with the previous application version running upon them and also the temporary auto scaling group so these are steps which are applicable in terms of the immutable deployment policy so it terminated the old instances for the previous application version running upon them and the temporary auto scanning group and we have the updated application version up and running upon the instances upon the new stresses that are included in my existing auto screen group so that's the entire process that's it thank you so very much in this video or the hands-on session will see that how you make use of the blue-green deployment method to ensure that once you deploy the new application version then you can use an option which is swap URLs or you can swap the link and ensure that your domains traffic is being sent to the instances or to the environment with a new application version running upon them so let's see the entire process now as you see that this is the same application that we have been working upon and in a previous lecture I showed you that how you can make use of the immutable deployment policy to update your application version so if I go to the left hand side environment and click on the URL you will see that it produces a page with a green colored background and if I just go back to the other environment so let me just go back to my prod environment if it is click on the link it produces a blue colored page so in the previous lecture I showed you that how you can make use of the immutable deployment policy to get this new page and we have updated the source code or the application version now I want to make sure that this prod environment you are l or the link is the mail link that my domain traffic should be pointing towards to so my domains traffic should be sent to this link which will show me the blue colored background of a page so let's do one thing I just go to my services and I open route 53 or route 53 under networking and content delivery section and once it is cool to route 53 I just go to my hosted zones and click on my domain now let's create a new hoses zone create a record set and so this is the hostess zone for my domain either school on the top and click on create record set and thus record set will be sent to the alias record or the target and the alias target I will choose will be this one node.js app this is the environment the test and mint which will produce the green cover page if it has sent my domains traffic to this link so I choose this thing and I have to choose the routing policy now I choose the very trotting policy because I want to ensure that 90% of the traffic will be sent to my green environment so I choose my weighted routing policy vade would be 90 so 90 percent of the traffic should be sent to which environment let me show you back once again so let's go back to the elastic Beanstalk I want to ensure that 90 percent of the traffic goes to this environment this one and if I just go to this environment click on this link it will show me the green colored colored web page so the background clear is cream so I wanted to show that I sent my traffic 90% of my domains traffic should be sent to this environment which gives me the green colored the page output right so I just go back to the route 53 dashboard and the set ID would be for example green environment that's it this is the set ID and I click on create now just create a duplicate record set and I was just forward less 10% of the traffic to the blue-colored environment so I click on create record set once again choose areas a let's target I will choose as this one my app in praat link now this link is associated to the prod environment if it is go to the pradhan vironment and click on this URL or link so it will produce or it will give you the output in the form of the web page which has the blue background so having said that I just go back to my route 53 so I choose my proud environment illest target rotten policy witted wait 10% said id stop in flu environment done I click on create now the thing is that if I expand this I'm sending 90% of the travel to the clean environment to the environment which has the application version which will show me the green colored background the page and 10% has been sent to the blue environment which will produce as a blue background the page as an output so if I just open my domain and test it so let me just type in my domain so that we can see if this is working for us so here we go you will see that I'm getting to the green web page because 90% of the Travis should go to the green web page now the thing is that I want to perform a Bluegreen deployment because if it let's go back to my application page I want to ensure that I face out or I terminate the green colored environment and I just devote the entire travel to the blue and vomit or the Pradhan vironment so I want to show that I terminate the test environment i face out the test environment and devote the entire travel to the prod environment so i want to ensure that all my domains traffic should be sent to thee fraud environment which will produce the blue web pages so how do i do that it's a simple process i need to make sure that i go to the prod environment because i want the entire travel to be sent to this environment let's go there and once I go to my prod environment I just go to the action and have to just click on this important or I would say this is the most important setting that you have to click on or you have to go through swap environment URLs so I click on swap option now I want to swap the test link with this proudly so I choose my I would say I would choose my prod link and I want to swap this with the test link so what it will do is that it will highlight this Prussian link as a main link so we are swapping the URLs so you can see over here swapping the environment URL will modify the route 53 dealers configuration which may take a few minutes your application will continue to run well the changes have been propagated some I'm swapping the environment URLs so that my production link becomes the main link and so change some settings behind the scenes in the jute 53d and its servers so if you don't swap right now in front of you and you can see that it says last evening stock is updating to environment but this takes a few minutes to come into action the swapping is done but if I just go to my domain let me just go to my domain real quick so that I need to ensure that it works fine for us if I hit refresh let's see if it folks because it takes a few minutes for this to be up and running so let's wait because once we swap the URL then that is the entire Domus traffic will be sent to my production environment or the fraud environment the advanced environment link so that I can I can just get to the blue pages and once this testing is successful I can't eliminate my test environment which gives me the green web pages so we need to wait for a few seconds and see if it comes into action by the way we can do one thing meantime because the fraud and my word is up and running so we can safely do one thing we can just go back to the application page and we can just go to the test environment go to actions and click on terminate environment because her prodded by Modest is up and running we have swapped the C names for environments so we have booth we have done the swapping so it's safer for us to delete the test environment so to school the actions and click on tell me the environment and I mentioned the exact name of this test environment or the green environment before I can just click on terminates at is measure the name of it they contaminate so it's updating my environment I would say that it's deleting or terminating my test environment because I want the fraud environment the production environment to come into action and the entire domain traffic to it should be sent to the production environment my entire domains traffic should be sent to that single environment server school to the node.js app and hit refresh you will see that it will take few seconds for this to be terminated it takes some time you can see that it's terminating everything behind the scenes and if I hit refresh you can see that it's working now my entire traffic my Dewey's traffic would be sent through offer up to 3 Tina's servers to the production instances or the production environment so I've swapped the environment URLs and ensure that my production environment is up and running I terminated the test environment and now the entire traffic has been sent to this production environments have performed something thing called Bluegreen deployment so I've removed my testing environment before that I have swapped the URLs and then you can see that it's up and that's how you do that that's how you perform the blue-green deployment that's it thank you so very much in this lecture of the video we'll discuss the advanced concepts including extension files lifecycle policy and environment tears study from the extension files these extension files are located within dot EP extensions directory in the application source code these are in yeah Mel or JSON format and it's of dot config extension for example logging dot config and you can use this extension files to change execute update parameters of components of your environment as an example you can see that this is the source code that we have used in one of our examples and within the youth of this source code we have the dot Eve extensions directory and under that you have logging dot config extension file so we can use this dot config EEP extension directory or I would say the extension file that's in login to our config to change execute or update any of the parameters of any of the components of our environment now let's talk about the lifecycle policy you can maintain up to 1000 application versions in your elastic Beanstalk - boat and you can't go beyond it versions which are present in you so any application which is supporting any of the version or application version will not be deleted and you can retrieve your application source code or bundle in one of your extra packets so this is my last EP store dashboard and as you can see that this is the node.js app and these are the two different environments want to suspend it and the other one is a piranha k-- if it is go to my application and go to application versions you can see that these are the three different application versions that I have right now so I can maintain up to 1000 versions at a time so if it is go beyond it first thing first the limit is 1,000 you can't bypass this limit and any application version which is in use any application of it is running any of the application versions so if it's it's running it's me used you can't delete that version and you can retrieve your source code or the bundle in any of your Esther pockets let's imagine that I have to just create a new environment so I'll just go to the environments and these are two different environments under my node.js app I go to actions and click on create environment the very first thing that we have to choose is that what type of environment you want to select is it a web server or worker what a difference if you go the web server environment then you can use it to run a website or web application or web API that will serve your HTTP request so any type of front-end web application or website you want to run in that case the environment that you should be choosing would be the web server environment on the other hand if there are some tasks that take longer time to be executed for example you want to process some videos so for long-running workloads you can offload those tasks or the workloads to the worker environment in that case you make use of these simple queue service queues if the web server environment means that you can use it to run a website web application or web api that serves HTTP requests on the other hand you use the worker environment if your application performs tasks that take more time to complete you can offload these tasks to a back-end or a dedicated worker environment this means that even d couple your application in two separate environment tiers you use those generate the HTTP or HTTPS traffic and the web tier in the Beanstalk which consisted of the load balancer and the instances will take on these requests and if anything needs to be processed for example the videos needs to be processed those things are being being sent to a work queue or the simple queue service queue and then to process that work there's a worker deal with a separate tier the workers here behind the scenes will consist of the instances and the simple queue service queue and it will just sources your videos are on some back-end processes or tasks so it will execute any task that takes a very long time to get processed so that's how you decouple your application in two different environments once a web tier which is responsible to take the web traffic and then if any of your tasks need to be processed then you offload those tasks to the work out here in this video the lecture will just go ahead and add on a new database instance or the RDS suitable environment to the existing elastic Beanstalk environment so let's jump over to our management dashboard and start with the entire process welcome back so with this go to the node.js app so that we to school to the same application that we've deployed and these are two different environments that we have configured beforehand the first one is a test and on the right hand side this is the prod or the advanced environment so I want to add on the data base to this fraud environment how do I do that I just go to the fraud environment and as you can see if it is go to the events there's no database added to this existing environment so we have the instance load balancer cloud watch and the auto scaling all these things are added on and they are part of this environment but I just want to add on one sink of my SQL database to be a part of this existing fraud environment so to do that I just go back to this environment page and let's go to the configuration so the left hand side has click on configuration and once let us go there you will see that these are all the different settings or the Advanced Settings that I can manipulate I can change these different Advanced Settings now one set is code to the these settings I can just scroll down and there to things that I want to modify over here the forces is that and I can just go ahead and start with the I could include the key pair so that I can use that key to access my instance and through that instance that I can access my database so I can't go to the Security section first and once I choose security I just choose modify and I just want to choose a keep here now in that case what it will do is that it would deploy new instance with a new key pair applied to it so I choose my keep here because I want to access this instance through which I can access my database so chooses key pill and click on apply so it will just launch a new instance so will terminate the oldest s and launch a new instance so in the meantime I can just click on confirm to distrain show that this applies immediately and you can see that it has started the process behind the scenes now I just go back to the configuration once again and the time has come when we have to add the database so I scroll down and you have to look for the database over here so this is the last option the database so you can see that there's nothing included in our database section as if now I click on modify so I'm you know to choose your database option and click on modify on the right hand side so from here you can include your database go to restore a snapshot or you want to deploy a database from a snapshot as if now we don't have any database behind the scenes so the way snapshot will be set to none okay then the next thing we'll do is that we'll just choose the engine so in my case I'll go to - cure I go with the default engine version the default instance class you can change the stress class if you want then the storage will be 5 GB this the minimum storage that you can attach to any database instance so I'll go with the default option that's a 5 GP storage option the user name I just type in the user name to access my database in the future so this is my user name and this would be my password now rotation this will this ask you to create a snapshot just in case if you terminate your environment that this thing is very important for us to understand because we are including this database to be a part of this environment in the future if a terminate this environment this database would also be deleted so you can see the description down below when you terminate you environment your database is this is also terminated so because these two things are associated with each other if you somehow terminate the environment this database instance will also be deleted or terminated and you will lose your data so in that case to be on server side you can choose crates now Shawn because in that case if you terminate the environment then it will just backup your data in that case in the form of a snapshot but as if now I will just choose delete so this means an in that case if my this eb or elastic beanstalk and Mamet is being terminated then this database will also be deleted and there will be no snap scharping manufactured we can change these settings afterwards but as if na discover the delete delete option because I don't want to retain any of my databases or the snapshots then availability I choose slow one AC I want my deliveries to be deployed in one availability zone if you want to go with a high-volatility option you can choose palatine easy in that case it will deployed two different databases the primary database in my one easy of one availability zone and the backup or the standby replica database instance in a different availability zone says go with the single nazy or one is the option as if now I want to keep the things simple so these are the options have chosen so I want to deploy a MySQL database instance which would be attached to this environment this one downside that if this environment gets terminated or deleted in the future then this database will also be deleted but we can change these settings afterwards we can decouple the database from this environment later on okay so as you can see that we have choosen all the different options and let's do one thing let's choose all the options once again so this is my school engine engine version instance class storage username password I can retain my snapshot or I can create a snapshot if this elastic beanstalk environment is deleted and i can go with thee one is the availability option now as if now you can see that the apply option is greyed out for some reason so I'm gonna see that everything is perfect so let me do one thing let me just go ahead and hit cancel and just destroy one more time I choose my database click on modify so choose same options once again in front of you I will include my username and I glued the password and so we'll just go the same options so as if now you will see that we are not getting any option to apply these settings let's do one thing let's click on apply so it's not being enabled it's been great out so there's something that we have to change because it is still not working for us so we just hit cancel so there's something that we have to change over here let's go back to the app and let's go back to the prod environment once again I just go to the configuration and scroll down go to the database modify and let's give one more shot so I choose my username okay and just make sure that I can include same in the password so we want to delete the snapshot and that's it so as you can see that now the apply option is highlighted for some reason it was not being showing up or it was kraid out but as of now it is showing up we have choosen the same settings we haven't changed anything the same username same password but now as if now this is showing up so it still apply and this will just apply the settings and a new date of assistance would be attached to by lastly we stock environment so we have included a new database a my SQL database instance to be attached and be a part of this existing fraud environment or the production environment so we'll take some time if I just go to the locks right now I would say let's go to the events you will see that it has this manufactured a database or it's in in the process of creating a database so it will take some time we have to wait for some time maybe two or three minutes and once this thing is being completed once my database instance is been to being deployed I'll show you that how you have to change the security group because the thing is an you need to ensure that your database stance should be accessible from your instance that's a part of your elastic beanstalk environment so if it is code to let suppose services and I open my ec2 dashboard and let's go back to the instance dashboard so this is my let me show you okay so this is my prod environment instance the new instance that was launched where'd the key the key pillar so remember I just included a new key pair to be the part of the system so that I can assess to the systems it Ron so this is my new instance and I want to SSH to this instance and from there I need to access my back-end database instance that I've just deployed so let me show you that that database I just go to the services I open RDS in a different window or tab so let's go to the RDS dashboard and this is the database instance that it is just being created or it's in the process of getting created so I just pause this video for some time because I just want this database instance to be up and running and once this process is completed I just log in to my instance the east resistance and from there I'll ever just access my database so let's wait for some time and once we come back once this process is completed then we will see thee for the steps welcome back as you can see that this didymus this test is already deployed and as if now this is backing up so in the meantime let's do one thing let's ssh to the instance so I just need to ensure that I have a copy of my PEM key saved on my desktop so let's go there and this is the PEM key that I'll be using so let's do one thing let's go back to instance - boat let's go back here and we will message to the instance this instance which is already up and running the fraud environment instance so I open my terminal and let me just increase the font size of it and the very first thing I will do is that I will just go to my desktop where Mike he is being saved and is sh2 my instance so this is my key that were using and this is the username the default username of my instance because this is the Amazon Linux instance that I have this deployed using the elastic Beanstalk and let's go back I just go ahead and copied the public IP oh you won't think I missed and it will ensure that if it's go to my security groups this is the group or the the firewall being assigned to this instance so I will just allow the SSA from my IP just to ensure that this will enhance the security of the assistance so I just go back to the terminal and I need to disturb include the public IP or the public genus name of this instance I just copy the public IP and paste it okay it's happening yes and I've connected to the instance now it says permission denied public key so there's a possibility that I have misspelled the name of the key so I need to ensure that I define the exact key name for you and that's it this is the one so I've connected successfully to the instance that's a part of my in a CP stock environment now the next thing I will do is the following I will just issue some commands to connect to the my SQL database instance that I've just launched that is a part of my environment before that if it is go back my database so I just go to the RDS dashboard you will see that this is the security group being assigned to the state of assistance neither is click on this one and check the inbound rules and to ensure that the my SQL port is opened up so as if now you will see that it allows all the TCB traffic from this source now this shows most probably is the group or this is the security group ID of my elastic beanstalk environment okay so this means that I can just go ahead and for instance I can access my database so if it let's go back to the instance - boat and if it is check its firewall or the security group and it's go to the outbound so as if now it allows all the traffic out this means that from this instance I can access any of the databases and I can just make a connection between my instance and my database so I'll just go ahead and I will install the my SQL package so how do I do that sudo yum install my SQL Server - why so I'm installing the my SQL communication package so that I can just initiate a connection or communication from this instance that's a part of my elastic we stock environment to a database that's a part of the same elastic Beanstalk environment now I'll run another command sudo check count fake so that I can just boot up this this service or database at every boot so pseudo chicken fake my SQL T on and pseudo service so this restart the MySQL service MySQL T stopped done so these are three commands that have to initiate or I have to execute these three commands to install the MySQL server communication package now I will run this command to get connected to the my SQL database instance since from the command my SQL - edge then let's go back to the artist - boat and that is copy and paste the endpoint name so let me just open RDS dashboard or the database - pod and let's go to the devious toises click on this trim assistance and copy the endpoint name just go back and pissed it now as this type in - capital P that's for boat 3 306 then - you for the username so the username is my DB tutorial and then - P - P for the password so just I will just go ahead and enter the password and here we go so from this instance I've connected to the my SQL database instance and these two things my front-end easy to instance and a little bit nervous instance are the part of my same environment I repeat my ec2 instance and the database instance are part of my same an environment they included as a part of same elastic Beanstalk environment now stop and show databases and I can see the list of databases that are created or that other part of this database instance so that's the entire process this is the step by step procedure for you to include an RDS database instance to be a part of an elastic beanstalk and Mamet so that's all for my sign that's how you include a database to be a part of the existing it has to be stock environment that's it thank you so very much in this video of the lecture we'll see that how you can make use of some techniques or the processes to decouple an existing Amazon RDS database instance from an existing elastic beanstalk environment because we have to remember one thing if we terminate the elastic beanstalk environment and you have the databases linked with an environment those databases will also be terminated so let's see the entire process so this is our node.js app that we have been working upon in the past few lectures and if it's go to all applications this is the only application I have right now this is the test environment with terminated and this is the prod environment now if it lets go to the prod environment and show you the existing configuration I just go to the configuration right now and show you the database scroll down and show you that this is the database which is being linked to this environment the problem with this type of configuration is that in the future if I terminate this environment for example if it's cool to actions and click on terminate environment it will also delete this database which we said there are some chances that my data would be wiped out if I don't have a snapshot manufactured behind the scenes so how you can decouple this database from the environment now what we'll do is that we will create a new environment a duplicate environment because this prod and Mohammed is being manufactured using the new source code so if I just click on the URL so this is the blue background that it's giving me in the form of the that page or the output so I've used the same source code to deploy the duplicate environment so I just deploy the duplicate environment and I'll ensure that once I manufacture a duplicate environment then I will link this database with that new environment that duplicate environment so let's manufacture a duplicate environment I will link this database to that new environment also I will ensure that I will just initiate some steps to safeguard this database from deletion now so let's create a snapshot of it and once I link this database with the new or duplicate environment I will just initiate the Bluegreen deployment I just swapped the URLs and point my domains traffic to the new environment and terminate the existing pradhan vironment so let's see the entire process from scratch firstly first I have to manufacture the database snapshot so I just go to the services and I open the RDS or the relational database service and as want to make sure that I just go to the D businesses and this code the instance once again this is the instance devious despot is up and running I need to take a snapshot of it then their dues ways out either I just go to the snapshot I can just take a manual snapshot if I want or else I can do one more thing is a alternate method I can just go to my prod environment and scoot the configuration and I just go to my database click on the endpoint in front of you and it will just open the RDS - boat and from here I can just manufacture snapshot let's go to modify I can choose this thing rotation create snapshot so this means that if I terminate the environment it will manufacture this snapshot or the backup of the database instance ok so it will perform the same steps or it will do that so if just to safeguard this thing I can just manufacture the snapshot or create a new snapshot right so we can go with either of these two ways the best way out is that I can just go ahead and click on apply and you will see that it will manufacture a snapshot of my existing database so that snapshot will encapsulate my database backup so let's go to a few seconds and see what happened so I just go to my ideas dashboard this is a snapshot dashboard and I hit refresh so let's see if it does something all right let's take the mel's snapshot I just take a new snapshot from scratch to ensure that before I perform any of the changes in that case I have a snapshot because to ensure that be on the safe side we have to have the backup of the snapshot or I would say we have to have the backup in the form of snapshot of the database instance so let's move for a few seconds because it's updating the environment settings we have to make sure that a snapshot is being manufactured before this data resistance gets terminated of course will not terminate that but just to ensure that once we delete the environment just in case if this database instance gets terminated in that case we have the backup of the database in the form of the snapshots now you can see that it's been done successfully I just go to the Hardys dashboard hit refresh so if I see any snapshot that's fine otherwise I'll dismantle facture new one okay let's do one thing let's manufacture a new snapshot so I just click on takes shot accused my deep instance I just named the snapshot as test snap shot that's it dump this is a manual snapshot I'm taking right now I click on take snapshot now one thing you have to keep in mind that a snapshot it's not free of cost you have to pay for it so if we're using a free tool account to perform these steps or to practice by yourself you have to pay for these snapshots okay so just to safeguard my data just to ensure that I have a backup of my data I took this snapshot of this existing database now I just go back to my database and I enable the termination protection so let's click on the database identifier kudou actions or okay because one thing you have to see it's backing up so in that case I will not be able to modify this database because once you create the snapshot once it's backing up you will see that the modifier option is grayed out so you have to wait for a few more seconds to see that it is being backed up let's wait now as you can see that this database instance is being backed up the status is available and if it is good with snapshots so our already taken the snapshot or backed up this database source code to my databases choose my database click on modify and the main thing that we have to do is that you have to emile this instance from termination and how you do that you just choose the enable deletion protection click continue now we want to apply it immediately such youth's option apply immediately and click on modify deep instance ok so now it will modify the attributes or this particular property of this addictive assistance and it will just immune it from the deletion process ok so we have done everything that's important from the tearaways perspective now let's go back to the environment - port the elastic beanstalk - boat and school - the app and as I said before this short environment would be deleted but before that we have to manufacture a duplicate environment we have to perform the Bluegreen deployment and ensure that the entire domains traffic goes to the new environment so what I do next is that I go to actions and click on create environment okay so once I click on create environment or we have to choose the environment here so I choose the web server environment you can select now we have to choose the environment name so I can go with any amount name so let's type in for example fraud duplicate environment fraud - plea gate environment so it's really important that you specify that the name of the environment then I specify the domain name so let's type in fraud or I would say to blockade thought something like that and if it is check the availability that's available and this is the tubule gate of the environment of the prod m1 meant top and one side to specify the description I choose the same platform the pre-configured platform that is the note Jas application code I will choose the so I can choose the existing version or I can just upload the same code just to ensure that we don't miss out anything so I choose the the zip package and I include this package in the resources section so that you can perform the same actions by yourself and this is the version label and click on upload okay so once I do that before I hit create environment I have to do one more thing that is link this duplicate environment with the existing database instance it is already linked to my Pradhan moment so how do I do that I click on configure more options down below so let's do that okay so once I click on configure more options I need to just scroll down and ok so here we go I was talking about this option software ok so you have to you don't have to go to database because if you go to database you can just deploy a new database instance but in our case we have to link this environment with the existing database instance yes you have to go to the software oh and click on modify so once your software was to go to the software settings by just hitting modify because we want to modify some software settings you just go to the environment properties and you have to mention the name and the value so firstly first is type in RDS host name so this is the process you have to follow this is the entire stuff that you have to do by itself to ensure that you can define the whole Snape then RDS pote then you have to type in RDS DB username or I would say name first so the database name then I define RDS user name and you have to make sure that you choose the same naming convention you have to use the capital letters the same format the same order you have to choose to link the existing environment I would say the new environment with the existing database instance you have to follow the same format the same order to link your existing database with the new environment okay and then I define the RDS underscore password da that's it now how you fill the values so first thing first in the host name I go to that audience - boat and I copy and paste the endpoint name in the host name it's a simple thing to do so I just go there and they find the host name boat would be 3 3 or 6 by default because we are using the my SQL database instance DB name the database name would be this one so ok let's go to the database options and so the database let's go to the configuration right this is the DB name this is a database name so I just copy the database name and just mentioned over here username so I define the user name of my database instance okay I mention the password and that's it so this thing you have to do these are the things that you have to mention over here so I defined the hostname port database name username and the password fine so this thing you have to define under these software settings you have to perform these actions in the process of launching a new elastic Beanstalk environment let's click on save and I click on create environment and you will see that now it's in the process of manufacturing and new lasting Beanstalk environment which will be linked to my existing interface instance which is still a part of the pradhan moment fine now in the meantime and it's want to make sure that this new environment so this is the environment duplicate environment which is still in the process because you can see the health status is pending it is still in the process of getting created so we have to ensure that it is up and running so let's wait for some time it will take few minutes for this new environment the duplicate environment to be up and running once it's been done we have to bend a plate or we have to change the inbound rules in the existing security groups we have to show that this duplicate environment is able to get linked to the new existing syllabus environment I would say we want to ensure that the pradhan vironment the duplicate environment is able to communicate with the back-end resistance we have to manipulate the security groups in that case but before that we have to wait because we have to ensure that this duplicate fraud and biomat is up and running so let's wait once it's been done I'm gonna resume the session I will just resume the video and show you the entire process from then onwards as you can see that my duplicate fraud environment of duplicate production environment is up and running and if it is click on this environment and discu-- to the configuration you will see that I just go to software and you can see it's linked to my existing database instance which is as if now also a part of this Shradha environment which I want to terminate afterwards okay now let's go to the environment and let's do one thing let's go to the configuration and we can just check some of the important settings the main thing that I'm looking for is the security group and this is the security group which is showing up right now this is the one okay this is one thing let's click on modify and this is the main security group that's a part of this elastic Beanstalk environment so I copied this anti group ID or I would say let's copy this one because the group ID starts from s XI and so I just copy the security group ID of this existing elastic Beanstalk duplicate production environment and then I go to the RDS and once it is cooled the RDS I click on connectivity and security and I need to make sure that this is the same suite group it's of it that's security group should be linked to the successor into the base because this security group as if now it refers to thee this fraud environment this one okay it's linked to this broad environment if I show you right now because I'm and need to make sure that we can update the exact security group and apply that to the database instance if I show you the configuration just don't show you you will see that this is the security group of my prod environment and ever show the artists dashboard you can see that is a patch okay so what we just show you right so this is the same security now I want to make sure that I change the security group of this database instance so that this data business is completely linked with my new a duplicate production environment okay so what I do next is that I could have modify and once that is click on modify I have adjust to remove the previous group and add on the new one so let's do one thing let's remove the previous group and mention the new one this one okay this is the one which is linked to my duplicate or new production environment okay I just go ahead and click on continue and apply immediately click on modify DB instance and that's been done okay that's been done now this will take some time to come into effect because as you can see that it is modifying so once you change any attribute of property of the database instance it becomes unavailable for some time you can see that it's removing the security group of the fraud environment and adding on the one for the duplicate environment ok then let's do one thing let's go back to the environment page let's go to the app page let's go to the applications nodejs app and now I will perform the blue/green deployment but before that I want to ensure that the duplicate environment is up and running it's giving me some type of output so let's go to the short duplicate environment click on the URL and here we go so it's giving us the desired output okay so in that case I'll just go back to my node.js app and remove this environment so now okay before I remove this environment I'll do one thing because I don't want to take any risk I go to my duplicate environment first and I just go to actions I click on swap environment URLs so I go to buy new or duplicate an environment the fraud environment duplicate fraud environment I click on swap and why with URLs and I want to select the environment to swap such use my pron environment so how to replace it with the duplicate environment click on swap so as if now what I'm doing and performed the Bluegreen deployment so I've gone to the duplicate environment and swapped the environment URLs and damn I just go to my note chess app and terminate this pradhan vironment ok so I choose my prod environment I don't need to have because I have then the swapping and scoots actions click on terminate environment add this mission the exact name of the environment to confirm that I want to get rid of it click on terminate and that's being done so as you can see that this this thing is being implement it so what I've done is that so I've swapped the URLs have just ensured that my environment the duplicate environment so let me hit refresh real quick so this Pradhan vironment is is getting terminated it will take some time so you can see that the term late in is in progress terminate in progress so I want that this fraud environment gets terminated and this fraud duplicate environment it becomes the main environment and it is connected to my existing database instance and I've decoupled it from the existing rdst resistance because just in case if I tell need this shorter duplicate environment in the future my existing RDS database in stress is not impacted because these two things are d coupled okay these two things are decoupled so that's the entire process so for a school the configuration once again I'll show you that this database instance is linked to by new product and I can see all the details so this is the entire process these are the steps that you have to follow to ensure that it D couple your our dias de resistance from the environment because you want to ensure that if you tell me the environment of the future then in that case your databases and not being deleted because in that case or in this entire process you have to perform the blueprint deployment so thank you so very much for watching this lecture once again thank you and that's it bye bye so they've discussed all the different topics of velocity beanstalk and we have completed the entire masterclass let us summarize everything we started with the elastic Beanstalk overview over here we have seen that what's the purpose of using the elastic beanstalk why we use it basically the developers used it has to be in stock to enhance their productivity because they just choose a platform upload their application version or they choose their source code and the entire application is being deployed so they don't have to get into the management complexities of the infrastructure they will discuss about the elastic these two components the three main components that we have discussed one is the application which is nothing but it's a collection of multiple elastic Beanstalk components then we have the application version it's a source code or the zip file that we upload to our platform to deploy the entire application then we have the environment it's a logical collection of multiple aid of those components that run an application version so these are three main components that we'll discuss as a part of elastic beanstalk they were discussed about the elastic mr. Furst environment so this is a complete hand-sewn that we went through we discussed that how you can make use of a simple mechanism to deploy an elastic beanstalk environment then we discuss about the launching and advanced or prod environment so in this lab session of the hands-on we included the hi ability configuration preset so in the high availability preset or the option or the mechanism we include a load balancer plus Auto scanning they were discuss about the different options and policies there are four main deployment options and policies we discussed one is all at once which me said all the instances have been taken out of service and we update all the stresses advanced then we discuss about rolling where we just take the best size and we go batch by batch and we update our application versions then we discuss about rolling with additional patches where we deploy additional batches so that we don't lose the capacity when we update our application version and we discuss about the immutable which means that you make use of the auto scaling group and you deploy a temporary auto scaling group to deploy or to update your application then we had the EB deployment policies hands-on so in this policy hands-on or deployment policy hands-on we implemented immutable deployment policy to update our application version implementing Bluegreen deployment so in this session or the hands-on we have seen that how it can implement a blueprint deployment and also we saw that that how you implement that we also included not 53 as a Dena's server and we saw that how you can make use of the vated routing policy and you can send a portion of traffic to the blue deployment or the blue environment and rest of the traffic game is sent to the green deployment and once the green deployment of the green environment is up and running it's healthy then you can swap the URLs and you can divert the entire traffic to the green environment we discussed what the advanced concepts so that three advanced concepts we have discussed one is the accession files then we have lifestyle policy so if we talk about the lifestyle policy you can maintain up to 1000 versions of your application and any version which is in use will not be deleted also we discuss about the environment tails the two types of environment that we have one is the web server tier and the second one is the worker dear so what the difference in the webserver do we use that to ensure that you can deploy your application server applications you've every API and so on so you can make use of your web app applications web api or you can send you HTTP requests to the web server environment on the other hand via the worker environment where we execute of your offload those tasks that take a longer time to be implemented so if there are any tasks that take longer time to process we offload those tasks to the volkl environment so then the worker environment we make use of the simple queue service we went to the hands-on of adding a database to existing elastic mystic environment sorry I showed you the entire process that how you can incorporate or you can inculcate the existing database to the existing elastic beanstalk environment last but not least we saw that huggin tea couple and Amazon RDS instance from an elastic mystic environment this is very important because if you don't decoupled the existing RDS TP instance or database instance from the existing elastic Beanstalk environment in that case just in case if you delete your application of the environment the database is also deleted to prevent that situation to ensure that you save godhood data you don't lose your database you can decouple your existing database from the existing it has to be Stoke environment so we went through step by step process to achieve that so there's all we have discussed in this entire master class thank you so much for your time and patience thank you so much once again
Info
Channel: Rohan Arora
Views: 10,754
Rating: undefined out of 5
Keywords: AWS, Amazon Web Services, Cloud Computing, EC2, Elastic Beanstalk, RDS, AWS Services, Database, MySQL, Deployment Strategy
Id: YwXRdFcPw8A
Channel Id: undefined
Length: 107min 51sec (6471 seconds)
Published: Mon Feb 17 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.