- We've come a long way in this course so far.
We've built out a continuous deployment architecture
that takes code from GitHub,
pushes it through a Jenkins,
automatically builds the Docker images
and stores them in our private registry,
and pushes it to an ECS infrastructure
while attaching it to a load balancer
for production traffic.
That's pretty good so far.
But, how about some testing?
How do we know if what we're pushing to production
actually works?
In this video, we're going to break that link
between the build job and the deploy job,
and insert another job between
whose goal is to do some testing.
It's going to deploy the same image as the production job,
but it's going to deploy it to a testing infrastructure.
Somewhere it can go without being exposed to public use
while we're checking to make sure that it works.
Now, what do we need to build to do this?
Well, we're going to need to build
a new application load balancer,
one to use for testing,
and we're going to need to change the fact
that the deploy job, currently, has a hard-coded link
to this application load balancer.
So we'll need to make that a variable,
and then have the integration test job
pass the load balancer ID through to the deploy job
so it knows whether it's deploying
to production, to testing, or somewhere else.
So let's get started by first
building a new application load balancer,
then changing our deploy job
so that it takes that parameter.
Heading over to the EC2 console,
I'm going to head down to the load balancer section.
And here we see the production web site load balancer
we built previously.
Now, I'm going to go ahead and make another one
that's almost the same.
I'm going to go through the same process,
again I'm going to choose application load balancer,
that's the one that works with Docker containers.
Then, to give it a name, I'll call it testing web site.
Internet-facing, ipv4 is fine for this demo,
and we want it to be listening on port 80,
the same as the other.
For vpc, again I'm choosing
the vpc that you've been using throughout this course,
yours of course will be different.
Choose all my availability zones,
so I make sure I include the ones that are required.
And next, yes I understand this is
open to the public and good enough for testing.
Okay.
And again, I'm going to create a security group for it,
giving it access to port 80.
Now, under the target groups,
as I mentioned before,
we're creating the load balancer
before we create the thing that we'll send traffic to.
So we're going to give it another dummy value here.
One little thing to remember is,
you actually need to give it a different name
than was used in the previous one,
so for this one, I'm going to call it
another thing not used.
And for the path, I will call it
another path not used yet.
We don't have any targets to give it yet,
those will be created by the UCS service.
So I just click next,
and then we can review and create.
Ah, great, it's done.