Cloud Infrastructure: Startup to Scale

Verifying Deployment

Erik Reinert
TheAltF4Stream
Cloud Infrastructure: Startup to Scale

Lesson Description

The "Verifying Deployment" Lesson is part of the full, Cloud Infrastructure: Startup to Scale course featured in this preview video. Here's what you'd learn in this lesson:

Erik fixes an issue with his application's ability to connect to Supabase. The GOOGLE_REDIRECT_URL has also been updated with the new App Runner domain. The application is tested to ensure that the domain, authentication, and profile functionality all work.

Preview
Close

Transcript from the "Verifying Deployment" Lesson

[00:00:00]
>> Erik Reinert: For everyone who has a successful deployment, at least while I'm waiting for mine, there's a couple of things we need to do. So, we deployed. Yay, but if you click on it, what happens? What happens when you click on your URLs? Does the page actually load? Cool.

[00:00:13]
Awesome. So that's great. However, if you try going through the Google process, what happens?
>> Speaker 2: It's not going to work.
>> Erik Reinert: Yeah, it's not gonna work, yeah. So that's because we don't have the domain set up properly for the. So what we want to do is we want to go back to Google Cloud.

[00:00:31]
So everybody go to Google Cloud, get to your clients or get to your credentials, click on clients, go to here. Then what we want to do is for now, and again, I said earlier you probably wouldn't do this, but for now, what I want you to do is effectively add a new URL with the base being your service that you just deployed.

[00:00:53]
If I go here, you can see my address is nz, blah, blah, blah, blah, blah. Whatever. It's going to copy this. I'm going to go to here, paste this in, and then I'm just gonna copy this little last portion here, do that and then hit Save. The next thing you're going to want to do before that, my bad, is go to Configuration.

[00:01:21]
You're going to want to click on Edit for your service again. This is how you would update service configuration values in general Edit. Then it'll give you the ability to change that URL as well. Your Google redirect URL to the same thing too. Then you should see a button that says Save and Deploy or Save and rebuild on the right.

[00:01:44]
Just click that and you'll get back to where I am, where I'm waiting on a deployment. Go to Configuration tab in App Runner. Go to Edit under Configure Service, little button right there. Sorry, little button, right? Yeah. You see it? Cool. And then just update the URL here as well to the exact same thing.

[00:02:10]
>> Speaker 2: I think you just have the-.
>> Erik Reinert: I do, yeah. I'm grabbing this. Thank you. Nice. There we go. And save changes. So this should deploy or trigger another deployment. Basically, anytime you change a configuration value or deploy an image, you will have to wait for it to go through the deployment process.

[00:02:37]
So, my deployment is done. We updated the credentials, meaning that Google's credential OAuth should work now. And we also have a database. So we should have two expectations. The first expectation should be that the page loads. I can go through the OAuth process, and that I can also create a user or all that stuff, create all that database entries and whatnot.

[00:03:02]
I'm going to load the page right. I'm going to click get started. Awesome. I do see that. I'm gonna click on my login. Hey, look at that. Okay, cool. So after a decent amount of work I was able to actually log in. Okay, very cool. I'm going to type in my display name as Black Glasses.

[00:03:21]
I'm gonna hit save changes. Does that work? There we go. Awesome. So yeah, so I'm seeing my username. Let's go in here and say something fun. Share update. There we go. Cool, cool. What do we have? Well, after a decent amount of working, we now have a fully running application in the cloud.

[00:03:48]
Now again, this was a little tough the first time. Think about having deploy a whole Kubernetes cluster. Compare that to what you just did. Even though what you just did was obviously a little challenging because it's like new and whatever. But the reality of it is that most people can do what we just did versus what a lot of other delivery and deployment approaches are.

[00:04:15]
Again, like ECS or Kubernetes even. There was no need or knowledge of VPC or of networking. There was no need or knowledge of any low level thing. It really just kept our focus entirely on what we were trying to focus on, which is deploying our application. We've done that.

[00:04:36]
We've successfully done that. I am on an application in the cloud. This is not hosted by me. We have a URL that's working. What's cool is now I can even go in and start looking at those metrics. I should start seeing some metrics slowly come in. You can see I have one little metric, one little guy right here that says I have five requests that have been sent over.

[00:04:58]
I could see the response count which again, 204 requests. I'm guessing I had one. There's my request latency. I can see that on average my requests are around 60. I'm guessing this is MS, so 60 milliseconds, which is really great. That's pretty fast. Then we can see my active instances and utilization.

[00:05:21]
CPU utilization is tiny. I don't have to worry about that at all. Memory utilization looks good and concurrencies is pretty much dead. So yeah, I mean I have a running application so the last thing we want to do really quickly is just make sure that we commit those changes.

[00:05:39]
So, what we're gonna do is we're gonna to workshop or your branch that you're working on if you haven't yet. I had to commit and push mine up because I was pushing up that example. But if you do just git add a that that will make sure to add everything to your branch.

[00:05:57]
Does git commit M and then we'll just say added docker file for deployment, right? Hit enter and then you'll do git push origin and then the branch name or git push if you want. You can just do git push. So we'll do git push and then there you go.

[00:06:17]
Your code is up to date. So now if you go to your print, you should see basically something that looks like mine. We'll go to my PR really quickly, make sure that you have these changes as well. You will have probably a whole bunch of template changes and stuff like that.

[00:06:35]
Don't worry about that. The only change you really need to worry about is the dockerfile change that we made. This is really it. You may have the docker compose change, but that was a fix. That was something that realistically would have been there at the beginning of the course.

[00:06:52]
So if you think about like what would have only been added in this case, all we needed was a docker file to deploy our application to the cloud.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now