본문 바로가기
[AWS]/Highly Available, Scalable, AWS Stack

19. Configure & verify application

by SAMSUNG CLOUD-OKY 2022. 1. 20.
반응형

 

OK in this video that's the how to configure the application.

With the URL of the S3 image right.

So this is the URL of the S3 image and also the endpoint the DNS endpoint of the RDS instance

that we have.

Right.

And we need to configure these in our PHP application so that so that the application can talk to RDS

and it can also use the image from S3.

It can also use the image from S3.

So the URL would have to be in the S3 page so that two pages that we need to change

are these S3 Image dot PHP and also RDS dot PHP once we make these changes we will then

verify verify will access the Elastic IP or public IP address of the instance and verify these two pages.

Right.

And just remember that.

I'll show you this for one server.

But you have to do this for both servers.

So we have two instances remember in two different zones so make sure that we make these changes for both server.

Will be using this later.

When we look at the load balancer.

Right.

OK so let's go ahead and here's our S3 image.

This is our image.

We use this you URL and configure this URL in our application and here's our RDS instance and

we will configure the endpoint of the RDS instance.

This one here right.

In our PHP page.

OK.

So let me connect via Ssh to one of the servers this one.

And let me edit first the S-3 page.

OK let me edit the RDS page first.

Right so this is the RDS page.

And what we need to do here is change this line which is the connection string.

Right.

So first the hostname and then be just be the end point of RDS this one.

Let me copy this and paste like this right and make sure that if it goes into the next line you bring

it back OK because otherwise there'd be a syntax problem and your page would not work so.

So this is very important.

And then the RDS master username and password.

So I have set this up as root and password you have set this up differently so please make sure that

you set up the correct information.

Here.

OK.

So that's our RDS page.

All right next we change the S3 page

the S3 page.

And here we need to enter the URL of the image.

So.

So we're here in the image tag.

Let me change the placeholder let me remove the placeholder and let's go to S3.

And this is the URL.

Let me copy this and let me paste this into that into that page like this.

OK.

Again if it goes back into goes into the next line or something like that.

Make sure that you bring it back and make sure that you have the the right quotes here.

don't make any mistake small mistake small typo can cause you problems.

So.

So once you do that.

Right.

We have set up the URL of the image as well.

So so now let me exit.

Let me exit this session and let's test our application.

Right.

So here's our home page on this.

Server right and we need to test two pages.

The first one is the image.

This one right and this one it should show us the AWS icon because we're able to fetch the image from

the S3 bucket.

Right.

And next let's test the RDS page.

And this should say connected as well which would mean the EC2 instance or the application in

the EC2 instance is talking to the RDS.

Instance succesfully.

OK.

All right.

So so this is how you can configure the application and the test the application as well.

Remember we set up a RDS PHP page and and pointed this to the end point.

Right.

And also the RDS master user name and password that we had set up when launching the RDS

instance.

And then in the S3 image dot PHP page we set up the URL this URL of the the image

that we had uploaded.

Ok then we verified using these two pages right.

Using the public IP address of the instance.

And and also remember don't forget you have to change this for the second instance as well the second

instance should have the same exact same changes.

It changes as well.

Good luck with this task.

 

 

 

반응형

'[AWS] > Highly Available, Scalable, AWS Stack' 카테고리의 다른 글

21. Configure sticky sessions  (0) 2022.01.23
20. Setup load balancer  (0) 2022.01.23
18. Centralize images in S3  (0) 2022.01.19
17. Separate db tier  (0) 2022.01.19
16. Intro: Fault tolerance - multi-tier architecture  (0) 2022.01.19

댓글