Welcome back to backspace Academy. In this lab on Elastic Beanstalk 2
we're going to be using the elastic Beanstalk service to deploy a NodeJS application 3
and deploy it to a highly available and fault tolerant architecture. So starting 4
off in the Elastic Beanstalk console again we get there from services and 5
Elastic Beanstalk once we're there we can see a welcome screen there 6
if we haven't got any Elastic Beanstalk environments already. What I'd like to do 7
now is just click on get started and we'll give our application a name 8
We'll select nodejs as our platform and we're just going to use the sample 9
application that AWS use and we're going to click on configure more options now 10
if we didn't click on configure more options and just clicked straight on 11
create application it would launch our environment as a single instance 12
so it wouldn't be a highly available and fault tolerant architecture and so as we can 13
see here our capacity is just a single instance and we don't have a load 14
balancer so what we need to do is we need to select high availability and 15
there we can see our capacity has changed and it's going to be in an auto scaling 16
group that will have instances ranging from 1 to 4 and we can change 17
that as well and also we can see there that we've got a load balancer as well 18
so what we'll do is we'll click on now we'll click on create' app and what it's 19
going to do it's not only going to create that elastic beanstalk 20
application for us it's going to create an environment to launch our code on and 21
that will be a highly available and fault tolerant architecture, ok so after 22
a certain amount of time we've got there our environment has been launched and 23
we've got the big green tick there, now what we can do is we can go to this 24
endpoint up the top here which will be the URL for our application our web 25
application, so we click on that and there we can see that is the sample 26
nodejs application from AWS now that will be deployed to a HA and FT 27
architecture what that means is it will have an auto scaling group and ec2 28
instances will launched by that and it will also have 29
an elastic load balancer as well so let's just make sure that that has 30
actually occurred, so we go to services then go over to ec2 31
and if you remember we had our auto scaling group was varying between one 32
and four depending on demand, so there we can see we've got one instance 33
running now if we scroll down we should be able to find a load balancer there as 34
well so there we go we've got our elastic load balancer there that is been 35
created by elastic beanstalk and it's got one instance in service we should 36
also have an auto scaling group and there we go we've got an auto scaling 37
group as well and then we can see it's got a desired capacity of one which is 38
what we're at now and a minimum to maximum of four depending on demand on 39
those instances so what we'll do now is that we've pretty well finished a lab 40
what we need to do now is clean this all up to make sure that we don't get a bill 41
so the best way to do it is not to go in and delete resources what you need to do 42
is go into all applications and then just select that application here with 43
actions and delete the application so that will delete your application and it 44
will also delete that environment that was created by elastic Beanstalk so we 45
click on delete so it doesn't look like anything's happened but if you click on 46
that environment you will see that is now terminating your environment and 47
after a few minutes those all those resources they auto scaling group that 48
elastic your load balancer the instances all will be removed from your account 49
and you won't get billed for that so that brings us to the end of a pretty 50
straightforward lab and I look forward to seeing you in the next lecture