Haroon and welcome back now in today's We Do will be discussing about the basics of BlueGreen deployments
know within this deployment model.
There are two environments.
First, one is a blue environment, and the second one is a green environment.
So blue environment is an existing environment in production that is serving the life traffic.
So if you look into this diagram, blue environment, the request is coming to the blue environment
and the blue environment is also connected to that database.
No green environment is a bad environment, running a different version of the application.
So let's say that there is a new version of the application that needs to be deployed.
So what you do is you deploy that in a new environment altogether and that environment, you refer it
as a green environment.
And the blue green deployment refers to a routing the production traffic from blue to a green environment.
So that basically means that the current traffic that is going to the blue, it is now switched to the
green environment or the years.
So all the traffic switches to the newer version of the application.
Now, depending upon the services that you use, there are various ways in which this can be achieved.
Let's quickly look into how this is achieved with the help of Elastic Bienstock.
Now, currently, I mean, the elastic Bienstock console and we have an application called a demo app.
This application has to environment first is a blue one and second is a green one.
So let's open both of them.
So blue one has its own, you are red and green, one has its own unit.
So let's quickly open up the blue you are.
So this is how the page looks like.
And let's also open up the green order and this is how the page looks like.
Now, in terms of Elastic Bienstock, the way in which the blue green would work is typically through
swapping the environment you are.
So if you notice the Dinosauria there, Dionysius blue dot Ebbie, followed by the elastic means dot
dot com.
Similarly for green, the environment Dionysius green followed by dot elastic Bienstock dot com.
So what you do in Elastic Bienstock is you go out and go to actions, click onto environment, you add
it and then you specify the new environment.
In this case, the new environment is green and this is the environment are that it is showing.
So let's go ahead and click up now after the update has been completed.
You see, for the blue environment, the overall Dienes has been propagated from blue dot elastic Bienstock
dot com to green dot elastic means dot dot com.
And similarly, if you'll quickly refresh the green environment page, you will see the Deerness has
also been changed, Audur, now that the others are also switched.
In fact, if you'll quickly refresh.
So this was the older DNS for Blue Environment.
If you will quickly refresh this page now you'll see that the newer version that was part of the green
in the Army is being redirected here.
So in case of users are still visiting this, already worried they'd be redirected to the newer version
of the application here.
And in terms of green environment, it now has that the NSW dot elastic Bienstock dot com.
And now if you refresh the page, you'll see the older version of the application is being shown here.
So that is a very high level overview about the blue and green based deployment model.
Now do note that apart from the elastic Bienstock, there are various other ways as well in which bluegreen
can be achieved, like updating the DNS routing around 53.
You can the auto scaling group behind the elastic load balancer.
You can swap the launch configuration.
You also have a super elastic Bienstock environment.
So this is something that we've already seen.
And for ops folks, you can also clone stack video works and then update their DNS.
So multiple ways to achieve BlueGreen DNS, the overall concept we have already seen.
And we have also looked into how this can be achieved as part of the elastic Bienstock environment.
So this will conclude today's video.