 Hello and welcome to the Part 2 of this video mini-series. My name is Vinicius Apollinario and in this video mini-series I'm going to show you how to move an application from Windows Server 2012 R2, running on-premises in a virtual machine all the way to a container running on Azure Kubernetes Services or AKS. In the first video, I'll show you how to export the application from Windows Server 2012 R2. This is a ASP.NET application and we used WebDeploy to do that process. So WebDeploy went and selected all the configuration of the application, the assets for the application itself, like the file system and so on and then we generated a zip file. With that zip file, we came to Windows Admin Center and we were able to create this container image that you see in here. So now what we want to do is we want to push this container image to Azure and for that we can use Windows Admin Center as well. But I'm going to show you how to prepare your Azure subscription to receive that container image. So let's move to the Azure portal and here what I'm going to do is I'm going to create a new Azure Container Registry. A registry is a central location where you can store container images to be reutilized by other container hosts or other container services, like for example Azure Kubernetes Services. So let's go ahead and create that. So on the Azure portal, what I'm going to do is I'm going to select the option to create new resources. I'm going to create a new container registry, click add. As you can see, I have a registry here already, but I'm going to create a new one. I'm going to create a new resource group in Azure that allows me to manage multiple resources in one single group. So I'm going to call this container demo rg. Okay. The name of the registry itself will be used as the URL for finding your registry when you need to push or pull images to or from it. So I'm going to call this viniap registry, oops, registry demo. It's going to check if that URL is available, so in my case it is. I can select what is the location and the SKU. And the SKU will pretty much determine what are the features that are available to you. Some features are only available on the premium. You're going to see that, for example, networking and encryption are only available for the premium SKU. Skillability and performance will be also impacted depending on the type of SKU that you select here. I'm going to select standard because I don't need a lot of stuff here, but if I, for example, need to access this registry through the virtual network on Azure, I should be using, for example, the premium SKU. So I'm going to click next. As you can see, this is not available because it's not premium SKU. The encryption is also not available. I can put tags that will make it easier later to find the resource on Azure. If I have multiple resources using tags, it's a good way to actually find resources easier or even applying policies. As you can see, the validation passed, so I can go ahead and create this Azure container registry. Once the registry is created, so as I mentioned, I have a container registry already, which is this one. I have a few things in here that are important. One of the things is the repositories, which is where you actually upload or you push your container images to. And also you have your access keys. Access keys are important if you need to access this container registry without a Azure account or without a connection directly to Azure. For example, Windows Admin Center has a connectivity to Azure that allows you to use the Azure account itself to authenticate and see the access that you have. If you're using the Docker login command, for example, you would be using the username and the password here in order to access, because it's not directly tied to the Azure authentication. Very well. So now what I can do is I can go back to Windows Admin Center because I have a Azure container registry up and running. I can click the push option. And here you can see that I have my image, my tag. I can rename this if I want to. And basically what I'm going to do is I'm going to select the Azure container registry. As you can see, Windows Admin Center allows me to use either the authentication that I mentioned for Azure container registry. So it's going to check my subscription, the one you saw before. And as you can see, I have the two registries here, the one that was created already and the one that is new. So I'm going to select the new one and I'm going to click push. And of course, this will take a while for uploading the image. But once it's completed, I'm going to go back to the video. So I'm going to cut this portion of the video so you don't have to wait. Alright, so now the image was successfully pushed to the Azure container registry. I can close this window and go back to the Azure portal. Well, let's close this one because this is the one registry that I had already. Let's check the Azure container registries. I should have two in here. And this is the new one that we just created. And as I mentioned, the images are stored in these repositories item here under services. And then as you can see, the image is available here. When I click here, I have details about this specific image. And I have one tag available, which is exactly the one that we just pushed. I can click here. You can see that I have like, for example, what is the Docker pull command that I have to run on a new container host. If I want to use this image, I have the manifest of this image specifically here. I have a few more details that are important. You can check those later. Just pointing out that Azure container registry has a bunch of other features that we're not going to touch. Because this is not part of the target of this specific video miniseries. But I highly recommend you to take a look of some other features that Azure container registry provides. So basically, now I have an image here. And this image is available for other container hosts or other container services to be used. Now, as I mentioned at the beginning, the goal of this video miniseries is to show all the way to Azure Kubernetes Services. But just to finalize this video, I want to show you that you can also use start using this container image in other container services. So what I'm going to do is I want to use this container image with Azure container instance, the option that you see disabled here. And the reason why it's disabled right now is because I haven't enabled access keys for this specific registry. So let's do that. I'm going to come to the access keys. I'm going to click enable. Now that it's enabled, I can go back to the repositories. I can click my repo, this specific image. And now when I click here, I can either deploy to Azure container instance or app services. I'm going to run Azure container instance just for the sake of showing you the same image that you created on premises using Windows Admin Center can now be used on Azure very quickly when you push your container image to Azure container registry. So for Azure container instance itself, what I'm going to do is I'm going to provide what is the container name, the specific name for this instance. I'm going to call Vinny beer container. I can't use capital. So Vinny beer container. The image is already pulling from that image that we pushed to the Azure container registry. The OS type here is Windows. I'm going to select the subscription. What is the resource group I want to use? I'm going to use the same one. I'm just going to select West US here because it's closer to where the registry is. And then the number of course that I want to dedicate to this container and how much memory and of course on Azure, this is going to influence how much I'm going to pay for this instance of this container. If I want to provide a public IP address and what port I want to open for that container. If you remember, this is a web application. So I'm going to open the port 80 so we can then go and access this container. I'm going to click OK. Of course, this will take a few minutes to go and deploy because Azure container instance is pretty much going to pull the container image from the registry to the host that is going to run this container instance for me and then create the container and deploy it and so on. So I'm going to pause the video again for a brief moment and then come back when this is finalized. Alright, so now the container was deployed. As you can see the deployment was successful. Let's close this. Let's go back now to the Azure portal to the container instances so we can see the container, the vini beer container instance that we just created from the registry is actually up and running. I can see stats of CPU memory network, all the things you would expect from a compute resource. And then one of the things that I have here is I have the public IP address of this container. So if I open a new tab and I open that IP address and I say vini beer, which is the application itself and the calculator. This should be working because that's exactly the application that we containerized all the way back in the first video of this video mini series. So as you can see my application is working just to double check. We are going to once again specify some parameters here. So it calculates everything works fine. My application is working as it should be working because it's a container. It will run exactly the same way regardless on where you deploy it. So just to recap what we did on this video we pushed a container image from Windows admin center to our Azure container registry from Azure container registry. We can now deploy this container or push or I mean pull this container on container hosts or other container services. Like for example, Azure Kubernetes Services or Azure container instance, which is exactly what we just did here in this video. In the next video so next week what we're going to do is we are going to deploy a new Kubernetes cluster and we are going to call from this container registry the image that we containerized back on the first video. We are going to show now instead of Azure container instance from Azure Kubernetes Services. The main difference is Azure container instance is just one instance of this container is not an orchestration itself is just running the application on one single container. Azure Kubernetes Services provide all the orchestration for off Kubernetes as a service on Azure. So I hope to see you on the next video. I hope you like this one. Give us your feedback on what you think so far and I'll see you next week then.