Modernizing existing .NET applications with Windows Containers and Azure cloud
![Modernizing existing .NET applications with Windows Containers and Azure cloud Modernizing existing .NET applications with Windows Containers and Azure cloud](/pic/modernizing_existing_net_applications_with_windows_containers_and_azure_cloud/aXpNZDlxWkxxLUU_.jpeg)
Okay. Can. You hear me let's. Get it started first. Of all thank, you guys for coming to this session I really, appreciate your interest for these, three things dotnet, darker. And windows containers, in, a sure and. Precisely. This is gonna be the topic. Of this session so how you can modernize existing. Dotnet applications, usually. Web, or services. With, docker containers, windows containers, in a sure and when I say existing, applications, hire I mean applications. Like, traditional. MVC. Asp.net, MVC or what forms, or WCF, services. Okay. My. Name is Faye, circulatory I work for the doublet team in, but. Special, focus on anything related to assure and micro services and containers, and so on and then, we, will have, you. John for, one of the demos about Windows containers, and kubernetes, as well in, the session later on so. Let's start. These. Are the objectives, you'll see I'm. Going to show you what, is our high. Level. Vision of, the, modernization, or, the. Journey to the cloud, using. Also Windows, containers, then. I. Will. Show you the. Code area with. Visual Studio how, you can easily containerize. Your, applications, with business to you and then, we will see. Quite. A few scenarios. Well. How to container eyes but then how. You can deploy two, VMs to, assure, container, instances, to. Kubernetes. And Ducker, to. Service, fabric mesh or. Sea. Breeze in better, name and app, service with windows containers, some. Of them are still, in private, preview but, I will I will do a few demos of them if you're interested you can request access and get our early access as well. And. For all of them we, will I will yeah, I will deliver, a demo some, of them are our less interests, or we don't have really the time for, or all the demos and for, instance for VMs which is pretty common I would, just I, would do into. One demo but. Also. Before getting into the content, and and. The. Different. Topics I want to highlight that, this. Is not just a single session with, demos.
Everything. I'm going to explain in reality, it's a summary, of, guidance. That we have created and you can get from, the dotnet application, architecture, Center which, is an area that I own and. You. Have you can download free. Ebooks free guides, about, those topics like micro services on container that's. Another. Subject. But, it's. Another, area that I really focus a lot on micro services architecture or the. The. One that we are going to focus, today which, is modernizing, existing, applications, so you can download an e-book with. All these material, like it's like 70, pages describing. Everything, that I'm going to be telling today I need just about the e-book but we also have related, sample. Applications, or reference applications, so everything. You're going to be I'm gonna be showing you can go into github and run, the same the, same code in these. Scenarios. This. Is the e-book I was mentioning, focusing. On on on this. Subject. How. To modernize these. Dotnet. Applications, with containers, the. Reference apps are an, MVC application asp.net. MVC traditional. Web, forms and also WCF, in how you can container, is that with windows containers, and run it in multiple environments. In, inertia. So. Why is the journey to the cloud it's, okay, you might have, traditional. Applications, on-premises and then, you might be thinking about moving that to the cloud but you could do it in multiple, ways, sometimes. It's better to do it great, early or sometimes. Maybe you want to go to you. Know the high, end or the best way in the cloud but, usually it's good to start gradually it depends right so, in, here. We. Have the cloud and the, first way you can migrate or go to the cloud is by, simply. Migrating, what you have like you might have servers. Or VMs on-premises. And you, just lift and shift that, into. The cloud so it's just a simple migration we. Hosting, and what. In the industry, is called lift and shift that. Is the term also used by Gartner or, by us or, by Amazon. Or lift and shift is just putting. The same in, the cloud, using. VMs, and you're. Not touching anything, about the code at all and, maybe, well. Just a few maybe, you, will need to change the thing a few things in the infrastructure, but not in the application, itself the. Next step or well next. Next. Phase. Or. Maturity. State that you can have is, you. Can modernize your, applications. But within modernization. Which is a very broad topic. You. Could do it but, just. What. You need to go to the cloud and get mmm. Quite a few benefits or you can go cloud. Native okay so the. First one is what, we call cloud, optimized. Applications. And. What. That means is you are container. As in your applications, might be monolithic, applications, whatever. What you have and you. Probably. Use windows containers, if you were using dotnet, framework and, and. Then. You deploy it in windows, containers plus you also use, all. The manage services, in assur like you might be using sequel. Database or Reddy's, cache, and as a service or. Storage. For files on images, and so on and. Finally. But. The good benefit about this and we will highlight, that is that even. When you might be tweaking, things you. Are not really tucked in the application, you might need, to change a little, bit of code or configuration. When. Working, with containers but you know you're, not really tucked in or recoding a lot in your application, and finally, you can go, the. The best way in, in the cloud which is cloud native cloud, native it's. Type. Of applications, which the. Most important. Characteristic, in cloud native is that you are basing. Your application. On microservice. Architecture. And for, that you. Really need to really check your application if you originally. Had a monolithic, application, okay although. Sometimes. You I, recommend. Most of the times not to you. Know fragment. Everything or split, everything and go. For, micro services maybe it's, better to go gradually, and maintain. What you have and then if you have new features you can add micro services for those new features that would be the recommended, thing in. Any case the the focus for, today's session is cloud optimization. Or cloud optimized applications. And how you can, containerize. With, your. Existing applications, okay I I also, have other talks like, a Nick Knight or the, book.
That I wrote about micro, services for cloud native but this this topic is about. Simply. Container, icing with windows containers. Ok. So how. Do how. Do we, get, a start here, here. You can see kind of the same maturity. Levels but with different. Technologies, so if. You just migrate with VMs you're talking about just VM seen in in sequel I mean in usher or sequel, VMs as well and so on and. In here, we. Are also talking about other, products. Other technologies, like docker. You might be using apps insides for analytics. VSDs. For your CI CD pipelines. ACI, I should continue instances, up service sequel. Database and then, containerize, in your application, right so this is the the focus of this session and, then. The other one is more about, dotnet. Core. Cross-platform. Micro, services but, that would be a different a different subject, ok. So. I almost. Mentioned. Most of the pros. And cons about this approach, but. Main. Thing is that you don't need to react attacked. And. Then, you get all the benefits about. Docker, containers, which is your. Deployments. Are going to be improved so, your, develops, and, your employment, agility, is going to be a lot better because. You will have less problems when deploying with our containers. Than when deploying just, the application, and everything, should be okay in the. Production. Environment but sometimes it's not and sometimes you are missing, dependencies. On things like that right so those, are the pros cons, well you. Will, need to, learn. A, little. Something, about, containers. So there's a learning curve that. You need to learn it's, not just. Migrating, the, application, as you had it but, that. That's the only concept, you that you're gonna have so you're, not we architecting but you need to see. What you have how to container. I said what. What, are those files and so on that what I'm gonna explain later. And. Why. Docker basically. Probably. You've heard hey this, works in my machine and why. Not in production usually. A lot, of those, cases is because in production, you were missing some dependency. That you have in your machine like maybe was using a different version of.net framework or. You. Had a dll. Or some, library, on your local machine and that is not installed, on in production and then you were getting those issues with. Docker you, solve that because when you you have an image that you deploy as a container it comes with all the dependencies, so if, you transcend docker should run in production at. Least anything, related to the dependencies, okay, so. The, keywords are dependencies, it's self-sufficient, you have everything in that image and then. You. Get a lot of benefits, in regards. Deployments, so it's great for dev. Tests, and also. As well and deploy, into to, production. You. Can run, docker. Containers, either on Windows or Linux when, we say we miss containers, or Windows Server containers, it, is also about docker, engine it's not it's because of the branding, but, the darker engine is the same engine. Running. On Linux running on Windows and. So. You have both choices and, then, we will talk later about side, by side this world that that's that's coming as well. And. Finally if we're, talking about docker and net, we. Have. Different. Images, like an image is like kind. Of the template, of all the bits you need to deploy as a container it continues kind of the instance, of the of, that template of that image. Right so. There. Are different, based images, depending on the operating system Linux, or Windows and, so on and then we have other base images for, dotnet so. If you have a dotnet, framework application. Like NB C what forms WCF, you, should use the dotnet framework container. Image, which. Is based on the windows server core image, and. So. That's. Because, it, needs usually, is and. Is coming, in Windows server core so. This image, is good for these scenarios for, today like modernizing. Your applications, the. Other image, that we have is the dotnet core, image, and that. Can, run is like a multi, architecture, image can run on Linux or on Windows nano. Server and it's, lighter. Because. It has many less. Things to deploy and. It's, usually the. Way to go if you're creating micro services, and cloud native applications, the.net. Core images. Again so. You can go to docker. Hub and see these images where they, are. And. Then the way you can container is, your.
Application, You, can do it with Visual Studio just. Right, click on your project and, then, a darker support, and it will basically add, like. Just, three, files that I'm gonna show now and, then. You just can. Create. The docker image and deploy it so, that's why there, are few files it's, not just, deploying. To the career but you need to create the docker image based on those files that are odd by visual studio you could also add those three files manually, because. Those rights are I mean like text files so you could copy those files if you understand, what it's in there and just then building, the images, right but this, was 2d helps you so this is the first scenario. And. These apps are in github, so you can grab, the code and, play, with it the first, one is an MVC application, that. We, are going to containerize. And. Then. Deploy into your docker, host in your PC so in your PC you need to install docker for Windows and this studio and, we. Will deploy that up in a container we, can also deploy the, database as a sequel. Container on, Windows and. And. The same thing would. Be another. Web, forms, application, deployed. I say another. Container that could be using the same, sequel. Database when. I say sequel database in a container this is great for development, environments, because you can create the, sequel. Container. Populate. Sample, data and then you can run tests, and it will be predictable, we. Do not recommend to run sequel, containers, for production, because it's a single container and so you won't have high, availability so, in production, you, should move that database to assure. Sequel database where you have a high availability, or. Sequel. Cluster okay but for, development environments, this is great because you you. Don't have sequel, install in your machine it just place a container and everything is running okay, a. Very similar scenario would be with. An tier application and, WCF, so the, demos are going to be like with web, apps but it's you, also have these code in, the github repo so, you container, as a WCF, service that, is accessing, the same database. And, then you might have another. Client. In. A different tier could. Be a WinForms like the one we have in the sample could be WPF, or could be another web application, whatever, okay and very similar would be if you have a asp.net. Web API, okay although that's more. Modern. So. Let's do the first demo.
So, Here we, have an investor, studio. This. Is the a shop legacy, and VC application, there. Are in. In github there, are a, few. Projects. Called legacy those are kind of the baseline, without. Docker. Containers, kind of kind of what you could have as. A legacy application, right so. This, is a MVC, application. Regular. With, your controllers, code. And. Then your. Web config, but there's nothing about docker here yet, something. Interesting about this application, is that. In. The code we. We, have we have coded, something like we can mock, accessing. The data in in, sequel so if you set. This, flag you. Can see here. Use. Mock data equals, true, what. We're doing is that. We're. Using dependency. Injection so. If that flag is true then, we are injecting. In the controller's. Repository. A service, that, is using, just, data. In, a list like, generating. Data in memory data. In memory if, it is not using that. Flag, then it will inject a service, like a repository accessing. The. Sequel. Container and then it'll use entity framework and, the. On the DB, context, and so on okay that's kind of do something interesting this is interesting because if. You still haven't deployed sequel, or don't have sequel you can deploy the app as a container and everything will work ok and then, afterwards, afterwards. You you'll be able to point to the sequel database and really. Access, D so. For this for example I'm just going. To use the mock data and the, way you add or. Container. Is the application is right. Click on the project. Darker. Support and. Then. You'll see here, that we're. Gonna have a few files added. So. This is the project that. We. Had and there's. This file, added. Docker file and, this. Is kind of the most important file for docker and. It's saying that I'm. Gonna create an image for my app based. On the base, image Microsoft. Asp.net. 471. For, windows server core, in. Here, this is a tag and that's, the way you can also update. Your, image with new versions like instead, of putting this tag I could say for. 7.2. And then, I would get the new bits of the newest, docker, image okay and then. This is the entry point of the of, my container, and, it's gonna be using is. And. So on and. Then. The other thing that this. Estudia did because, this is really simple what it does when you containerized. Is add, docker. Compose and, docker compose of a ride so the docker compose is. Just a file, that helps you to deploy your application, because, you could you, could put multiple, images and containers within the same docker compose, file, and then deploy multiple. Containers at the same time or you could just use docker run on the, CLI, and deploy, a single one but this is easier. So in this case you see in, the docker compose file, you, put kind of the static, information, about. Your image, so in this case you, put the name of the image and then, what's, the name of the docker file and then that is gonna help. Darker. To build the image darker in gene or from visual studio which. Is the same and then, the other file the docker compose override, is. Where, you put is, like merging those files in, at runtime but in docker compose a variety of food kind of the information. That, is more related, to the environment where.
You Are going to deploy so for instance in this the environment. I. Want. To use port, 80 or I could, say that in development, I want to use 88, or whatever. The port i wanna i want to use or, maybe 80, and, 88. Externally. And 80 for the for, the. Internal, power of the container. You, will see more. Usage of this in the later. On and. What. I'm gonna do is just switch in because it's going to go fast to this other project, it's exactly, the same project, you saw but I already have the the. Darker, composed files and, docker file but I already have the containers running so just, when, I hate on f5. It's. Gonna quickly. Attach. To the container so instead. Of more. Seconds it's instantly, here running you. Can see that, if. I do a darker. PS. I see. The two containers running locally each. Of legacy, well, in this case is just one right. Because. I'm not running the sequel container yet and. And. The. Great thing about doing this from this studio is that you can debug even. When your application is within a container I put, a breakpoint and, when, I click. Here into the details, you can see there's, a breakpoint here and, you can debug the same way. You. Can see the information about, the, in the catalog. That I'm, getting, and then hit f5, and continue, so. That's great with, this - do you. Get debugging, within. A container in this case a Windows container you can also do the same with a Linux container about. The environment, you need to install Windows docker, for Windows and you can see it's installed here and. Docker. For Windows this is coming, from docker and. Another. Important, thing is that you can switch to Linux, containers or Windows containers, because. Now I'm running Windows containers, you see there this. Switch, to Linux container so that means I'm running Windows containers, okay, so. That's all sorta. So. Is that easy to, containerize. The. Other thing that I want to highlight is in, the, github, repo. You, have the other version, which. Is not, just container eyes but a little bit more modernized, so the same application. But. Now you, see that in the docker compose we. Are also saying that we want to deploy a sequel. Container. And this, is the base image for the sequel container for Windows M SQL, Server. Windows developer, and, and. Then. In the docker compose override, you can see that we are putting the specific. Information for. This environment when we create that, sequel. Container I'm. Going, to use this password or, these, ports. Externally. Internally and. So on and then, saying that my, application is not. Just using. A poor but also I'm using environment. Variables for the, connection string or. Saying. If I want to use the mock data or not or even, even. When I'm not going to have time for show this in this, code, we. Are also showing you how you can use Azure. Storage, for, the images, instead, of being images in a folder you, can use blobs, in usher so that would be another mod organization you, can use, application. Insights and. This this. Would be just the key that you need to use application. Size or how to use active, directory in, this application, so in here you just put the the, ideas and information you need to to, make it work okay but the, point is that in this in here you put the. Configuration. With. Environment, variables in docker, okay that's, all for the demo the, first demo about how, you containerize and you, tweak. Your your application. With. Configuration. Files. Okay. So the first scenario would be you. You. Have your PC what we were I was showing you we, have the PC environment the. Images. And. Darker, and then, you want to deploy that into. A VM in Asscher so whenever. You want. To deploy externally. In a remote environment, you, first need to publish. Your images, that, you had when you compile from this studio and when you use, docker. Build. And the image that, is in the local. Environment then. You do a darker push and you put that in, docker, registry that's, like, a dictionary, or a registry, of images. And that. Could be a docker hub from, public. Images or that, also could be ask, your container registry, for. Your own images for instance as well and from, there you can deploy it to a VM and the, way, to deploy to a VM is. Usually. You do it from a common, line and with. Docker pool first and then so you get the image and then docker run or docker compose up and then, you, have died in the in the VM so. Just. Really quick. It's. Not really a demo but. So. You saw that I had this. Docker. Containers. Running if, you, let's. Suppose this is a VM and you, have these files. In the VM you just need the docker compose the. Docker compose files, in. The VM with, all the information that that I showed you and then that is pointing, because of the name of the image it, will grab that image from from the docker registry in the Internet docker hub or a short container registry, and the, only thing that you'll need to do in a VM let's say this is a VM in Azure is to.
To, Run it saying, docker, compose. Up. And, I will grab those files and. Undeploy. Those containers you, can go and do this in the VM in the console, or you can also do it remotely with certificates. From, a client computer. And so on so these scenarios, step-by-step. Explained in the, github repo but. Because this kind, of what everybody has, been doing with docker for a long. Time and not going to demo that I want I'm gonna demo other numerous. Scenarios okay, but it's just like dr. Campos have dr. Campos down, and, things like that. The. Issue with the images. I mean, with the VMS, is that okay, just you. Get a stir it everything, is working as suppose but but, the VM is infrastructure-as-a-service. So. Thursday, is, great but then in the future you are only in that VM you need to patch it you need to upgrade it there's. A and, then if you want, to put that in production you'll, need to load balance that it's, a lot of work a lot of infrastructure. Work so that's why we have many other products. For containers. That, will make. It a lot easier for you than when using VMs. Okay in. The case of windows. Containers it has, to be a Windows, Server 2016, or, later. With, with, docker. Engine. Next. Scenario and this is a lot simpler for developers, is a, sure, container, instances, ACI so. From, a developer, point, of view would be the same I have, my images I run it in my PC business to do what I just said, but. Then, you. Push, it, the. Image into the darker. Registry. The way you do this is pretty, simple you you, write like, you. Want to see the images, in. Let's. Come. Back here for a minute. You. Do docker images and you see all the images that are, in, my PC right, so let's say I want, to publish this one into. The. Docker hub in the Internet so, you just need to. To. Do this docker. Well I would do darker login first with my user because I'm going to write in docker hub or, in Azure container, in registry. But, then you just need to do docker push. Push. And. The. Name of the image so it would be something. Like that. And. With that command it will push that image in the docker registry. Okay, it's. That simple so that's what I mean here. When. We are putting that darker push and there, and then, ACI is great, because it's like a black box you, don't need to maintain. It you don't need to patch it or upgrade. It it's gonna be there and you just deploy a container, in there either a Linux kernel Linux container, or Windows container and this, is GA like. RT RT M since, a few weeks ago for Windows containers, as well so. The. Way you do this is with.
With. The. Azure. CLI, commands, you can do it from PowerShell. Or, Windows. Or. Also, from a short cloud shell within, the browser and. It's. Not just the point in the container it will also create endpoints, with a DNN, dns, full. Qualified domain and. So, it's it's, super easy to do it so that's the demo I'm going to do now. So. So. Think that you, don't have anything you don't have Hannah you, didn't create an AVM, or you, just go to assure. And. By the way this is what. You see about images, in docker hub for instance they would be docker hub, the. Asp.net, image, and this, one would be the image that I'm going to deploy that I my, image of the MVC application, so. The way you can deploy a container. Into a sea I assured containers instance you can do it from the pole roll, like. I am providing. The. Container. Image. Wrestles. Group and then, the information about that. Usually. Because a CIA, is more for deaf test environment, I would prefer to use, the, CLI, so. In. Here, you can see a racist, group where I already. Deployed, witness. Containers, here I'm, gonna. Open. A. Console, here although you can also use. PowerShell. And the. Way you deploy, it I'm, gonna copy. It because it's a long. Command. It's. Like this. But. This, is because I'm providing also environment. Variables, like the mob data or whatever right so. It's. Easy, container. Create, the. Name of the of the image right. Is the the image, the. Russ's group. Then. The location. What's. Going to be the name, of the container. If, it is Windows or Linux. How many CPUs, memory, the. DNS, name so. This is gonna be what you write in the in the browser. If. I want a public IP, what's. Gonna be the port and that's, it and then. And. Then environment, variables, that this, is depending. On your application like, use mock data true connection, restrain, or use. Customization, data if you want to load data from files. This is related. To my application, and with that you just hit and it. Will be deployed I can. Do. It from. Here. And. While, it is doing that. We're. Gonna show you. In. Here you, can see the already deployed. Containers. That I have. So. For instance if I do. I execute. This. This. Other command. I'm. Going to list all the containers, in a CI for one. Of my research. Groups in usher and. You can see that this information is, the. Same information, information, that you see here in the Pearl right so, the name of the containers, I have one container with sequel that we're going to be using later. MVC. Containers, or WCF on the web forms and so on the. One that I can. Go. It's, this, one the, MVC. Windows. EShop container. So. This is. Once. It's been deployed, and here, you can see the fully qualified domain it, just copy that and paste. It here, I. Already, have it and. Run it and. Then. You, you. Have the application in this case it's using. The. The other container, the sequel container in a CI in fact, and I'm gonna edit. From, here I'm gonna put here data, let's. Say. Build. 2018. So this is going to be safe in a sequel in the container. Okay. And. And. That's it. Also. You can, you. Can get that information about, the container. With. Yeah. With this one. So, I provide. A container. The, name of the container in ACI the rhesus, group and then table, and, you can see the information about this specific, container. If. I put table it's this, way if I remove, table it would be, JSON. With more information about that but here you can see. The. Image. That is been using the IP, and. So on. So. Is, that you see just, highlight. That you. Don't really need to maintain, anything, you, just deploy a container and you test, it. Something. Important about a CI is that even when you don't need to maintain that it. Is considered, infrastructure. Because. It's. Like if you use a VM, you just, deploy container a single, container one, instance, per image okay.
So, This, is not like you don't have high availability, per, container or you. Cannot scale out the, same container you, just deploy one container okay so, but, this is great for dev test scenarios, or for. Yeah I mean sitting in your continuous. Deployment you, deploy in here you do testing. Things. Like that right because you don't have to maintain a VM, for your CI CD, pipelines. And you just deployed here and do whatever the test and then amps, and that's it and you just pay for that, execution, of the, container okay, so. Next. Thing is okay now, I. Want. To move to production. So. What. Do, I need so, first of all about the data instead, of having a sequel container. You. Would move that into sequel, database or, any. High availability, system. Like. A cluster, or. Manages. Stands in sequel and then, about compute, you. Need to scale out so, something. That you cannot do with a CI you. Can do it with other services. For containers, in usher so we, have managed. Compute services for containers, that we're going to cover right now where. You can scale out and for the same image you can have multiple, instances and then your those, instances, are going to be load balanced and you can scale. Out okay so, this. Is the actual, container ecosystem. As, you sow below. Are, kind, of what it's considered, infrastructure. So either, VMs. VMs, skill sets or a CI and, then. Up above you can see other, products, like, aks. With, kubernetes, or service. Fabric, or service fabric mesh which, is more, pass and, we will I will talk about that later on batch or off service so, we're gonna do we're gonna talk about those as well today. And. Well, not batch but about, the other three and do a demo and. And. The first one, would. Be. Kubernetes. And. We. Start the same way than previously. So we have a PC development. Environment. We have this a studio and. With. This a studio you build the image in your local repo in your PC just by building from, Visual Studio or from common CLI and once. You have that and, this, is the new thing.
For. Winners containers, you can have a, whole. Kubernetes. Cluster in. Your, single, PC, and what's. New is that you can you could do you could have that with, with. Docker for. Windows for Linux containers but now you can have it for Windows containers, like. A kubernetes, cluster where. You deploy Windows containers, in your PC, it's. Still. New. And coming soon like we're gonna show things that still, you, won't be able to try but in a few weeks and this, is precisely demo, for region. And. Once, you have that so the demo is going to be about the development environment okay but. Eventually. You. Will push that image, those images, into the registry, and you will deploy. That also into washer, or any. Cluster. Kubernetes, cluster anywhere. Just. To mention that in, assure you. Have a KS as. Of today support, Linux containers, pretty soon it will support wins container, or you, can also use a cs4, windows containers in preview but so, everything. Here is coming. But, let's do the demo about the local environment with, region, so. Seven. Okay. Thank, You Cesar, so, my name way john davis i'm from the windows. Container, team contain. Windows content is part of a hyper-v and it's part of the actual OS team and we power asher. So. One, of the things that i've been focusing. On with my team is how do we. Build. You know how do we help customers, and, especially enterprise, enterprise, customer, to modernize, the, traditional, application, are mainly done an applications. To. Delayed its stack right, and have, better experience, and to end it could be on-premise, or could be cloud or hybrid in. Between, and. You, know that that involves, a lot of work and in the different work stream for example we need to bring up the platform. Technology. How do we maximize app application. Compatibility. In, the container. Because, you, know container is slightly different from Vienna turned from your machine not everything, works on the virtual the the actual, server that will work on containers so we want to maximize that and I, also want to optimize, the size and, performance, those are like basic, fundamental, things the. Other aspect, is how do we provide. Tooling, to make your experience better I specifically. Like as your developer, you probably lot of you use a Windows, machine so. This is what I'm focusing, on today. And. Our vision you, know as on your Windows PC you, will be using docker, for Windows I think, it's easier I mentioned a few time I'm going to show you a little bit and. Communities. The de facto standard you, know a trader. Of the industry sander that's why I want to invest in that and also, we want to use the windows container so what can I combine the three together and show. You a proof-of-concept how. Do you leverage, your PC, locally, and, get you know familiar with a tooling, get familiar with the platform and, get ready to move, to cloud or deploy.
In Your production okay. So here I have already, have docker for Windows installed, I think see. There show you earlier we have our, friends in Dockers give us a private build. It's really a world premiere. Here so, you can see actually shows. Edge so doctrine itself has two different channels there's a stable that's edge edge. Is more like a pre-release, you can get experiment, different features and, so. If you're like trying new things I, encourage you try edge or if you want to sable go back to. The stable channel and. Right now by default we are using at, the windows you. Can switch to support, Linux container but because this is a Windows. Container was to stay as is and to. Show you what we can do here I'm gonna use open. Up PowerShell, window here and. Before. I do the, actual demo I want to show you what you know give you a quick look at what I have on the machine this the few image already put. Here so you kind of see what's here and what's coming next and I'm project I think at the speed network suite is about my machine really slow today, so. So, you don't show you a multi, different images for example. We. Saw like Microsoft, Windows, server core and you can see the tag, this, is a 1803. This is actually brand, new it's just released, published. Yesterday it's at the darker image power. Yesterday and we have nano, server we have previous. Old ones, the. Latest actually based on Windows Server 2016 etc, so there are different images, and I actually have a few Linux container, as well and. At this time I also. I. Can. I like to see those are images static, on your machine but also they're active. Running one so, I'll give a quick sense what's running us. Your see actually there's a, we. Call del cow Linux, container windows and, not, some time we call native, running on your Windows environment, it's a it's. A Linux container windows you can run and. Because. We, have to use that for the KU master because today kubinashi that master, of chrome at mass, has to be in Linux environment, so we kind of put in you. Know it's a container marm but it actually running the KU master on the container as well so it's it's alcohol. So, this is where we are this is a I have, here, and what I'm going to show, you next is how to use Qin 80s you know you're familiar you're learning, the, CTL, command line to deploy windows, through. You know all. Coming with darker, windows installation. So, I'll show you a quick command here so we'll be. Not. Too big. Ok. So I'll do. Basically. I'll run. A. Here. We have a deploy me here and and. Just for fun I could create. Multiple, record, now replicas let's say I shall do three is in interest at a time and, I need. Yeah. So it's going to have like multiple instances, of the same, container. Gram, image. Okay. So let me finish type here this is a mentioned. That we I'll be, testing. On Windows server core. Make. Sure I type a right sort of a core. And. I'm. Going to use the latest one the one just published, yesterday and. I'll. Just run a. Very. Simple command. Sure. So, this is you, know they, if, you're familiar community, it's a very standard and a very basic command, line here and I will be run on pc, i think people more familiar with on the server if, you're running that used commodities more like a juror or a server, so. Let's, go okay. So you should see, a, message showing, you know actually you have a. Deployment. Created. And. Again this is very slow on this stage. So. We'll have that a. Once. We have that kubernetes, deployment, created it's actually automated create a multiple pause in this case out there yeah so, okay, it's coming so i'm going to show you use, the community the coop, CTL command to share your waters is in the deployment. Planned. There's, not a lot there but it give you a sense this is real this happening and it's very basic you have sense of what's happening there and other. Command often, time like if you in, a curation we there are different resources from once. You could deploy something so I'll just run this and you can show. You multiple different resources for example it can be a pod or maybe other time you create service or, or. Replica, say you were showing, you here so we should be able to see three pods. Created. Here and. They. Should you know start. Initiating, the. Container, creation, etc and on its own and you don't have to manage that, okay. There we go so coming it's actually running I think that's why it's so slow so uh so, this is like a main part, of the demo and like I mentioned earlier our visions, really you know on your Windows PC. And, you, can use criminais use to deploy windows container and ideally. Also Linux, containers side-by-side, right so working on that and would bring bring up all the technology, together in a no.11 so she'll help you to.
Do It local, development better. And, in. Fact actually dock of talk, of a windows already support, Linux. Container deployment. With deploy to is created, today through the edge channel so I'm gonna show you quickly it's not doesn't, work with kubernetes yet but, it's already supported, by docker itself, so let, me show you go back to your darker, I'll. Do it quick run. And. The. Trick is this platform. The. Next parameter. And. So. Just so this is clear the. New thing here is that we we are using witness containers, in, the same docker host and in the same doctor host you are we are deploying now Elena's containers, Elena's. Containers so side by side okay. Yeah so. The here I'm pickle busy box it's very simple, Linux container, and. It'll, just say. A message, hello. Okay, so the it's it's a Linux if you look for it Bacchus, it's a um you know it's kinda like a hello world commands so and remember the platform, is, so that's true you don't have to I go, back to. Dokka. For nose and switch clinic switch, to let's compare that can take some time okay. So. That's run that, should be running I know she's a message. And. Everything. Seems to be double-time, fair, one was finish. Okay. So once. This finish I'll show you what's what all the up on containers, are running thank you okay there's a whole load here so, the last years I want see sure you since. We're on different containers, etc, so I wanna see okay what's it like usually a lot more things, that little, bit. So. You see still we have the coop master at the bottom and a few other ones those are like uh sort of intermediate, containers, to help accommodate, these and manage different resources and also. The actual container way I create earlier this Windows server core container. So. That's the that's a demo I want to just recap you know today I want to show you the visions and how do we combine, all the best you know doctor windows in kubernetes in Windows container and we, want to bring the best local, develop experience, and and, also, you know help you support you. Deploy work on Windows container side by side and it's. A proof of concept and will show more at da coco and other, events thank you cool. So. Another scenario would be to deploy witness containers, into, ash, or service fabric mesh which. Was in code name we was, called sea breeze maybe, you haven't heard that because it was internal, but. Mesh. It's a service. Fabric buddies platform. A service it's, kind of serverless so you, don't have to create a, cluster like. You needed to do with, service fabric regular, or like. You need to do with, kubernetes. You need to create a cluster with a specific, number. Of VMs, in this case you, just go to mesh and deploy your application, and the, number of windows. Containers you want to run that's a difference with mesh between, other, clusters. Or other. Orchestrators. In, the development environment would, be the same I put it into, darker registry, but, now without, your service fabric mesh you. Just deploy it like in a. Black. Box and you. Can also scale, out here because this is meant to be for production, okay so, this. Is new in private preview. Since. Bill private. Preview - and, the. Way you do it today, in, this private previews, from the comment line it. Will you, you will have many more things also in the pearl so, let's do a demo but this. So. The first thing I want to show you is how you can deploy actually. Let's. So. You use. The azure. CLI. This, means sea breeze maybe I will change but then, your we are deploying and. We. Specify, we. Want to create a deployment we. Specify, the rest, group in a sure nothing new here and then, we just specify, a template, file which, is usually. A JSON, file also. We. Be able to do it with Jamel we, will be simpler, and. Then. The so the important, thing here is this file. This, definition. File that. I have here. Open. So. These, files in sea breeze or mesh. What. You do is you define the containers, you're going to deploy plus. What, you see in there is the definition of the network so, the network is the can, be a logical network. That. You used to communicate, your your.
Containers. Usually, maybe micro-services. Between. Them internally. And how. Do you expose. Externally. Out, of mesh to, the world. What. You want to access in this case was. The point the sequel container and the, MVC. Application and. What I'm doing in this network. You see I call it each of modernized, Network and, I'm. Publishing. This. Listener, in port. Five, one zero zero, and the, one application, service fabric application, a service or application is, kind of the unit. Of deployment, in service fabric so, this is the network and then we have the services, within the application, the application is, what, we deploy and then, the first service would be the MVC application this. Is the service and here. We specify the image I'm, deploying. For this container and the, internal, port I'm going to be using a t but, externally is going to be the, one defined, in the network so five one zero zero and, then the, other con all the environment, variables that we were talking, about they used mock data and so on and then. The. Sequel container. Kind. Of with, a password or whatever kind of similar on how you do it with a plain docker, but, here the important thing is that this. Is an Orchestrator, so I can say I want to have two. Instances. Of this container, or I want to have, 500. Or whatever the number, okay and then. I mean, you just. Just. Run it what I'm gonna do is. Show, you the cynosure. Of, containers. That I already deployed, in, Seabreeze or in service fabric vanish so, this is the. Research. Group and here, you can see. The. Application, the, service. Fabric mesh in. Here and if I get into it I can. See the it. Has two, services, and. Going. Further if. I. If. I can query the network, so. I see. So. From here. QWERTY, the network of that. Application. And I see the IP. Were. It's deployed, the. Application and. Because. We said it was published, on poor. Five, one zero zero if. I go to the, browser, I put that IP five, one zero zero and, I, run it that should be the application running in, in. Service, fabric mesh and. While. This, is serene. We. Can also query, that application. So. You can see the service, primary application, it has two. Containers the, NBC, the sequel, for, the NBC we have one instance but for the sequel. I mean for the sequel. We have one for the NBC we have two could be 20. Or whatever the number that we want to. Scale. Out okay, and here. We, have the application, running. On that IP and that, port. Okay. And that's. It is that that easy to deploy into Seabreeze, from, common line, let's. Move on. And. The. Final. Scenario. It's. With, app, service, so AB service is a great environment pass. For, simple, applications or web, applications, and it. Supports. Linux. Container, since last year the news is that since. This. Week app. Service also supports, Windows, containers, in private, preview so. Would be the same thing you push, the, image into container, registry and, then, you deploy it into app service from, the azure Perl or visual.
Studio Tool incoming as well in this, case we. Deployed just the application, because the only ports that you have in app service are our SSL. Or 80 so the databases, should be outside either. Sequel, database or. Or. A container. In a CI or whatever right so, let's do this demo as well. And by the way I just want to show you this was the. Remember. That we changed, the, application, the data in sequel, in the, container, so. If, I open. Sequel. Server management. Studio. And. I connect, to the container, in ACI, with. Sequel. We. Can see the tables. So. This one is the catalog. Okay, that's what, we change from, from, a CI but. Now in enough, service we're gonna consume. The. Same, sequel. Okay so in, app service, we. We have the typical. App service, definition. You, see that in a show in orange. Because this is an internal, private, preview, but. If I go to the definition of, the. Application. You. Can specify. What. Is the, windows. Container image, that. I want to use. Other. Important, things are. You. Can scale. Out in. This case I just have one instance but I could, scale out two more. Instances, of the windows, container, right. Or. The. Other important, thing is the, application, settings. Where. You can specify the. Environment. Variables that we were talking about you. Can see here, in this. Case if, I want to use mock data. In. This case this. One is using mock data here that's why you see but in this other definition. Of the, disorder. App, called. Issue modernize with remote sequel, what, I'm doing is in in, this connection, string, I'm pointing. To, the. Sequel container in a CI so. If. I if. I just go to the app, service, and browse. From. Here I. Go. To the, application. Ich. Up. Modernize. With. Remote. Database. And. You can see that. Is showing, now the data, coming. From the other sequel container okay this, could also be remote. Sequel, database in usher or whatever and that's, the. Way you do it in app service really simple just in, the configuration, preset pretty similar to the way you do it with Linux containers the news is that you cannot you, can now deploy. Witness. Containers, into app service so many. Cases where you might where maybe not able to deploy in two up service because app service, without containers, is like a sandbox, and there are many things that you might not be able to run like for instance a PDF. Generator that I was doing something in. In. The Windows server or something. External, or using complex, components. Or there. Are many dependencies, that are not allowed in a regular, app service, when, you just deployed the application when. You deploy Windows containers, in. That, container is coming with all the dependencies, everything. You need and everything will, war with, within about, the dependencies, everything will work within app service so that's the huge difference compared, observers. With Windows containers. With a simple, app service, with just your application, okay. What. Else here. Yeah. And. By. The way for. Instance here, I have. Other. Environment. Not, sure if I have no. I need, a VPN, but in any case this other environment, was app, service, but. In. A short stack so you can do the same with in a short stack on-premises, so, adjusting, in usher in the clock.
Okay. So. This is about app service. And. Now at, this point we've. Been talking about the benefits of docker containers. Windows. Containers, and and so on and many, many, ways. To deploy it right so if. I were you one question that I might, have is okay so, what do. I use. Of. Yam ACI. App. Service. Service. Fabric mesh, kubernetes. Anything. Else DCOs. There. Are many other things right so. Now. I'm gonna. Try, to provide kind of some, by default guidance on this and. This would be kind of the by default selection criterion, take. This slide, on the next one with a pinch of salt because, it really depends on your application but. Default there there, are certain criterias, like this that, you can think about. Depending. On your application might, change and I can show, you or tell you a few, things that you, could consider but. For instance if. You are using Windows containers, and you have a single monolithic application. I mean, then. The best way to go the simplest way will, be assure up service with Windows containers, if. You have like an interior application, it's more about services. Maybe WCF, services. In. This case it depends if you have like, coarse-grained, services. Like just a back-end, single. Back-end or maybe just a very, few services, I could, still use up service, if. If it is more kind of going more to away. Or, like. More fine-grained, services, more. Complex, kind. Of heading, to micro services, I would use then an Orchestrator, either IKS with kubernetes or service, fabric, and. Then talking about micro services. You. Can use kubernetes. IKS, or you can use service fabric micro, services is out of the scope of this session but, since we are talking about these platforms. My. Recommendation, is aks. And kubernetes is more mature. In linux so if you are talking to you if you are deploying to linux probably. My recommendation, would be to use kubernetes, if, you are deploying to windows, service. Fabric is more maturing, windows and windows containers, is with windows containers, is Benji a since. One. Year ago, in. Kubernetes, is still in preview so. Probably. I would recommend. Service. Fabric for Windows although. This is just like a moment, in time now in a, few, months or a year it's, gonna be more a matter of preference. When. Talking about orchestrators. Or if you prefer something that is more kind, of. 100%. Microsoft, and or like. A Microsoft, shop or more. Service fabric and something that Microsoft uses for other services as well in usher like. Cosmos. DB and, service. Bars and sequel, those, products, are running on top of service fabric. Or if you prefer to use on open. Source as well but. Multi. Cloud or in different different. Areas. Then. Use kubernetes, right so in a sure you can run any, of them and we're happy that you. Use any, of them right then, if it is about several s functions, event handlers and so on as your functions, are the, best way to go and a large-scale batch assure batch. But. Like I said depending, on your specific application sometimes, might change but. This is kind of a by default thing here. You have a more. Elaborate, table, with all those products and the architecture, types of the applications, and you. Can see that we, were trying to, highlight. The possible, ways of doing or deploying. An application and, then. What. Could be the by default choice but. As, I mentioned sometimes, could, be different like foreign. To your apps could, be also up service it, depends on the complexity, of your applications, and if it is Linux or Windows and, so on okay and. If. There's any question later about this just, go ahead for. The session that we were focusing, today it. Was it was just about you know what apps seem simple, web apps or into. Your applications. And. Then. Finally, about. CI CD. Because. I didn't showing you how to deploy, and, how to push the images from the development. Machine but that that's, not that's a way to learn but, not the way it should be in a project in, a project you should just pushed your code into. Git or github or whatever, the code, we put you have you, should never push the image from your PC into. The docker registry so. You just push your code and then you have your CI. Pipelines. And in, there is where you build your code your bits and the, docker image and from, your CI pipeline, is where you push the, image into the darker registry, docker, hub or assured, container registry and then.
You, Will have your, CD. Deployment. Pipelines. And you. Grab that email, from, the registry, and then you deploy to any of those environments, that. We were talking about okay could be some of them for, dev test environments. Or for production environment, but the kind, of the critical piece here or. What's, new compared, to traditional. DevOps. Or traditional, CI CD is the, docker registry in, between with the docker images, and this, is great because. What. What you get with this is like when you create an image it's like in a snapshot. Of your application, with a specific version and it's, it's if, it's working in this environment it will work in a comparable environment, for sure because you you are having, all the dependencies, in that in that container so that's. The the benefits you get, with. Talker and, when, deploying. And, making. Better a lot better your DevOps, and CI. CD pipelines, so. Just. Want to show you. Very. Quick another quick demo but. So. Here, I have vsv, STS, where. I can, go to the build pipeline, you, show modern s in MVC and. In. Here, I. Can. Edit it and. After. Compiling this, is where I'm. Push I'm building the docker image and, then. Pushing, that to, docker hub okay so that's the, first piece, in. Your in, your CI, pipeline. The second piece would. Be the. Deployment, so you can, see here I have many, releases, deploying. To a CI or, deploying. To. Kubernetes. Service, fabric and so on and the different applications. If, I go to this one for instance and I. Edit that, just. To show you how you can deploy to a CI from. From. VST s so. It's. Pretty simple with, this task you. Just use, the the. Same, CLI. But. In this case I get the. Partners, from, JSON, file and it deploys, that, into a CI okay, and the, same thing like, whatever I've been doing, here manually, from, my laptop you, can do the same from the CI CD pipelines. In V STS or any. Other, system. Jenkins, or whatever, okay. And. We. Are done, just a few call, to actions you can go to migrate, to the cloud this, is a page we have in the data team in, the.net site. Were. With a kind, of summaries, of the. Ways you can migrate to the cloud and. Again. Remind. You about the, e-book. That, it's like telling, you in a lot more detail this, is like 80 80 pages. With. Everything that I've been talking today, but. Better. Explain and then. The. Reference, applications, a few. Customer, references. Using. These. Technologies. And. That's it session, key. Takeaways. Well, we think that windows containers are are, really strategic, in when you want to modernize your existing, dotnet, framework Asians. Everything. Is coming super, fast, and then. Ashur, provides it's. An open cloud and provides all, the all the choices, but, that's. Good but we, are also providing guidance on, what, to choose, depending. On your application okay. And, with. With those ebooks that I'm mentioning, and, that's, it I think. We have a few, minutes for Q&A. Feel, free to go, ahead thank. You.
2018-05-12 01:45