Azure Container Apps Docker Containers first deployment with Azure Front Door

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
good morning everyone today we're going to take a look at container apps and we're going to deploy container apps and front door together so this is one of the ways of deploying container services or containerized applications into Azure alongside things like kubernetes and container instances container apps has some great advantages including additional scaling ability and the ability to scale to zero so if you have an application running inside a container you can have that application monitored once load increases that load can actually spit up multiple instances of that container and then as the load decreases and if the load decreases to completely zero the containers themselves can be offboard and can actually um scale down to nothing so you're not actually charged until the next person comes in then that next person that comes in the containers will start spinning up again for the application this is a great really flexible solution that allows us to have the scaling ability of something like kubernetes but without actually having the complexity of deploying something like CS into our environment so let's get straight into having a look at a bit of a diagram about what we're going to do here so looking over here on the Whiteboard uh what we're actually going to have is we're going to have an existing container that we want to deploy now if you have a container uh in your environment the containers container themselves are normally stored inside something called a container registry now if you're used to Docker that will be something like Hub dod.com now this is going to be a public repository or public location to store a lot of container services you'll find things like WordPress and buntu and engine X and all the other fancy containers that people use on a daily basis on hub. do.com if you're unsure about how to actually use uh Docker and you're unsure about how to use containers uh I have actually made a video on this previously so I have a scroll back through some of my videos and you'll find one based on docker containers now we're going to take an existing image that already exists just an engine X server now enginex is a very small tiny cut down HTTP web server uh it can be used for reverse proxies it can be used for hosting websites it's just a tiny container application that we're going to use now our container app service over here container apps service over here we're going to go and create this inside our Azure environment so we'll put that inside a little Azure bubble over here okay and I'm going to deploy these container apps onto a specific region so that might be something like UK South that might be something like us East um it might be anywhere else in the what that you want to deploy this to so these container apps what they're going to do is we're going to pull in this container from something like Hub dod.com and we're going to deploy a container underneath here we can actually go and scale this if we actually want to and we could communicate directly to it from the outside world if we wanted to but we don't want to actually do that one of the other things we're actually going to do here is we're going to layer on another technology on top of these container apps and we're going to layer on something called Azure front door now what Azure front door allows us to do is essentially have an endpoint that can connect to other services underneath the Azure front door can go and exist in multiple locations so for example if if I had a situation where let's just drag this down a little bit further um if I had a situation like this I had us East over in one side of the world and I had UK south over the other side of the world and maybe for example I deploy my container apps application over here into UK South now there's a big bit of Ocean between us East and Us East and UK South so if I've got users over here in the US okay that want to go access resources over here in UK South uh that might actually take quite a while for them to do uh whereas if I've got users over here in UK South accessing the container apps they're going to be accessing it perfectly fine now if I layer on this other service in front of here called Azure front door now Azure front door front door can exist over here in Us East and can also exist over here in UK South now what Azure front door does is it links to underlying services like this and it act as essentially both small firewalls but mostly a CDN solution or a Content delivery Network solution I.E this thing does stuff like caching okay so what happens is the US East guys will actually end up hitting the Azure front door which will redirect the container apps underneath this will end up reading this HTTP information and things like um images things like JavaScript things like HTML um and things like videos these are going to be cached at the Azure front door location so it means that the next time somebody goes and accesses that service or looks for those container apps they can actually retrieve the cast information from their local uh front door location so we're going to layer on front door in front of our container apps application and our container apps application is just going to run a very basic en oops spell that right engine X server inside here okay so let's get straight into a demo for this so I'm here in my Azure portal and I'm going to search for container apps down here there's a few options I've got things like container apps container instances container app profiles this a huge hug hug subject we're just going to concentrate on container apps for the moment so here we're going to create a brand new new container apps environment for it to actually work with here so let's hit the create button wait for this to load and we're going to call this container app name uh Mike YouTube demo okay perfectly fine uh we can deploy this into a new Resource Group and we can create a new Resource Group and call this YouTube demo if we want to and we'll just make sure to deploy this to a different region now I'm in the UK and you've got to be careful of this Regional section down here because Microsoft sometimes uh what they do is for example here they organize the regions alphabetically and I'm in the UK and Australia is quite far away so let's go and filter these items down and let's go and deploy this to uh UK South so we'll deploy this to it to the London data center location that's fine and we'll create an a container apps environment for this and it will just be a managed environment for my YouTube demo because I don't have an existing environment here at the moment that's going to spec on fast this is actually going to run uh so what I could do is I could use an existing quick image which just has the simple hello world container down here if I untick this option uh I have the option to use multiple different image source locations I could use one of my own Azure container Registries if I'm storing my own Azure U my own containers I've developed inside Azure or I can use something like the docker Hub so if I go to the dockerhub here let's go to hub. do.com and have a look at some of of the available images uh that are out there on the internet uh the one I wanted to go and grab inside Docker Hub was engine X now Docker always kind of changed in this website and the search is a little better than it used to be but this is the one that I want here the official build of engine X just a very basic one there's nothing that nothing this is doing it's just going to run the engine X server it's actually normally used as a base to build other containers off there's many many different tags and many many different versions of this down here but actually all that I really need is I just need this to be called engine X that's all this is the unique tag that I've got I could make it a little bit um more interesting so I could go engine X colon latest if I wanted to do this and I don't need a registry log on server inside here because this is actually going to be a Public Image this is just docker.io I don't any command overrides for that at all it should be able to pull that directly from the internet so aure container apps allows you to connect add-ons that support your app to run in the same environment as your container app I don't have any additional microservices with this so I'm not going to add any additional bindings into this and my Ingress for traffic is going to be that needed HTTP or tcpm point we're going to enable Ingress traffic I.E we're going to be a enabling people to communicate to this container and we'll accept this traffic from anywhere at the moment not just limited to The Container apps environment itself this means that we could actually uh kind of isolate the uh the uh the networking ability sorry we could isol this limited to container apps environment means that we could isolate the traffic to only communicate to things from v-net that we actually control inside our Azure environment but I want to allow external people to actually talk to this uh so we're going to ignore client certificate mode down here the transport's going to be automatic and we're just going to leave that Target port to port 80 so that's going to be the default for engine X down here uh we're not going to tag the resource and we're just going to review and create this container app give this a moment to do its thing and check what I was doing and we'll go and create that we'll give this a moment to do the deployment it shouldn't take more than a couple of minutes to do the initial deployment okay my deployment is now complete I can go to that resource get rid of this deployment succeeded notification and in the overview space we can actually see I have an application URL let's go and connect to the application URL and see what we get this has given us a default URL for us to work with we could change this in the future if we wanted to we could layer on different ways of actually rooting to this container app and we can see I've got welcome to engine X so this welcome to engine X is being generated by a container that is running here if I go into containers and I should be able to see I've got Z .5 CPU cores and one gigs uh worth of memory so if I come down here into revisions and replicas what I should be able to see is that I've actually got one replica I've got one engine x copy actually running at the moment so if I go inside here have a look at these revision details there you go active and total replicas one of one we've got a min max replica of0 through to 10 which means that autoscaling is actually already on for me at the moment within this if I go into scale down here uh you should see I've got a HTTP Scala rule already built for us if I go into this HTTP Scala rule you can see the max current requests are 10 if I go and edit and deploy this container rule go grab the existing one down here edit this container what I could do is I could go and change the amount of resources that I can actually add to this so I can add more CPU calls if I wanted and more memory if I wanted to this container instance or container instance sorry container application down here if I wanted to go into the scale option over here what I can do is I can do the minmax replication so if I change this around and say for example I want two I could also go and add additional scaling rules down here if I wanted so I could say hey the rule name is going to be HTTP and the type of the scaling rule might be something like HTTP scaling and say if I have more than uh I don't know 100 concurrent requests what that is going to do is that's actually going to start to scale this out go from two to three to four instances so really really quick and easy to do if I just click back here into revisions and replicas uh wait for this to actually go out and what this is going to do we're going to have two replicas down here for this environment rather than just the original one replicas down here and what we can do is refresh this so now our original resource has been deleted uh We've now got two replicas going up here this is the latest revision of our environment uh so we've got two copies of the engine X server we should be able to refresh this and we still see welcome to engine X and this kind of process here for deploying a container and actually have this thing Auto scale is possible within kubernetes it's a lot more expensive and a lot more complex to actually achieve now what we can also do on top of this is layer on additional services so we could layer on something like Azure front door because this is currently only running in UK South and maybe I want to cach it for other regions as well so let's go and actually layer that thing on here too so let's jump up in here and let's go and have a look for front door and CDM profiles whoops let's paste that twice let's go get that front door and CDM profiles here let's go and create this and we're going to create this as Azure front door and we're going to use a quick create on here as well to get started with a simple web application and one mpoint one origin and one W policy at the moment so it's create create that aure front door and we'll create this in the same Resource Group this YouTube demo Resource Group and we'll actually call this YouTube front door okay uh we'll leave this on a standard content delivery optimized uh tier there are differences between standard and premium skus most notably the premium will cost you more money as well as have additional security features lay on top of that let's just call this uh YT FD for the endpoint name YouTube front door and the origin type here is not going to be blobs or storage or cloud service we're going to go scroll down here and we're going to select container apps so very quickly we can go and hook this into container apps and we can go and select our container apps down here the W is actually web application file uh we can enable caching initially sorry and the query string caching Behavior down here uh we will go in here and use a query string and we can actually even enable compression from this point too to make sure that it's fully optimized for users accessing this now admittedly that's not going to make any difference for people seeing a website that says welcome to engine X but if you imagine this website has got lots of images lots of videos that caching and that compression might actually help quite a lot uh with performance for people from different regions if you're not deploying your application to multiple regions so I'm not going to bother with a web application firewall policy here I want to go to filter any of this traffic we're just going to go through and create this Azure front door directly here and wait for this to actually deploy okay so our deployment of our front door is complete we can go to that resource and we can see on this Azure front door that we should have an endpoint host name down here again a default host name we could adjust this if we wanted to there's a domain section down here so we could add in our own custom domains for our front door so don't worry you're not stuck with this endpoint host name copy that host name paste that into the browser down here as you go and access it we get page not found we're able to find your azra or service configuration if it's a new configuration you might not it might not be ready yet now the Azure front door is a global Service this is a pretty common thing that you're going to see um so it's going to take a long time to actually kind of replicate around the planet uh this might take a few minutes it might take a few hours but rest assured at the moment this is actually complete on its setup so if we go back into the YouTube friend door and we have a look at the origin groups down here we can actually see if I configure the origin group uh you'll be able to check out that there is the original origin host name the one from my Azure container app.io down here so after this is replicated around the planet and after front door has been replicated to the other Azure regions what we should be able to have is a cach globally available service for connecting to our single ngx instance here that's actually sitting on our Azure container apps so I hope you enjoyed this small demo for how to deploy Azure container apps and how to deploy Azure front door in front of a a scaled Azure container app service and I hope you'll join me next time for some more information and some more details on azure and you know the routine # like And subscribe and I hope you enjoyed this video and we'll join me next time goodbye
Info
Channel: Mike in the Cloud
Views: 651
Rating: undefined out of 5
Keywords:
Id: 0Jb3RClw4jc
Channel Id: undefined
Length: 17min 30sec (1050 seconds)
Published: Fri Apr 12 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.