Azure Container Apps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello world and welcome to this edition of tech on fire with blaze and blaise stewart architecture windelect and today we're going to be looking at azure container apps which is a new service for running microservices on azure [Music] [Music] hi guys today i want to talk about a new service that's coming out on azure it's still in preview i don't typically cover preview services on this channel but i want to talk about this one because it deals with containers and that's something i have a lot of interest in now this particular service is called azure container apps and the nomenclature on this is a little confusing but basically this service is designed to create a platform for managing microservices that are contained within containers so it's something like a managed kubernetes cluster but it's more managed than something like azure kubernetes services so basically what you're going to get with this is an experience that's probably more like what you would expect from something like azure web apps where the pane of glass that you see is either the azure portal or cli you never really get exposed to the underlying infrastructure now with azure kubernetes services if you want you can go in and see the infrastructure you can interact with that you can even install stuff on it you can ssh into the nodes and all that stuff even though it is more or less managed infrastructure this particular service isn't designed for that it's more about trying to get you out of the business of having to manage a kubernetes cluster but still providing you a way to manage your containers on something that's like a kubernetes cluster where you can scale them infinitely really with particular service now this one is based on some open source projects that are designed for microservice and microsurface scaling so you may have heard of these but one of them is dapper and pepper is from microsoft and it's basically a framework for building out and scaling container-based applications and it provides a lot of knobs and dials that you can use to build out rules for scaling up or scaling back services another one that it's going to support is cada or kita which is kubernetes based and this particular service is more open source but it will still have the same basic paradigm where you can have the configuration of a number of different services and have those automatically scale based on things that happen in the kubernetes environment be like cpu utilization or memory utilization or http request or queue length or things like that and this will be able to scale services in the kubernetes context not just based on something like a virtual machine scale set or something along those lines but when you get this up and running the the idea here is that you can have an environment where you can deploy your containers to and then you can then use these various tools to scale out these applications and create versions of these applications in a way that you don't really have to worry about the underlying infrastructure you just worry about the services and once you have everything up and running everything should work just fine but i'm not going to go into a lot of detail about this date still in preview so the documentation for it is influx that the service is in flux but i just wanted to show you how you can spin this up and then kick the tires on it if you want to it's really not that hard to do but it will give you an idea what you can do with it and it will show you all the kinds of things that they kind of have in mind with this particular service so i'm excited about it but let's go over to the azure portal and i'll show you how to set this up so i'm here in the azure portal i'm going to create a container app environment now this is the kind of the first piece of this whole thing now container app environments have basically three levels of organization you have container app environment which is a grouping of container apps then you have the container app itself which then has a sub layer under it called revisions and revisions will actually contain the containers that you'll be working with so i already have a login intellectual workspace and you need one of these because this is where it's going to report all the logging to from the containers as well as the environment but all the container logs are going to get dumped into a login links workspace so you can easily create one of those just go to your create here and type in log analytics workspace and just create one and make sure it's in the same region as you were intending to use this for now i have mine in north europe because that's currently one of the two regions that are supported so if i were to select north europe here just type it north and that'll filter it a little bit and i can give it a name like asdf i've already created one so i'm not going to go through it again but in any case create a login alex workspace and once you have that done then you will have a login linux workspace selects like this now you can actually create a container app within the portal i'm going to show you how to do it on the cli because this is really where all the magic is right now the the portal seems to be a little bit behind on fruit features you can create things in using the wizard to set it up but once that is created there's very little you can do in the portal so i'm going to show you on the command line how to create container apps uh here so for this one i'm going to go ahead and start up the azure cli in a cloud shell and before i do this i need to actually register a couple of things with my azure cli and my provider so the first thing you do is add the extension i've already added this but i'll paste this command in the video description so yeah you can see it and since it's already registered it's going to tell me that it is and then you need to register a provider and this one will register this microsoft web provider and once you have that that kind of primes the environment so it can create these resources so the one i'm going to paste in here next is the command that you use to create the container app environment and i've already exceeded this with some stuff so i'm just gonna but i'm gonna have to get some values out of the login alex workspace and i'm going to create this one in the same resource group that i just i have right here and i'm going to call it ian aca demo dash env for the name and then the work i need the log analytics workspace id and the login linux workspace key and the location of course is going to be northern europe so to get that that's pretty straightforward i can come over here to the log analogues workspace i'm going to pop this up in a new tab here and what i need to get for the workspace id is this value right here and a workspace id and then i can just come over here and paste that into workspace id which is right here and now i need to get the workspace key which is something that you're gonna have to get over here from asian configuration and under agent configuration then you agent management sorry uh you go to under agent management and then you can grab one of these keys it really doesn't matter you have different keys that you can grab you have to grab one of these and that is what you're going to need for the log analytics workspace to connect to the environment and so once you have that you can come over here to the this particular value right here and you can paste it in and i'll link this command in the video description below as well and then you can populate it with your values and once you have that go ahead and run it this thing takes a little bit to create not very long but we'll come back when that's finished okay that's done now what i need to do now is actually create the container app the container app is pretty straightforward what i'm going to do here is i'm going to get another command for you and i'm going to unpack this command i'm going to paste it in but i'm going to show you the parameters here now the the name of this uh container app is going to be uh what you name it so i'm going to call my node app and then i'm going to give it the resource group which is going to be the same resource group that i have my container app environment in you can put it in a different resource group it'll let you do that because it's treated as a separate resource than the container app environment it's a container app but it needs to be a part of environment so for this one i need to specify the container app environment and then it's going to inherit the region from that so if i say environment that's in northern europe it's going to get the region from northern europe here now the image that i'm going to use here is one that i've written i've used this in several demos before it's called blaze aks it's a public repository it's just a node.js app and now it's got the target port right here and the target port is the port that the container exposes and this container runs on port 3000 for the publicly exposed endpoint and so what this will do though is expose that endpoint on something external it could it will use https so it's going to expose this on port 443 but do forwarding back into port 3000 so that's going to basically be an http endpoint and https offloading is going to happen at the load balancer that's going to be in front of this under the hood this is actually using something called envoy which is something that is used basically to load balance things across a kubernetes cluster there's many of them out there but this one is using envoy under the hood but any case that's what i'm going to be using under the for the container port now for ingress right here i am saying use an external endpoint you can specify internal and it will expose this particular web app internally on the actual container app environment versus an external endpoint so it would only be reachable by other apps that are deployed to this container app environment but i wanted to be external so i could reach it from the public internet and from there i have a query right here and the query is basically uh the the fqdn that i want to get out of this so basically it's just going to be the url that i can use to reach this particular service at so i'm going to go ahead and deploy this and since everything is is already primed there i can just go ahead and run this and we'll come back when that finishes okay so this is my app that's been deployed and it says it's uh available at this this view fqdn right here this fully qualified domain name so if i copy this i should be able to copy this and then pop up in a new tab and just paste this in with https in front of it and i should be able to get that node app so there that's my node app that's running behind the scenes it just reports information about the actual environment in this case you know linux is the platform and it's a node app node.js web app so nothing particularly fancy there but uh that's the end point that's reachable so i'm going to deploy one more uh container app into this container app environment and to do that i'm going to come over here to this particular command line i'm going to paste in that same command i ran just a minute ago i'm going to basically change some of the parameters in it i'm going to use a different target port i'm going to use port 80 in this case and i'm going to use a different container and this is going to be clean as my name my container and then i'm going to give it the the same environment dash env and the container group and then i'm going to give it a new name so let's go ahead and create that and we will let that finish and i'll let you know when it is done okay now that my commander keen container is deployed i'm going to go ahead and copy this and let's see if we can get some commander keen action going on here and uh let's see if this thing will actually support the the actual web app here so this is actually using websockets so this does support um so if i go to c colon this actually does support websockets it does support using apps that are more rich and the this is actually streaming data back from the actual azure container app instance back to the browser and then it's rendering it on this particular screen here so this is more of a streaming implementation over http so but i'm interacting with a desktop application in a browser so if i go to install this will just install a an application on this and this is just a cheeky demo that will allow me to play an old dos game on this and this particular dos game is one that i played as a kid but this one is actually running on the azure container app inside of an azure container environment and it's a desktop app in that case but it's just a fun little demo that allows you to see you know the kinds of things that you can do with this it's not particularly uh novel it's just a simple little application that allows me to run x and some desktop applications a dawson by emulator that and lets me stream the results back to a browser window and this is a little bit sluggish than if it was running it say like kubernetes but in any case it does get the job done and it is kind of fun to play with so again just another app running the same environment so i'm here in the azure portal now and i've created um my resources these three resources that we created with the actual cli and the environment and then these two apps down here now the the environment doesn't really allow me to do a lot i mean i can see the apps that i created but i can't really do much with them it's just mostly informational type stuff that i can do with this this is why the cli is is kind of important as of right now now they'll probably enable more uh functionality as this matures now a couple of things that you can do down in the actual apps themselves is as is look at secrets i'm sure i'm not going to go over but you can expose secrets to your application um you can also reconfigure your engrass if you want to so currently i'm using for 3 000 i have externally exposed ingress which we've talked about already another thing that you can do with this is you can create integrations with github and this allows you to to build your container images and push them to acr and then pull those back to the environment and it will set up a cd pipeline if you want to do that which is the ability to do that i'm not going to cover that but i want to do i do want to look at revision management because uh revision management here is uh kind of a cool feature and i've created a couple of revisions in this uh to show you what i was talking about so a revision is it's kind of like a version of your application and so it allows you to do like more like what we might call um rolling upgrades and things like that so you can do a single revision uh one active at a time or multiple revisions and then you can do load balancing across those if you want to do like some a b testing and that kind of thing and currently i have mine set up in multiple and so i currently only have two turned on so these are set up for 50 50 between these first two right here if i'm wanting to create a new one it's it's pretty straightforward i just come over here and then you create one uh and then you would you choose the container uh then you could use the a new container or an existing container um either way would work and then the next thing you would do is set the scale for this so 0 to 10 instances which is the most it supports as of right now in the portal um and i at least want one and then you can enable dapper with this and that will give you service to service communication which allows you to uh integrate with that there's also some other things about it that that are that are integrated with dapper but still you have that ability as well so that you have all of this available to you currently in the portal and you can configure it but since i already have a couple of these configured i can uh then set up the the load balancing between these so if i do like a 33 33 and maybe 34 split between all of these um you should be able to like see it redirect some traffic around between these three containers and so as soon as that saves i'll show you what that's going to look like but i already did but before we get into that i do want to show you that you can't actually edit these as of right now uh it does show you the the properties and you can come over here and edit and redeploy it if you want uh for a given revision and so you can change the scale enable disable adapter and that kind of thing so again it's fairly smart in the portal at this point but you still have the ability to do some things but any case if i wanted to get a specific revision i can come down into the actual revision and then i can open up that one and i can hit that one all the time if i want to hit the more load balance configuration then that's where i would come over here to my my node app and i'd come over here to my overview and that's where i get this url right here and this one will load balance between the three so it's it's showing me the actual three different uh containers that's hitting up so i hit it refresh on my browser so it's just sending different requests to one of those three instances and that's just the container name based on the actual particular revision that i'm using so again something that's fairly straightforward here in terms of how revisioning works but it does allow you to do some like rollover transitionary type revisions or to have a b configurations and things like that so again it's neat functionality there now that we've done that i want to go over and look at the logs of this so let's take a look at that and then we'll wrap up this video so to review the logs it's pretty straightforward go back to the resource group and go back to the log analytics workspace that we created and then you can come down here to logs and then you can close this out and this is going to pull up the the data explorer for the login looks workspace and so you can run the custo queries on this and this will allow you to filter the data and you can see here the logs that were coming back from all the containers so if i expand these i can kind of see what was going on uh inside the logs so uh this is what was being reported back out this is the log stream that it reported it to if i come down here here's the commander keen log so from something from that here's the standard error it's putting putting something on that you know you know web server sometimes it goes to standard error some people use that just as an alternate logging mechanism in any case the standard out for the node log this is node.js.index node index.js for that log so if you have more robust logs you would be seeing more data in here but this is uh pretty straightforward because i only have 50 86 entries ever as of right now from all my various container activity but still it's very pretty straightforward so this is just how you view the logs for your containers so if you need to do a diagnostics or if you want to set up eventing or other kinds of monitoring around this this is the place to do all that i hope you found that informative this is a new upcoming service on azure i'm kind of excited about where this is going because this is one of the things that's been kind of a hole inside of the azure offering for a while in the container space it's a simple way to deploy microservices rather than having to use something like service fabric or having to use a full cluster what you do aks with this it's just out of the box platform as a service designed for microservices so i'm excited to see how this evolves and as it matures we'll see more features added to it but this is just kind of where it stands as the recording of this video so we'll be looking at this and as soon as it goes g8 i'll probably do more in-depth content on it if you like this content please consider visiting us online at www.wintelec.com and there you can find about services that wineluck offers including training and consulting services also please consider subscribing this channel by clicking on the subscribe button and clicking the bell icon to get notifications when new content becomes available and also comment down below you can also follow me on twitter at the one mule and also follow intellect on twitter at winnelec now or at whenelect we are constantly posting things about azure related technologies and things related to software development you can also reach us by email at consulting whenelect.com until next time thank you
Info
Channel: WintellectNOW
Views: 1,455
Rating: undefined out of 5
Keywords:
Id: 2CX9S9G89jw
Channel Id: undefined
Length: 20min 49sec (1249 seconds)
Published: Mon Nov 08 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.