Welcome back to Stage 3
of this advanced demo series.
And at this point in the demo series,
this is the infrastructure
that you have within your AWS account.
The two environments,
the simulated on-premises on the left
and the AWS environment on the right.
And in the previous stage of this demo series,
you created a VPC peer between both of those environments.
Now in this stage of the demo series,
you're going to be provisioning
all of the infrastructure at the AWS side.
So you're going to start by provisioning
the database within AWS.
So this includes an RDS subnet group
and an RDS managed database implementation.
So we're going to configure a Free tier eligible
Single-AZ implementation of RDS.
And that's going to be the end state database
for this application migration.
So currently the database is stored on the simulated
on-premises environment on the CatDB server,
and we're going to migrate that data
across to the RDS instance.
You're also going to be provisioning an EC2 instance
which will function as the web application server.
So this is going to be a WordPress instance
using an EBS boot volume and data volume.
And you're going to install WordPress on this instance
and then migrate all of the non-database assets
from the current web server
across to this brand new EC2 instance.
And you'll be using SSH to sync these non-database assets
between CatWeb and this new EC2 instance.
And at the end of this stage of the demo series,
this EC2 instance will be able to communicate
with the CatDB database server
and you'll have migrated
at least the web part of this architecture
from the simulated on-premises environment,
through to AWS.
And at this point, users can connect to this EC2 instance
and see the same application.
Now to perform all of these tasks,
we need to be at the AWS console.
So let's switch over and get started.
Now this is going to be a fairly
command-heavy stage of the demo series.
So please go ahead and open the text instructions
for this stage of the demo series
which are attached to this lesson.
The first thing we need to do
is to create the RDS subnet group.
So let's click on Services
and then move to the RDS console.
Provisioning the RDS instance is going to be the most
time-intensive part of this entire demo series,
so we're going to get this out of the way first.
To get started, go ahead and click on Subnet groups
on the menu on the left,
and then create a DB subnet group.
Now the subnet group determines
where RDS puts the database instances.
So although we might have a full range of subnets
in each of the Availability Zones in a region,
we need to give RDS the directive
of where to place its instances.
So that's what a subnet group accomplishes.
So we're going to call the subnet group A4LDBSNGROUP,
and we'll put the same for the description.
For VPC, click in the dropdown,
and we're going to create this within the AWS environment.
So select awsVPC.
Scroll down further and under Add subnets,
first, we need to pick the Availability Zones
that we're going to use.
So click in that dropdown
and just go ahead and check the box
next to us-east-1a
and us-east-1b.
We're going to use both of these Availability Zones
for this subnet group.
Now we're going to be telling RDS
to put the database into the private subnets
within the AWS environment.
Now if we go to the VPC console and click on Subnets,
you'll see that we have aws-privateA and aws-privateB.
Now A uses 10.16.32.0/20
and B uses 10.16.96.0/20.
So we need to select both of those subnets.
So click in the Subnets dropdown.
Check the box next to 10.16.32.0
and then the box next to 10.16.96.0.
So that's private A
and that's private B.
Once you've selected both of those,
scroll down and click on Create to create this subnet group.
Next we need to create the database itself,
so click on Databases and then click on Create database.
I'll close down these headings
just to make it easier to see.
Now we could select Easy create to make this easier
but we're going to select Standard create
because I want you to have the experience of creating
as many RDS implementations as possible.
We're going to deploy a MariaDB database instance,
so select MariaDB.
And then scroll down and under Templates,
I want you to pick Free tier
because I want to keep this advanced demo
as much within the Free tier as possible.
Now if this was a production deployment
then you would select production,
and that would give you the ability
to use larger RDS instant sizes
as well as a multi AZ deployment.
Because this is just a demo,
we're going to leave it on the Free tier.
Now scroll down further still
and we need to enter some values under Settings.
Now these values are the ones I told you to note down
in Stage1 of this demo series,
the ones that we used as parameters
at the CloudFormation template.
If you didn't note them down,
then just click on Services
and type "cloud" in the Find Services box,
locate CloudFormation,
open that in a new tab.
Click on the DMS stack which you created
at the start of this demo series
and select the Parameters tab.
And all of the options that we'll be using
will be contained within these parameters.
So back at the RDS console,
under DB instance identifier,
we're going to use a4lwordpress.
We're going to use the same for the master username,
so a4lwordpress.
And then for the master password,
if I just go back to CloudFormation,
we're going to use the DB password value.
So this is just a random password
that I created for this demo series.
So just copy that into your clipboard
and then paste that in for both the Master password
and the Confirm password.
Next, scroll down.
And we don't need to set anything for the DB instant size
because that was set using the Free tier template
that you selected above.
Scroll past Storage.
Scroll past Availability & Durability.
And we need to change values in the Connectivity section.
We want to deploy this into the AWS VPC,
so click in the dropdown and select awsVPC.
Make sure that the a4ldbsngroup is selected,
so this is the subnet group that you just created.
Make sure that it's set to No for public access.
And then under Existing VPC security groups,
click in the dropdown and I want you to pick
the one that says awsSecurityGroupDB.
Now you'll have some text at the start
and some random at the end,
just focus on the one that says awsSecurityGroupDB.
Select that and then delete the default
by clicking on the cross.
Scroll down again and expand Additional configuration.
Under Initial database name,
go ahead and enter a4lwordpress.
So this tells RDS to create
an initial database called WordPress,
which is the one that we'll be using
DMS to migrate our data into.
That's everything we'll need to do,
so scroll all the way down to the bottom
and then click on Create database.
Now that will take some time to create,
anywhere up to 45 minutes.
Although usually, it is in the range of 15 to 20 minutes.
While that's creating, we're going to go ahead
and provision the EC2 instance
which will function as our AWS web server.
So click on Services.
And then into this box,
type EC2 and click to move to the EC2 console.
Now at this stage, you will be running some commands.
So make sure that you have this stage's instructions open
because using those, you can just copy and paste
as we need to run commands.
So to get started, go ahead and launch an instance.
Okay, so first under Name,
type "awsCatWeb".
That's what we're going to call this EC2 instance.
Then scroll down.
Click Amazon Linux
and make sure Amazon Linux 2
AMI HVM SSD Volume Type is selected.
It should say "Free tier eligible".
Just make sure that it does.
Directly below that, make sure that Architecture
is set to 64-bit x86.
Scroll down.
Under Instance type, again, make sure this is set
to a Free tier eligible instance.
In my case, the default is t2.micro.
I have seen some cases where T3 instances
are Free tier eligible.
In either case, make sure yours is set
to a Free tier eligible instance type.
Scroll down again and under Key pair login,
click in the Key pair name box
and select Proceed without a key pair, not recommended.
Scroll down.
Next to Network settings, click on Edit.
Change the VPC to awsVPC.
Change the subnet to aws-publicA.
You can leave Auto-assign public IP to Enable,
which is the default.
Under Firewall security groups,
choose Select existing security group.
And then in the Common security groups dropdown,
go ahead and select the one
that contains awsSecurityGroupWeb.
It will start with DMS
and have some random at the end, that's okay.
Just make sure you pick awsSecurityGroupWeb.
Scroll down further still.
We don't need to make any changes to Configure storage.
Expand Advanced details and look for IAM instance profile.
Click that dropdown,
select the one that contains awsinstanceProfile.
Again, it should start with DMS
and end with some random, that's okay.
So select that.
That's everything we need to configure,
so go ahead and click on Launch instance.
And once you've done that, you can click
on View all instances.
And we'll need this instance to be in a running state
and have 2/2 checks before we can continue.
So go ahead and pause this video
and wait for the AWS CatWeb instance to be running
and have 2/2 Status checks.
Okay, so this is the end part one of this lesson.
It was getting a little bit on the long side,
and so I wanted to add a break.
It's an opportunity just to take a rest
or grab a coffee.
Part two will be continuing
immediately from the end of part one.
So go ahead, complete the video.
And when you're ready,
join me in part two.