AZ-900 Episode 9 | Compute Services | VMs, VM Scale Set, App Service, Functions, ACI, AKS | Azure

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Recording this episode was a true rollercoaster. I was sick so I had to record it twice, then I realized that I can present the topic in a much more understandable and consistent way. So again I recreated all the materials, drawings, animations , and recorded the episode for the third time. 🤧💪🤩🎥📺

This is because my goal is to help everyone pass the Azure Fundamentals exam but also to prepare viewers to work with Azure services.

I'm very happy with the result. So let me invite you to the 9th episode covering Azure Compute Services overview.

https://marczak.io/az-900/#ep09

👍︎︎ 2 👤︎︎ u/AdamMarczakIO 📅︎︎ Aug 14 2020 🗫︎ replies
Captions
hello everyone welcome back to azure fundamentals course in this episode we'll be covering azure compute services stay tuned today's episode is the first one where we will learn about actual azure services and in agenda today we have virtual machines virtual machine scale sets container instances kubernetes service app services and functions but all those services are part of so-called compute services compute services is a category of services in azure allowing you to build and run cloud-based applications so whenever this is a web application web service some scripting desktop applications compute services are here to help our first service on the list is virtual machine but in order to talk about virtual machine let's talk about virtualization in general if you have a physical server physical machine what you will do first is install operating system which will have some standard components like file systems some services some ports and other configuration if you will want to run applications on this physical machine you will simply install them on that operating system but the problem with hosting multiple applications on the same operating system is that they will share the same file system same services same ports and other system configurations and because there are no boundaries between those applications at some point or another they will collide and it doesn't matter whether they will use the same service or same ports at some point they will collide which is very bad the thing that you can do to avoid that is to use virtualization where on the physical machine you install operating system but additionally you install virtualization software virtualization software will allow you to create virtual machines so an emulation of a physical machine that machine sense is an emulated physical machine will still have to get its own operating system and on that operating system you will be able to host your application and this application now has its own sound box it doesn't matter what it will do on this operating system it will not impact any other application because other applications will be hosted on separate virtual machines with their own environments this gives you a full separation and allows you to virtualize emulate multiple physical machines using a single physical machine so virtualization is simply set emulation of physical machines it gives you ability to create different virtual hardware configuration per machine and pair application additionally you are able to install different operating system per machine per application suffer application needs different systems this is a way to go and because those are totally separate machines each application can freely use its own file system services ports install any middleware or apply any configuration it needs to run and virtualization in the cloud is done through azure virtual machine service the process is fairly simple you either grab microsoft prepare virtual machine images whenever this is ubuntu windows or a cool machine microsoft already prepared virtual machine images for you in the marketplace that you can start from or if you want you can configure your own system install services runtimes applications and ask your developers to prepare and image a custom image for your own company and put that image into some storage an azure virtual machine service grabs those images and allows you to choose a custom or marketplace image to start creating new virtual machines and exposing them to your users it doesn't matter which one you choose in just couple of minutes a virtual machine will be provisioned and ready to use virtual machines are of course infrastructure as a service that means you are responsible for managing both application platform and operating system configurations because of that you have total control over the operating system and the software running on it and as such you have a support for marketplace but also customer provided images so you can prepare your own images as a starting point for the virtual machines containing your organizational setup out of the box with that said this service is best suited for a custom software requiring custom system configuration or lift and shift scenarios so moving your on-premise application to the cloud without a need to redesign when it comes to supported scenarios you can run pretty much any application any scenario using virtual machines whether this is a web application web service maybe a database desktop application or using this as a jam box to connect to a secure environment or just data gateways or many many many other scenarios that virtual machines can support in azure you have multiple ways to create a virtual machine either by navigating to the menu on the left hand side selecting create a resource and finding virtual machines in the marketplace by going to the compute section and selecting them from the top or you can go to left hand side menu again and select virtual machines here which will give you a list of virtual machines available in your subscription and allow you to hit add button to create a new virtual machine virtual machine has quite a few configuration options but but for today we will just go simple we will create a new resource group called az900 vm select okay provide a name in this case i will call mine am demo vm next we need to select the region so where our azure virtual machine will be hosted in which data center next we need to choose the image and this is the list of images prepared by microsoft for us available directly from the marketplace for now i will choose windows server 2019 the next step is the most important choice when considering the cost of the virtual machine which is the size size simply means how powerful is the hardware that we're virtualizing in this case i want b2ms machine which has two virtual cores eight gigabytes of memory and should cost me about 58 dollars per month if i'm happy with my selection i simply hit select and as with any system we need to provide a starting username and password for our administrative account and i will select that i want to connect to this virtual machine later on through remote desktop protocol everything else i can leave as default just for the demo purposes so let's hit review and create to get our receipt about the virtual machine this is the place where we can review all the details that we selected for the virtual machine if we were happy with it we simply hit create and just wait a minute or two once the provisioning of the resource is done you can select go to the resource to navigate to the panel which allows you to manage everything about your virtual machine and it will show you all the details about virtual machine general configuration you can simply hit now connect select rdp for random mode desktop connectivity which will download and file allowing us to connect to this virtual machine simply open that file select connect select more choices and type in your account that we just created and that's it this is how simply you can create a virtual machine and log it to it in azure by selecting an image size pressing few buttons and in just two minutes you have a server virtualized in the cloud so let's close that for now and let's go back to presentation summarize virtual machines they give you a lot of control over the system but that also gives you additional maintenance therefore i rate them quite high when it comes to control and maintenance they have no auto scaling features therefore you always work with one node one virtual machine at a time as such the scalability of this solution is quite low because you cannot auto scale the only way of scaling is vertical scaling by adding faster cpus or more memory faster drives and things like that which brings me to the second point virtual machine scale sets and with this service you pick an image whenever this is a custom image or a marketplace image this image is automatically scaled across multiple virtual machines those virtual machines are hidden behind a load balancer which redirects the traffic from your users or applications to one of those virtual machines within the scale set the amount of virtual machines can be set statically by saying 3 5 10 or 100 or automatically without a scaling feature so you can increase the amount of virtual machines in scale set or decrease the amount based on your application demand in that case virtual machine scale sets are still infrastructure as a service because you're still managing the virtual machines you need to still prepare images but they are set of identical virtual machines created from the same image as such they have built-in auto-scaling features allowing you to create and delete virtual machines based on demand and they are designed for manual or out-of-scape workloads so things like web services patch processing etc etc this is your way to scale out with virtual machines in the cloud in this case you still have quite a lot of maintenance but high degree of control over the virtual machine scale sets but in this case you are getting auto scaling features so you can scale up to maximum of thousand nodes or 600 depending whenever this is custom or marketplace image which makes scales as one of the most scalable services in azure if you want to decrease the maintenance required you can move away from virtual machines into containers containers are a little bit different than virtual machines while there is still physical machine there's still operating system underneath but instead of installing virtualization software we install container runtime within container runtime you install containers container is a sandbox environment for each application and you can have multiple containers within a single runtime the difference here the major difference here is that there's no operating system replicated across each container as such the footprint of the container is much smaller than the one of virtual machine so what are the implications here containers don't have their own operating system they actually use host operating system but because application needs operating system to run they emulate it so while virtual machines emulate the hardware containers emulate operating system to provide the sandbox environment for your applications and because of that they are more lightweight than virtual machines therefore there's less development effort required for your team there's less maintenance because you don't need to maintain the operating system patches updates and things like that and because there's no operating system there's less compute than storage requirements from those containers as such you can respond quicker to demand so you can auto scale faster than when virtual machines but at the same time they are pretty close to virtual machines therefore they allow you to run pretty much any scenario in the cloud that's why containers are so popular recently on the market so our first service for containers is called container instances when it comes to container instances instead of bundling entire system you just grab the application grab the configuration and other runtime middleware software that you need for this application to run you ask your developers to bundle this application into a container image and host it into container repository container repository is a simple storage service where you host your own images similarly to virtual machines there are public marketplace and public repositories of other images for containers as well you can then grab any of those images and push it to container instance which will create a container group a simple virtual machine underneath the scenes and host your containers some containers might be exposed to users some might not it depends on what container really does if it's web application it will be exposed to users if it's a simple batch script maybe it won't and you can create more container groups and a whole small container depending on your needs so let's summarize container instances is your simplest and fastest way to run a container in azure and this is the first service that is categorized as a platform as a service and sometimes it's called serverlesscontainers because you can actually abstract from the managing of the servers underneath completely this service is designed for small and simple web applications running background jobs maybe some scheduled scripts again in azure portal let's go to the marketplace and create container instance by selecting create a resource typing container finding container instances template selecting create creating new resource group i will call it az900aci giving the name of our container which will be am demo aci next we need to select the region i will choose west europe and image source as i said it's a marketplace so i'm choosing quick start image which is microsoft provided images and aci hello world which is a simple web application next i'm choosing the size of the container group which is the host running my container and simply hit review and create once this is done i select create and just wait for this to be provisioned this service has been provided much faster than the virtual machine under 20 seconds now we can go to the resource again review all the details about the service but for now we just want the public ip i will copy this public ip into new browser window to open the web application that is currently hosted in my container as you see this is a very simple static html page but this was containerized and this is how simple you can create new containers and web applications once the image is ready so let's go back to presentation when comparing container instances to virtual machines and scale sets you still maintain some degree of control because you're virtualizing operating system so you can install extra runtimes extra software but it's still much less than maintaining full-fledged operational system in case of container instances there's no auto scaling but the cool thing is that at minimum you don't need to run any servers so you can have zero nodes running if you don't need any but at maximum you can have 20 container groups therefore the scalability of this solution is not that great but it's nothing bad this service is simple for simple use cases if you need scalability there are other services that deliver you that services like kubernetes service it's another service that allows you to work with containers using the same principle either hosting your own containers within container repository or using marketplace public repositories as such kubernetes servers can use those images to spread this across nodes of course nodes underneath are vms but they are separated and abstracted from you and kubernetes is managing the deployment of containers across those nodes as the deployment of containers is finished kubernetes exposes everything to users or applications through a load balancer and it also gives you the same abilities like a skill set like static scaling or auto scaling so this system is an open source container orchestration platform it is actually available in pretty much any cloud so it's not only azure but also aws and google cloud additionally this is one of the platform as a service offerings in azure and it's highly scalable and highly customizable so while container instances were designed for a simple container deployments kubernetes service is designed for high scale and highly customizable deployments of containers in the cloud and because containers are so similar to virtual machines pretty much any scenario is supported when comparing kubernetes service to other services this is a very sophisticated platform offering and because you are managing the containers and virtualizing operating system the degree of control is pretty high but it also requires quite a lot of skills from your team therefore the maintenance is also high and because it has auto scaling feature and scan scale up to 100 nodes at the time the scalability of the solution is pretty good because containers have smaller footprint than virtual machines you can host more applications using hundred nodes than you can with virtual machines but if we want to reduce the maintenance cost even further we can move to app services main purpose of the service is building web applications whenever those are user facing applications or web services you ask developers to prepare a simple deployment package and send it to app service it is observer's responsibility to deploy this package across multiple nodes and expose this to users in this really simple service if you compare this diagram to our previous diagrams you see there's much less work there's no need to create any images and store them anywhere you simply send your code to app service and you're done so app service is azure offering for hosting enterprise grade web applications and it is another platform as a service offering and it supports multiple programming languages and also containers which is pretty great because you can use any common language on the market that is used to develop web applications and most likely app service already supports that language so if you have skills already available in your teams you can quickly leverage up service to host applications creation of web application using app service is fairly simple just go back to the azure portal go to the left hand side menu select create a resource and select a web app when you select a web app this will open a template for creating new app service as always select the resource group or create a new one mine will be called az900 app service click ok and give your web application a name mine will be called am demo up service this name is free publish i will select runtime stock as you see there are quite many languages supported for now i will use dotnet core 3.1 i will choose azure region for me this will be a west europe and plan which is the size of the virtual machine running underneath so i can give it a name and change the size i will choose the free tier because this is just a demo so hit apply preview and create and if everything on the receipt looks as it should then simply hit create once the resource has been provisioned select go to the resource to open the control pane for app service you can now use the url to open your web application by default it will be just empty template with empty static html page from microsoft if you want to deploy to this web application it really doesn't take much effort your developers simply need to open a tool like visual studio code type a simple command like dotnet new mvc to create a new application template once the template is initialized developers can use visual studio extension for azure to open it select their own subscription select the app service that they want to deploy right click select deploy to web app and just point to the location of their code the extension will take care of everything else like packaging that code and sending this to app service and once the notification pops up you can refresh the page to see.net application deployed to azure directly from developer machine in just couple of seconds so let's go back to presentation when comparing app services to other services you have less control over the hardware running underneath and over the platform itself but you get a lot of cool stuff like auto scaling feature and you can scale up to 20 or 100 nodes depending on the pricing tier which gives you pretty good scalability options for a simple web application service it has a lot of enterprise great features so the maintenance is also pretty low and the last service on our list today is azure functions also called function apps this service is similar to app service but the difference is in app services we were creating a full-fledged web services or web applications but if we want to run a small pieces of code let's say we have a function that adds two numbers a and b and returns a result if we want to run the small piece of code as a small web service we again ask developers to prepare a small package and deploy this to function up function up similarly to app service will deploy this across multiple nodes and expose this as a web service if you paid attention this might look to you very similar to how i presented up services moment ago and this is true because azure functions are based on azure app service so they have a lot of same features and a lot of new features that allow you to host your application pieces of code very effectively so function apps are still platform as a service although they are very often called serverless because they are completely obstructing the way that you manage servers underneath so if there is no traffic that means there are no servers and no charges with azure functions you have two hosting two pricing models a consumption based plan where you pay exactly for what you use like 20 cents for one million executions or you can have dedicated plan using app services so it's really up to you to choose what is best option for you this service is really designed for building micro or nano services state-led functions using a very small pieces of code therefore they are very simple in nature you should not be using azure functions to build fully fledged big services although they can very nicely complement them if needed because this service is serverless in nature therefore it offers the lowest degree of control over the running infrastructure but also requires the least maintenance from the development teams and with its amazing auto scaling features from zero to 200 servers it is one of the more scalable services in azure and with its amazing consumption-based pricing model it is one of the core services for building very cheap and very scalable web applications with that said let's summarize because this summary will help you to understand what do you need to take out from this episode i know i deep dive into some services a bit more than required but i have two purposes for creating this course one is to prepare you for the exam and the certification but second is to prepare you to work with other therefore i don't mind deep diving into some specific topics if i feel it will help you with your work so just remember that virtual machines infrastructure as a service are used to build solutions for custom software with custom requirements very specialized scenarios where you need high degree of control and additionally if you need auto scaling features then use scale sets if you still want to run highly customizable environments but you don't want to maintain so much you can try containers for a small and quick solutions using containers try container instances but if you need to scale out you have auto scaling scenarios and you need high degree of control over the containers environment you should go with kubernetes service and if you want to host web applications in azure and you want to do it very fast try up services an enterprise web hosting service in azure that is very easy to start very easy to work with and supports a lot of programming languages and lastly if you have very very small services very small pieces of code that you want to run as web services try azure functions this is so-called function as a service serverless and it's designed to build nanoservices and has excellent consumption-based pricing and again very easy to start with because it supports the same programming languages as app services this choice is always not so straightforward for that reason microsoft prepared a compute decision flow that helps architects to decide which azure compute services they should use for their application whether this is migration of existing application to the cloud or building something entirely new a link to this will be attached with my episode material for this episode so just go to episode 9 check out the study guides expand your knowledge with extra materials and links to my other videos on those compute services if you want to expand your knowledge even further then check out the cheat sheets and practice tests and that's it when it comes to azure compute services if you like this episode hit thumbs up leave a comment and subscribe to my channel to support my work if you want to follow to the next episode simply hit icon on the side or follow the playlist and see you in the next episode see you guys
Info
Channel: Adam Marczak - Azure for Everyone
Views: 133,117
Rating: undefined out of 5
Keywords: AZ-900, Microsoft Azure, Microsoft Azure Fundamentals, Azure Fundamentals, Full Course, Certification, Exam, az 900, aci, aks, kubernetes, container, instances, functions, app service, scale set, vm, virtual machines
Id: inaXkN2UrFE
Channel Id: undefined
Length: 25min 41sec (1541 seconds)
Published: Fri Aug 14 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.