abccccc.pdf
Document Details
Uploaded by CapableAmethyst
Tags
Full Transcript
in this lesson we're going to explore the benefits and usage of some of the core compute resources 0:07 if we go ahead and look again at one of those skills being assessed we're now looking at this describe core 0:14 resources available in azure section and now in this particular lesson we're going...
in this lesson we're going to explore the benefits and usage of some of the core compute resources 0:07 if we go ahead and look again at one of those skills being assessed we're now looking at this describe core 0:14 resources available in azure section and now in this particular lesson we're going to dive into vms app services some 0:23 of the container services and azure virtual desktop and then on some other videos as we go 0:28 through we'll look at these other core types of resource so that's the goal of what we're going Lesson Overview 0:34 to actually look at now if we think back in an earlier lesson 0:39 we kind of looked at the idea that there were different layers and there were different responsibilities when we 0:45 thought about those different aspects of the system now in all cases no matter what if we 0:51 remember the fabric so the storage the network the compute that was always the 0:58 responsibility in the cloud of the cloud provider i.e azure as was the hypervisor so no matter what 1:05 service we're using this is always the responsibility 1:10 of azure but then remember there were different types of service in the cloud we could 1:16 think about well there was i as infrastructure as a service 1:21 and our big example there was well hey it's a virtual machine 1:26 and in that case the responsibility there was remember mine so with i as 1:33 this was me me as the customer this was all my responsibility 1:39 so let's start with the idea of a virtual machine now as we talked about previously 1:46 a vm is really the idea that we have all of that hardware that infrastructure and 1:51 we're virtualizing it we're giving ourselves some virtualized 1:56 some portion of that underlying system now 2:01 if we look at just creating a vm just super quickly so if we jump over Creating a Virtual Machine 2:07 if we just go to the azure portal and i can think about well i'll just go to virtual machines and i can say create 2:14 a new virtual machine we'll see hey we do this usual remember 2:20 everything has to live in a subscription and one and only one resource group so we could pick an existing one 2:26 we could create a brand new one it has a name this is the name of the resource in azure not necessarily the 2:33 name that has to be in the operating system running within it it has to exist in a specific region it 2:41 can't span regions it's a single resource we had that idea of availability options 2:47 and then we have this idea of the image now there's windows images there's linux 2:53 images and the these are all coming from the azure marketplace i could even upload my own custom image 3:01 and then we have this idea of a size and there's a huge number we can see these letters d b 3:09 d c e f d all these different letters and then within those letters you have 3:16 these numbers d2 d4 d8 d16 with different amounts of cpu cores 3:26 different amounts of memory and then some other aspects like storage 3:32 performance network performance so we have these different numbers associated 3:37 with depending on the different type of vm and then the particular size of the vm 3:43 so what's all that about so i can think about if a virtual machine is hot virtualizing 3:49 the hardware it has certain attributes for example i can think about that 3:55 virtual machine has a certain number of virtual cores when we think about kind 4:01 of cpus it has a certain amount of memory and it has a certain storage performance 4:08 i can think in terms of maybe iops in terms of throughput and then there'd 4:14 be network as well there might be specialist services that have gpus that might have nvme local 4:22 storage that have rdma network adapters but different types of workload need 4:28 different ratios for example if i'm a database i want a lot of memory compared 4:34 to the number of virtual cores whereas if i'm a compute service doing 4:39 processing i might want more virtual cause compared to the amount of memory or a general purpose i want just a 4:46 balanced mix so often there's kind of this ratio of cause to memory 4:52 and then we have specialist types and so that's why we have these different skews these 4:58 different types of virtual machines because they have those different ratios if we jump over 5:05 we can actually see microsoft has a vm sizes site and really what we're going 5:10 to care about right now is this idea that there are these general purpose 5:16 types of virtual machines compute optimized memory optimized 5:21 storage optimized gpu fpga accelerated which are programmable pieces of 5:27 hardware high performance all these different types and exactly as we just talked about if i 5:33 looked for example at a compute optimized within that particular skew there are 5:38 different sizes we can see the number of for example cpus 5:44 increase and then so does the memory but a key point here is look at the 5:50 ratio two to four so for every one virtual cpu 5:56 really virtual core i have two gibby bytes of memory because this is a compute optimized 6:03 if i looked at a general purpose and i'll just pick one of the particular skus here 6:10 and now we looked well once again we had the idea of vcpus and memory 6:16 but now the ratio is one to four for every virtual core i have four gibby bytes of memory 6:22 and then we have the idea of memory optimized skus and you're probably going to guess what we'll see here 6:28 well now the ratio is one to eight so what we would do is we want to 6:35 understand well what's the workload we have what are the types of processing we have running 6:41 and then we'll pick the right skew that gives us the right balance of cores and 6:46 memory and maybe storage performance and network performance to make sure hey 6:52 it's going to have the right portion for the workload we want to do so we're not optimize our spend what i don't want to 6:57 do is pick the wrong type of vm and have a huge amount of memory idle or a huge amount of cpu idle remember 7:04 i pay for these things i want to make sure i optimize as much as possible Managing Virtual Machines 7:10 so we have these virtual machines we can create and we kind of saw that experience of creating it 7:15 now remember i said previously the thing about virtual machines is there's a whole set of other aspects that you're 7:22 responsible for the patching the backup the dr the antivirus the firewall 7:29 and although yes you're responsible for those things as we go through and actually create virtual machines 7:36 we'll actually see there's options for a lot of these for things to help you 7:42 so if i jump over for example to management there's actually aspects of this that 7:48 can do things like hey auto shutdown i can do things like hey look enable disaster recovery 7:54 it's going to use azure site recovery hey automatically perform patching for me 8:00 and then there's a whole bunch of actual extensions that i can go through 8:07 and extensions add other functionality for example there's a 8:12 an extension that uses anti-malware there are extensions from third parties 8:17 so although yes it's my responsibility doesn't mean you're on your own there 8:22 are things to help you do that so a virtual machine i think about as a building block 8:28 it's a great fit if i think about i have some existing workload maybe on premises and i just want to move it to the cloud 8:35 virtual machine is going to seem very familiar it's the same concept i have full access to everything inside that 8:42 operating system i can configure it however i want if i want to do dr maybe from on 8:47 premises to the cloud i'm probably going to do dr to a virtual machine 8:52 many infrastructure services if i'm a domain controller maybe a file server 8:58 hey i can use a vm file if i wanted to install and run my own database i'm going to put that in a vm but as we'll 9:03 see azure has its own managed database services which may be a better fit for 9:09 us so these are a good choice if i need management and direct access to the 9:14 operating system this is where these really play okay so then we build on that we have Virtual Machine Scale Sets 9:21 the idea that's a single instance of a resource a virtual machine but if we remember the idea of the cloud 9:28 we want to do that scaling capability we want to scale out i.e horizontally we 9:33 add and remove instances and most of the time for resiliency we'll have multiple 9:39 instances of a service well i could manually create a whole bunch of vms i could maybe write some 9:45 script to look at something and stop and start them but why do that a better option 9:52 is we have something called a virtual machine scale set so this is obviously building on top of 10:00 virtual machines but what this adds to the picture is now the idea is i specify a certain 10:08 template so this is a template of which operating 10:13 system i want to use i say specify a configuration 10:20 i.e the vm sku the size extensions to add 10:25 and i can also specify scale now that scale can be things like a 10:31 minimum number of instances a maximum number of instances but also 10:37 auto scale criteria if cpu is over 70 on average add two 10:43 instances if it's less than 30 remove an instance if a queue depth is 10:48 over 10 hey add an instance so with vm scale sets it's actually 10:53 going to go and create those virtual machines for me and that's really a great solution when 10:59 i do have hey i have need multiple instances i don't want to manually create those things that's kind of an ugly thing 11:06 this would do it for me so if i have a requirement of you need x number of virtual machines 11:12 all configured identically and you want to be able to have some scale conditions 11:18 chances are a virtual machine scale set is going to be your answer for that there's also services like azure batch 11:25 if i have a large scale parallel workload or high-performance computing then azure batch can actually go and 11:32 provision the virtual machines behind the scenes and i can just submit a job i 11:38 can say hey i need this thing to run azure batch will take care of all of 11:43 that for me i submit the job it queues it up it executes it so for a really 11:48 large scale execution azure batch may be a good answer Containers 11:53 so these are really playing in that eye as space that's really where they shine now after is you start to get into the 12:01 idea of pads remember that platform as a service 12:07 and this is not quite as black and white like often we will draw the line of the idea that hey 12:13 i for pass no longer care about the os or the runtime 12:20 that's completely managed for me and it does depend a little bit because the first type of paths we're 12:26 going to talk about is containers now if i think about a vm virtualize is the hardware it presents 12:32 to me a virtual set of hardware cpus memory etc with a container it's virtualizing the 12:39 operating system so through various operating system components it's going to have isolated 12:45 name spaces so i have isolated set of processes isolated networking i can have 12:51 resource controls to control how much resource in terms of maybe a cpu and memory i can actually use 12:57 but it now lets me have multiple applications sharing an underlying container host inos 13:04 instance now because of that i can create them much much faster a vm still has a certain amount of time 13:11 it takes to start up because i have to create the virtual machine i have to get the os started up it may take minutes so 13:18 it's still fast but it's minutes if i think hey these new micro services 13:24 that i need to spring up something perform a calculation and then it deletes minutes is way too long i just 13:30 want to think sub second so containers can do that it can spring up super super fast but we still have 13:35 isolation in that user mode space so these are fantastic for those micro 13:41 services now the way a container really works behind the scenes is i have the idea of 13:47 a container image so there's some container repository so i can think about hey with containers 13:54 there's a container registry is the term we use 13:59 in that container registry we have container images and that image may actually be made up 14:05 of multiple layers it might be built off an os layer and then a runtime layer and then i actually get my application so 14:12 there's lots of layers inside there but then to actually use that we have to 14:17 create a container so that container will actually often run on a container host so we provision 14:24 a container host so we create this idea of a sandbox when i think about a container 14:32 it's creating this sandbox but it's creating it in an operating 14:38 system there's now a container runtime like a hypervisor virtualizes the hardware container runtime virtualizes 14:44 the os so there is now this container 14:52 runtime that creates these sandboxes and this image runs inside it so now 14:58 that container is up and running and the whole point is i can have lots of these sharing the same container runtime 15:05 so i have an underlying operating system a container runtime a set of management tools and i'm running these images 15:11 that's what a container is so i have multiple running on the same os instance i'll contain a host but they have those 15:18 isolated name spaces for the processes for the networking and resource controls 15:23 and containers really are the future if you look at a lot of things people are talking about for applications it's 15:29 i want to use containers so let's think about the services in azure that work with containers now Azure Containers 15:35 absolutely i could just spin up my own i could create vms i could install a container 15:42 runtime and i could do everything myself but there are actual services in azure that really do this for us so the first 15:49 one we think about is azure container instances so we have this idea 15:55 of a c i and the reason i'm kind of drawing it at 16:01 this layer is you still pick the container image so that container image has an os and a 16:08 runtime i'm not managing the operating system of the environment 16:14 but i still have a little bit of gray area that i pick the image which has an os there's a little bit of management 16:20 i'm still performing but i really am focusing on my application that i'm 16:26 putting inside that image so aci is really designed hey i just have a container i need to run Azure Container Instance 16:33 maybe a couple i can group them together so they share a certain space 16:38 but with an azure container instance and we can go ahead and look at one of these all i really have to do 16:45 so let's switch over to aci 16:50 i don't say very much i say hey i want to create a container instance 16:55 all i'm going to do at this point is once again you have to pick a resource group always i would give it a name for my container 17:03 so i'll just say test container one pick a region there are images 17:09 from the default registry and these are showing me some of the default sample ones i could use 17:16 i can base it on windows no it's or linux or maybe i've got my own container 17:21 registry which i have and i could use an image that i've created and then i pick a size 17:27 so remember that vm idea of a skew and a size well once again these are 17:33 kind of similar it's giving me a certain amount of cpu cores and memory but i get 17:38 a lot of flexibility here because this is really a serverless solution i'm not having to pick a vm and pay for it all 17:44 the time i'll just pay for when this container runs and then i can integrate with virtual 17:50 network or i can just have a public facing endpoint 17:56 and then there's a few other advanced things but we're not going to worry about that so i really think about the idea of with 18:03 a container instance it's just the idea that i want to run 18:10 a certain container for a certain period of time and just pay for it while it's running 18:15 so my first azure service when i think about containers is hey i use an azure container instance 18:22 so if i saw a question hey you need to just run this image that exists i just want to make it available 18:29 what could i use well an azure container instance and again if you had maybe two that need to share a space you can 18:35 contain create a container group however most of the time we're going to have a 18:42 more advanced scenario i need an orchestration of the containers to handle how they're placed on multiple 18:48 container hosts to control richer networking to control persistent storage connectivity to maybe 18:55 control some of the identities and other extensions and policies that i want to use 19:01 and so kubernetes has really become the standard in orchestration for containers Azure Kubernetes Service 19:07 now yes i could again install kubernetes myself in a whole bunch of virtual machines 19:12 but azure has its own kubernetes service so the next thing we kind of have here 19:17 is azure kubernetes service 19:22 aks now there's really two planes to think about with kubernetes 19:29 there's a management plane the control plane 19:35 and then there's this idea of kind of a data plane or where i actually run my containers 19:41 with aks that management plane is fully managed i don't really see it 19:47 it's off running somewhere it doesn't running anything i can see in my subscription but all of the components 19:52 that make kubernetes work the api server the schedulers the xcd 19:58 database all of the other resource managers they're all often running somewhere we 20:03 don't see what we see is well the containers have to run somewhere so what it will do is 20:10 it will create container hosts nodes in our subscription 20:16 and what it actually does well guess what it does for the that data 20:24 it creates a vm scale set so the nodes will run the containers aks 20:30 for all of the node pools it will create a vm scale set which remember is built on vms i get to pick the size i get to 20:37 pick the skew of that node pool so again understanding that core building block is really really useful because it 20:43 applies to so many things so with azure kubernetes we get that rich orchestration where i can have 20:50 deployment yaml files helm charts i can even use things like git ops where it goes in fetch as its configuration from 20:58 a git repository i can do all of that with azure kubernetes service so azure kubernetes 21:03 service hey i need a full rich orchestrated environment but i 21:09 still want it to be fully managed so all i really focus on is the idea of 21:14 that deployment yaml file that defines what containers i want to actually run Kubernetes Containers 21:20 and behind the scenes it's going to go and create a whole bunch of nodes 21:29 which i can see but i'm not really doing anything about them where it will go and schedule the execution of containers now it runs 21:36 those containers in things called pods you don't really have to worry about that but that's where the containers 21:41 it's kind of an envelope for the container that's the unit aks uses so i have this idea of pools 21:48 where i actually going to run my containers so if you see something like hey you want to run this rich container 21:56 environment i need auto scale i need integration with networking i need persistent storage 22:02 as soon as you see the word containers chances are unless it's you just need one or two you're going to use aks that really is 22:09 the answer and then we get to things like azure app service Azure App Service 22:15 so then we have app services app services is all based around and 22:22 this was actually one of the original azure services i have something web-based 22:28 now it could just be a direct web application i actually want to run 22:35 it might be something like an api that i want to expose it might be a 22:40 mobile application there are special features around ios and android for push 22:45 notifications using a custom social provider whatever but if i have any of 22:50 those things this is great so i can think about hey i have something from the web i want to 22:56 expose an api i have something mobile and i just kind of have my application 23:03 code app service is phenomenal i'm really not worrying about anything now i can 23:08 actually run containers on app service as well we're not really going to focus on that 23:14 with an app service what i can actually do is i can pick what is the run time i want 23:20 it is an underlying way it is still using vms what i pay for 23:27 is the number and the skew and size of the vms that the app service is using i have zero 23:33 access to it though i can't configure things in their operating system the same way i can't configure things in the 23:39 os for aks yes they exist but they are fully managed i have zero access to those 23:45 things i might be able to get certain logging maybe get certain output but i can't go in microsoft are responsible 23:52 for the os in all of these things but if we go and look at one of these 23:58 if i jump over and let's say app service 24:05 an app service actually runs in the app service plan i'll just create a new app service 24:13 and here you can see hey do i want to run some code and it integrates really nicely with things like devops so i can 24:20 push to this very very powerfully or i can actually this is where i can say i actually just want to run a 24:25 container i can do linux or windows but if i say code 24:30 i tell it what runtime stack so although i don't have access to the os 24:36 it has a lot of flexibility in what it actually supports so i could write my application in any of these things 24:42 and easily move it over now you can see because i picked.net hey do you want to be windows or linux so not.net 24:49 can actually run on either one so i get to pick so it depends on what i'm using 24:55 as to which operating system sometimes there's different stacks so for java hey i can use java se jboss eap 25:04 7 or tomcat so if i had maybe a web application running on premises today on tomcat 25:11 yes today maybe it runs on a vm but if i'm willing to do a little bit of 25:18 refactoring or maybe now i could run it on an app service so i have a huge 25:23 amount of choices in the runtime even though i have no access to the os or the runtime i still get to 25:29 pick those things but i have to worry about patching them or the security of them that's just done for me by the app 25:36 service now another aspect to app services this Azure Serverless 25:42 is where we really start to move up the chain is actually we think i'm actually going 25:47 to use a different color for this we think of serverless 25:56 now the whole point of serverless is all of the things we have talked about so far vms and vm scale sets that's obvious 26:03 we're talking about some unit of work we pay for but as we saw even 26:09 aks we're going to have node pools which we pick the sku and the size app service 26:14 when we create it we pick the app service plan where we pick a sku and a size and it has things like auto scale 26:20 and up maybe deployments lots other features but i'm still paying for essentially 26:25 units of vms serverless we don't so serverless is still pairs but it's that highest level 26:33 because we're not paying for any unit of vm we pay for the work that is being done 26:40 now there's really two key types we have functions 26:47 and we have logic apps and both of these can run in that consumption model where i just pay for 26:54 what i'm using but functions can also if you had an app service plan 27:00 i can also execute them within an app service plan as well as part of an app service so i do have that choice 27:07 so here i have some code i want to run and these are event driven something's going to happen 27:13 that tells me to fire these things off it could be hey something's written to a storage account it could be i get a 27:20 restful api call it could be a timer event and maybe i'm manually executing 27:26 something triggers it to perform the work now it functions i'm writing code when i create a function 27:33 i am essentially going to give it some code so if i say hey i want to create a new 27:40 function app what we're actually doing you see i've got a number of different ones here 27:46 if i create a new function app notice once again a function can run sync from a container everything can be 27:52 containers today but i pick a runtime stack so i could run it from net nodejs python java 27:59 powershell core or some custom handler and i pick a version 28:04 so for me i'm a big powershell person so if i were to run a powershell script maybe on a schedule or when some event 28:11 happens i could use a function for that and then i'll just pay for it so the point is here i'm writing code 28:19 logic apps uh a big push around the idea of that 28:24 kind of citizen developer codeless solutions so if i go and look at a logic app this 28:30 is a visual designer and what we can do with logic apps once again there's some trigger 28:38 but these are more stateful there's some flow that maintains state for that entire flow 28:45 and then they have these graphical designer to drag and drop different 28:50 components this is taking its time let's jump over and then come back there we go you can see here i've got 28:56 this graphical flow hey a blob is added create a uri caller http call and then delete the 29:02 blob so i'm just dragging and dropping these things on but also 29:09 there are built-in templates so let's actually scroll down some of the templates 29:15 and that's why i'm saying interesting and fun daily reminder hey based on a schedule 29:22 then i want to send kind of an email if a new file is created in dropbox copy it to one drive 29:29 email yourself tweets that contain a certain keyword so there's all these plugins 29:36 that i can use i just drag and drop these onto my canvas so the whole goal around all of this 29:44 is that i don't really need to be a developer to use these so these are both serverless so again if 29:51 you see this requirement i need to perform this piece of work when something happens and i want to minimize 29:57 my cost and just pay for the work done if i'm writing the code azure functions 30:03 if the emphasis is on hey someone tweet something or something drops and i don't want to have to code instead i want to 30:09 use built-in connectors hey logic apps are great for that Azure Virtual Desktop 30:14 and then finally and this isn't i think in the same realm as this but it's being lumped in with the skills assessed in 30:21 the same way there's azure virtual desktop so all of these things and the reason i 30:27 think it's a little bit different is all of these ios and pads they're not delivering a business function 30:32 they're something that you build on you are still responsible for your app 30:38 um there's something i have to add on top it doesn't deliver a business function 30:43 imagine a scenario i want remote desktops from my machine i want to remotely connect and get a full desktop 30:49 or maybe just an application published to me well just if you think about what is 30:54 required for that experience well i have to have some idea 30:59 of there's some machine running some host 31:05 that will actually serve up my desktop then there's actually a whole set of other management layer i need things 31:12 like a broker that's going to control well as users come in 31:18 which host do i actually connect them to there's the idea of a remote desktop 31:25 gateway because i want to encapsulate that incoming rdp 31:31 inside that can travel over the internet so the rd gateway enables me to do that 31:38 there's other databases there's feeds there's web feeds that i can control 31:43 there's all these different elements that i have to manage i have to maintain these hosts maybe they're running 31:49 servers maybe they're running a client operating system maybe there's a pool maybe there's personal so the whole point of this is azure 31:56 virtual desktop provides a complete managed solution just like aks i do not see this 32:05 part this management plane is all just done for me what i get in my subscription are the 32:12 hosts that people will actually connect to and the reason we want them in our subscription is i could then connect 32:18 them to like my virtual networks i can connect them to other services i can have the profiles mapped into it so 32:24 azure virtual desktop is doing two things it can provide me with a complete 32:30 desktop experience so user gets like a full start button and then they run whatever they want or 32:37 it can actually publish particular applications so here maybe on a mobile device it's 32:42 super useful to just bring up a certain app or even hey i'm running a desktop 32:47 and i want it seamlessly integrated with my main desktop i can do that with azure virtual desktop so this is basically 32:54 think about it like a desktop as a service offering so those are available as well you might hear the term windows 33:01 365 that's an even simpler version when i don't worry about any of this anymore i 33:07 just pay on a per user basis to get a desktop in the cloud it's always personal it's linked one to one 33:13 and there's different skus business and enterprise business goes up to 300 users and it's azure id joined enterprise is 33:21 unlimited number of users um it can be azure id or regular adjoin but it can 33:26 integrate with your existing networks and there's a whole set of richer functionality custom images but you 33:31 might hear that term as well but that's why i think about some of the the key kind of services 33:38 that we have so we have vms i want to kind of lift and shift something i need direct full access to the os virtual 33:44 machine scale sets i need multiple of them to provide that service but it's going to create them for me 33:50 if i have containers if i just have one or two and i don't need any rich orchestration i can use azure container 33:56 instances if i want to be able to submit deployment declarative files and have rich networking and storage integration 34:03 and extensions and policy azure kubernetes services 34:09 and then we have azure app services which run on app service plans which can be 34:14 web-based applications apis i want to be able to offer out there mobile apps increase functionality for 34:21 notifications and other things and then if i just want to be able to offer desktops or published applications 34:27 we have azure virtual desktop