 Hello everyone, this is Grant, your friendly neighborhood OpenShift team member. Last week something really important happened, apparently. And that was the release of the .dev top-level domain. And just like everyone else out on the internet, I went a little crazy myself and registered my own .dev domain. So what was interesting about doing that was that the .dev domain forces HTTPS by default. And so that can complicate things just a little bit when you're wanting to set up your domain name on OpenShift. So what I thought I'd do today is just put a quick little video together to show you how to use your fresh .dev domain on the OpenShift online pro tier or on any OpenShift for that matter. So what I'm going to do is I'm going to go ahead and log in to the OpenShift web console. You can see I'm logged in here. I'm going to create a new project over on the right. And I'm going to call this G Shipley Dev. And I'm going to call this G Shipley Dev. And I'm going to click on create. So this is going to create a brand new project for me. And we can see here it is G Shipley .dev. So the first thing I want to do is actually deploy my website that I want G Shipley .dev to resolve to. So what I'm going to do is browse the catalog and get a languages. I'm just going to select PHP. Of course you'll use whatever you need to use for your application. I'm going to call this G Shipley .dev. I set up a quick repository over on GitHub for this video. So let me find that repo real quick G Shipley .dev. I'm going to copy this and I'm going to use the awesome source to image project to build my container image on the fly. Let's go back to our overview and we can watch that building here. And it's pushing the image already. Okay, great. So we're scaling up our new website. It's almost done. All right. Now that everything has been deployed, what we want to do is just click on this default route first, just to make sure that the website has been deployed correctly. And we can see that the default route resolves G Shipley .dev is ready to rock. All right. So we got to do a few things at this point. Right now all we've done is just deployed a simple little PHP application. We actually need to configure the host name. Now as I mentioned earlier in the video, the .dev domains require HTTPS. So luckily an OpenShift team member has created an OpenShift ACME repository, which I have cloned locally. This will allow you to use Let's Encrypt certificates with OpenShift. Okay. So if we go over to the live section, we don't want to do cluster wide because I am not a cluster admin. We just want to do it on a single namespace. So I'm going to click that. We'll look at the documentation here. Looks like we can run a couple of commands and have everything working for us. So let's go over to our terminal. Now I am in the OpenShift ACME repo. I've actually cloned it to my local machine. So if we go back over here, we want to copy and run these two commands. But first, we need to make sure that we're using the gShiply dev project. So if I do OC projects, we can list them all. So let's just go ahead and switch to the gShiply dev project. And now we can run these two commands. I'll paste the first one in. Let's go back over and get the second one. Copy that. Go back to my terminal. Put that in. And let's go ahead and do an OC get pods. We can see that that container is already running. So let's just look at the logs for that container. OC logs dash F, paste in the container name here. All right. So let's go ahead and create a new route now for our project. If I go back to the OpenShift web console, we can see that the OpenShift ACME pod is running as well. So let's go ahead and go to application routes. And let's create a new route. We're going to call this my secure route. And our host name is www.gShiply.dev. We want to create a secure route, make an edge termination, and click on create. Now what we need to do is actually update our CNAME for our domain registrar. So if I click on gShiply.dev, we can, oh, I clicked on the wrong one. We want to click on my secure route and we can see that it says the DNS admin should set up a CNAME for www.gShiply.dev and use the canonical host name of the router. What's important to understand here is you do need this dot at the end. So I'm just going to copy that, go over to my domain registrar, and you can see that I've already added it in here. So if we edit this and paste this in, you can see that, oops, nothing has, well, I didn't actually copy it right. So if we go back over here and copy this, go over to my domain registrar, click on edit. We can paste this in and nothing changes. Okay, I just updated that so it would propagate before I made the video. Okay. So now we have a HTTPS gShiply.dev route, but if we go back to OpenShift ACME, it hasn't picked it up yet, okay? And so that's because you actually have to edit the route according to the ACME documentation. If we scroll up on the main GitHub page, it says once OpenShift ACME controller is running on your cluster, all you have to do is annotate your route like this. So it has a metadata section, and an editations, and this TLS ACME equals true. So I'm going to copy that. I'm going to go over to my OpenShift web console, click on application and routes, click on my secure route, that's the one for gShiply.dev, and I'm going to edit the YAML for this. We can see we have a metadata section here, so I'm going to hit enter, and I'm going to paste in the annotation, Kubernetes IOTLS ACME equals true, I'm going to click on save. Go back to my console, we can see that it is trying to generate the cert here. And it looks like exposing route, my secure route is accessible and contains correct response. So it looks like everything has been set up now, finished syncing the route. So if we go back over to the OpenShift console, we can see we have our HTTPS route, we have the OpenShift ACME controller running, perfect. And now for the big shebang, ladies and gentlemen, let's see if this actually worked. I'm going to make this a little bit bigger here, we have HTTPS www.gShiply.dev, let's go ahead and click that link. And pal, it all worked. We can see we have HTTPS www.gShiply.dev, let's encrypt certificate, all running on OpenShift Online Pro. All right, so I hope everyone enjoys their .dev domains and looking forward to everybody deploying those on OpenShift.