1 00:00:01,040 --> 00:00:02,040 In this demonstration, 2 00:00:02,040 --> 00:00:06,410 we'll take a look at the Microsoft Azure Migrate App Containerization tool. 3 00:00:06,410 --> 00:00:10,460 We're looking at the desktop of another of my Windows Server 2022 4 00:00:10,460 --> 00:00:14,170 machines, and I've installed the tool, basically the App 5 00:00:14,170 --> 00:00:17,500 Containerization tool when you look for it online. 6 00:00:17,500 --> 00:00:20,030 I can quickly show you. If you just do a search for 7 00:00:20,030 --> 00:00:24,840 Azure Migrate App Containerization tool. 8 00:00:24,840 --> 00:00:28,730 Yeah, if we come to the appropriate Docs article, here it's called 9 00:00:28,730 --> 00:00:33,150 ASP.NET app containerization and migration to AKS, and there's an 10 00:00:33,150 --> 00:00:36,190 additional path for Java web applications as well. 11 00:00:36,190 --> 00:00:36,560 Remember, 12 00:00:36,560 --> 00:00:40,010 those are the two frameworks that are supported as of Summer 13 00:00:40,010 --> 00:00:44,520 2022. And we download and install, it's just a PowerShell script 14 00:00:44,520 --> 00:00:48,900 that stands up a simple web application. And this desktop 15 00:00:48,900 --> 00:00:51,140 shortcut launches the web app. 16 00:00:51,140 --> 00:00:52,060 Let me bring you over. 17 00:00:52,060 --> 00:00:54,780 I've got it running right here. And on my machine, 18 00:00:54,780 --> 00:00:59,940 it's running with a self‑signed certificate on port 44369. 19 00:00:59,940 --> 00:01:04,100 The user interface is very similar to the Azure Migrate UI. So what 20 00:01:04,100 --> 00:01:08,120 we're going to do here, for Application type, we can do either ASP or 21 00:01:08,120 --> 00:01:13,970 Java. Now I don't have a Java Tomcat app, but I do have an ASP.NET web 22 00:01:13,970 --> 00:01:15,460 app running on my other server. 23 00:01:15,460 --> 00:01:19,770 Remember, in the first demo we looked at the AZ‑801 sample 24 00:01:19,770 --> 00:01:22,640 app that I created on my mem1 server. 25 00:01:22,640 --> 00:01:27,040 So we're going to use that. Let me select ASP.NET web apps, and then for our 26 00:01:27,040 --> 00:01:31,140 target Azure service, you can go to AKS or App Service. 27 00:01:31,140 --> 00:01:35,460 I'm going to choose AKS, and we'll click Continue. The prerequisites, 28 00:01:35,460 --> 00:01:39,360 we have to verify we're willing to use prerelease software, and then, 29 00:01:39,360 --> 00:01:44,310 depending upon whether you're doing Linux and Java versus ASP, if 30 00:01:44,310 --> 00:01:46,650 you're doing ASP on Windows, 31 00:01:46,650 --> 00:01:48,960 you'll need Web Deploy, and notice that that can 32 00:01:48,960 --> 00:01:50,910 get picked up as a prerequisite. 33 00:01:50,910 --> 00:01:52,770 If you're doing Java and Linux, 34 00:01:52,770 --> 00:01:57,870 it will be SSH. Here we're using PowerShell remoting instead. 35 00:01:57,870 --> 00:02:00,320 That's something else. I'm in a domain environment, so I 36 00:02:00,320 --> 00:02:02,440 really don't need to worry about that. 37 00:02:02,440 --> 00:02:03,400 Let's click Continue. 38 00:02:03,400 --> 00:02:06,640 We, of course, have to sign into our Azure subscription. 39 00:02:06,640 --> 00:02:12,370 I'll do a browser code flow here by pasting in that one‑time code, and then 40 00:02:12,370 --> 00:02:15,780 signing in with my Azure administrator credential. Yes, 41 00:02:15,780 --> 00:02:20,630 I am trying to sign in here. Let me clean up these browser tabs 42 00:02:20,630 --> 00:02:24,140 here, and then we'll select our Azure Active Directory tenant, and 43 00:02:24,140 --> 00:02:27,340 my subscription, and click Continue. 44 00:02:27,340 --> 00:02:30,150 All right. So we're now discovering applications. We're going 45 00:02:30,150 --> 00:02:36,240 to need the Server IP or FQDN. Now that is, let me see. Go to 46 00:02:36,240 --> 00:02:43,540 my 10.1.10.1.65, 10.1.10.1.65. 47 00:02:43,540 --> 00:02:46,530 The credentials are going to be like this. 48 00:02:46,530 --> 00:02:50,440 Let me add my password, and then let's validate that. Okay, 49 00:02:50,440 --> 00:02:51,710 good. So far so good. 50 00:02:51,710 --> 00:02:56,030 Let's click Continue. One application has been discovered. 51 00:02:56,030 --> 00:03:00,520 Notice that the wizard, the web application will attempt to pick up 52 00:03:00,520 --> 00:03:03,900 an app configuration. Wasn't able to do that here. 53 00:03:03,900 --> 00:03:08,440 My simple ASP is just a straight‑ahead, out‑of‑box example. 54 00:03:08,440 --> 00:03:10,680 I'm going to give the Target container a name. 55 00:03:10,680 --> 00:03:17,110 I'll just call it webapp. So it's discovered at the Default Website, I've 56 00:03:17,110 --> 00:03:21,040 got the name of what the resulting container will be. 57 00:03:21,040 --> 00:03:26,000 We could inspect the app configuration if there was one, Application folders, 58 00:03:26,000 --> 00:03:28,440 it's telling us where it's looking. 59 00:03:28,440 --> 00:03:30,540 We'll click Continue here. 60 00:03:30,540 --> 00:03:30,940 Okay, 61 00:03:30,940 --> 00:03:33,590 after discovery we're going to build up the image. And we're going to 62 00:03:33,590 --> 00:03:37,100 need, first of all, a location to put the resulting image. 63 00:03:37,100 --> 00:03:39,840 That's going to be in Azure Container Registry. 64 00:03:39,840 --> 00:03:43,570 What I like here is that if you don't already have a registry created, 65 00:03:43,570 --> 00:03:45,840 you can create a new one on the fly. 66 00:03:45,840 --> 00:03:46,690 So let's do that. 67 00:03:46,690 --> 00:03:48,840 We'll put one in my subscription. 68 00:03:48,840 --> 00:03:51,350 I'll put it in the AZ‑801 resource group. 69 00:03:51,350 --> 00:03:57,340 I'll call it twaz801acr1. That has to be a globally unique name. 70 00:03:57,340 --> 00:04:01,250 I use East US, and the SKU, I'm going to go for Standard here. 71 00:04:01,250 --> 00:04:05,070 If you want to do things like digitally signing your images and that, 72 00:04:05,070 --> 00:04:06,050 you'll want premium. 73 00:04:06,050 --> 00:04:08,520 I would stay away from basic unless it's just an 74 00:04:08,520 --> 00:04:11,840 evaluation scenario. Create will work here. 75 00:04:11,840 --> 00:04:12,350 Excellent. 76 00:04:12,350 --> 00:04:12,810 Okay, 77 00:04:12,810 --> 00:04:15,470 so Click Build to start building the container image 78 00:04:15,470 --> 00:04:17,750 after reviewing the Dockerfile. 79 00:04:17,750 --> 00:04:22,430 Now if we click Review, it shows us what the wizard here has auto 80 00:04:22,430 --> 00:04:25,900 created for us. And the Dockerfile syntax, again, 81 00:04:25,900 --> 00:04:29,520 I would strongly recommend you look into the Pluralsight library for deep 82 00:04:29,520 --> 00:04:33,960 understanding, but it's just a plain text file called Dockerfile with an 83 00:04:33,960 --> 00:04:38,270 uppercase D and no file extension, and it's always going to start by 84 00:04:38,270 --> 00:04:41,230 grabbing or downloading a base image. 85 00:04:41,230 --> 00:04:46,290 In this case, it looks like it's an asp.net:4.8‑windowsservercore image. 86 00:04:46,290 --> 00:04:51,290 And then we've got a variety of commands like COPY to put files into 87 00:04:51,290 --> 00:04:55,670 the container, RUN if you need to, in this case, it looks like it's 88 00:04:55,670 --> 00:05:00,020 doing Invoke‑WebRequest to download Web Deploy and install it in a 89 00:05:00,020 --> 00:05:03,850 quiet way. And then we're going to do things like creating the entry 90 00:05:03,850 --> 00:05:05,140 point of the container. 91 00:05:05,140 --> 00:05:09,050 What network ports are you going to expose? When the container has 92 00:05:09,050 --> 00:05:11,870 started, what is actually going to run? You see what I mean? 93 00:05:11,870 --> 00:05:16,940 In here it looks like that logic is encapsulated in a PowerShell script. 94 00:05:16,940 --> 00:05:21,260 So this is again, intended to potentially save you quite a bit of effort here. 95 00:05:21,260 --> 00:05:23,510 Let's click Build. And again, 96 00:05:23,510 --> 00:05:27,360 as part of the prerequisites, this web application will install 97 00:05:27,360 --> 00:05:31,220 the appropriate Docker tools on the server so that it can handle 98 00:05:31,220 --> 00:05:33,400 that just in a very automated way, 99 00:05:33,400 --> 00:05:37,640 as you can see. Looks like the build status was successful. 100 00:05:37,640 --> 00:05:40,970 Let's click that link and zoom in. This just gives 101 00:05:40,970 --> 00:05:45,240 you a nice log of what's happened. 102 00:05:45,240 --> 00:05:45,670 All right, 103 00:05:45,670 --> 00:05:53,000 let's come back here. We can now click Continue and specify our deployment specifications.