Lab 10: App services and Cloud services

Azure Step by Step Training Lab 10: App services and Cloud services
36 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€64.93
List Price:  €92.76
You save:  €27.83
£53.99
List Price:  £77.13
You save:  £23.14
CA$97.22
List Price:  CA$138.90
You save:  CA$41.67
A$105.43
List Price:  A$150.62
You save:  A$45.19
S$92.47
List Price:  S$132.11
You save:  S$39.63
HK$544.12
List Price:  HK$777.35
You save:  HK$233.22
CHF 60.91
List Price:  CHF 87.02
You save:  CHF 26.11
NOK kr763.93
List Price:  NOK kr1,091.38
You save:  NOK kr327.44
DKK kr484.20
List Price:  DKK kr691.75
You save:  DKK kr207.54
NZ$116.54
List Price:  NZ$166.49
You save:  NZ$49.95
د.إ257.07
List Price:  د.إ367.25
You save:  د.إ110.18
৳8,342.01
List Price:  ৳11,917.67
You save:  ৳3,575.65
₹5,905.60
List Price:  ₹8,436.93
You save:  ₹2,531.33
RM306.80
List Price:  RM438.30
You save:  RM131.50
₦117,690.28
List Price:  ₦168,136.18
You save:  ₦50,445.90
₨19,401.12
List Price:  ₨27,717.08
You save:  ₨8,315.95
฿2,383.57
List Price:  ฿3,405.25
You save:  ฿1,021.68
₺2,404.89
List Price:  ₺3,435.70
You save:  ₺1,030.81
B$398.48
List Price:  B$569.28
You save:  B$170.80
R1,224.40
List Price:  R1,749.21
You save:  R524.81
Лв126.98
List Price:  Лв181.41
You save:  Лв54.43
₩97,065.96
List Price:  ₩138,671.61
You save:  ₩41,605.64
₪260.93
List Price:  ₪372.77
You save:  ₪111.84
₱4,079.82
List Price:  ₱5,828.56
You save:  ₱1,748.74
¥10,651.14
List Price:  ¥15,216.57
You save:  ¥4,565.43
MX$1,389.48
List Price:  MX$1,985.06
You save:  MX$595.57
QR254.42
List Price:  QR363.48
You save:  QR109.05
P932.03
List Price:  P1,331.53
You save:  P399.50
KSh9,028.71
List Price:  KSh12,898.71
You save:  KSh3,870
E£3,450.40
List Price:  E£4,929.36
You save:  E£1,478.95
ብር8,593.22
List Price:  ብር12,276.56
You save:  ብር3,683.33
Kz63,785.40
List Price:  Kz91,125.91
You save:  Kz27,340.50
CLP$67,067.21
List Price:  CLP$95,814.41
You save:  CLP$28,747.20
CN¥501.07
List Price:  CN¥715.84
You save:  CN¥214.77
RD$4,196.59
List Price:  RD$5,995.39
You save:  RD$1,798.79
DA9,345.90
List Price:  DA13,351.85
You save:  DA4,005.95
FJ$158.38
List Price:  FJ$226.27
You save:  FJ$67.89
Q539.99
List Price:  Q771.44
You save:  Q231.45
GY$14,604.65
List Price:  GY$20,864.69
You save:  GY$6,260.03
ISK kr9,655.82
List Price:  ISK kr13,794.62
You save:  ISK kr4,138.80
DH690.36
List Price:  DH986.28
You save:  DH295.91
L1,255.31
List Price:  L1,793.39
You save:  L538.07
ден3,995.33
List Price:  ден5,707.86
You save:  ден1,712.53
MOP$560.14
List Price:  MOP$800.23
You save:  MOP$240.09
N$1,220.30
List Price:  N$1,743.36
You save:  N$523.06
C$2,568.69
List Price:  C$3,669.72
You save:  C$1,101.02
रु9,424.24
List Price:  रु13,463.77
You save:  रु4,039.53
S/263.85
List Price:  S/376.95
You save:  S/113.09
K280.16
List Price:  K400.24
You save:  K120.08
SAR262.89
List Price:  SAR375.57
You save:  SAR112.68
ZK1,891.77
List Price:  ZK2,702.65
You save:  ZK810.87
L323.06
List Price:  L461.54
You save:  L138.47
Kč1,638.32
List Price:  Kč2,340.56
You save:  Kč702.23
Ft26,373.60
List Price:  Ft37,678.19
You save:  Ft11,304.58
SEK kr750.79
List Price:  SEK kr1,072.60
You save:  SEK kr321.81
ARS$69,550.94
List Price:  ARS$99,362.75
You save:  ARS$29,811.80
Bs484.09
List Price:  Bs691.59
You save:  Bs207.49
COP$308,434.77
List Price:  COP$440,639.99
You save:  COP$132,205.21
₡35,749.40
List Price:  ₡51,072.77
You save:  ₡15,323.36
L1,761.10
List Price:  L2,515.97
You save:  L754.86
₲541,831.22
List Price:  ₲774,077.78
You save:  ₲232,246.56
$U2,924.58
List Price:  $U4,178.15
You save:  $U1,253.57
zł280.93
List Price:  zł401.35
You save:  zł120.41
Already have an account? Log In

Transcript

Okay, so let us start with lap 10. Lap 10 is all about publishing websites. It's all about discussing different deployment models, that is cloud services and app services. So in this video, we will focus on cloud services, we'll focus on App services, we will talk about the differences between them. We will also talk about different kinds of application which we can host like web role worker role web jobs. We will talk about the configuration files like CS def, and CSF G, you know how they help you to configure a virtual machine.

We will also give you an architecture overview so that you can differentiate cloud and app services architecture. And also we will talk about that how the resource management in cloud and app services looks different, right? So this video is all about cloud services versus app services. And it's a very important video from a developer perspective. Because the time the developer says I want to go and publish my website on your, these two are different deployment models and depending on what you choose, right, a lot of thing changes into that. Molly.

So this is going to be approximately a 30 minutes of video. Right? So 30 minutes, 35 minutes of video. And we will be discussing exclusively on cloud services and app services. So let's get started. Now before we start with cloud services versus app services and so on, let us first try to understand, you know, what kind of applications to developer create.

So from the 50,000 feet level, let us try to categorize that what are the natures of applications that developers create? If you think properly, if you analyze properly, developers create two primary kind of applications, one application which has a front end a UI and the other kind of applications which do not have any kind of front end like a non UI. So UI application means mobile applications, web applications, you know, wherein we have an HTML page, or we have some kind of an UI, where the end user can go and put some inputs and non UI application means you know, background process or some kind of a job, you know, which does something at the background, some kind of PowerShell script or some kind of a shell script, which runs at the background. So there are two primary kind of application one is a UI based application.

And the other one is a non UI based application like a background process. And as your gives you facility to host both these kinds of applications, so you can host a UI application like a web app or a mobile application, or you can host on background application like a Windows process or some kind of a script. So what we'll do is let us first go ahead and try to host a simple web application that means which has an UI right. So what I will do is I will go and I will select a simple web application and I can select an MVC application right. So MVC application means it has a front end, which is made in HTML or razor and I want to host this in as your right. So let us first understand that for UI based application What does as your provide?

So let's give a name to this application as, you know, my MVC application, right? So it's a simple MVC application which I want to go and host on as your. So I'm gonna go and say yes, this MVC application is in Web API, no authentication and so on. So let us try to host this application on as your now this MVC application, what we have created is a very normal application. It is meant to run locally. But if you want to run it on the as your cloud, then we need to ensure that it has all the necessary references of the cloud DLL, right?

So for that, what we need to do is we need to go and convert this application into Microsoft as your cloud service project. So you can see here in the Solution Explorer, you need to go and right click here and say convert to Microsoft as your cloud service project. So let me do that. Once you do that, what happens As it goes ahead and adds the necessary references of the cloud DLLs. So, now, if you go and see the references, you can see that he has added some as your based DLL. So, you can see this Key Vault here, you can see system.system.as your configuration Windows as your you can see diagnostic.

So, you can see that basically he has added some necessary details you know, so that this application can be hosted on as your cloud right. So, this application is done you can also see that he has created some config files here you can see down below, there are some config files He has created. So let us go ahead and host this application so I'm going to go and publish this to as your so let us go and click on Publish as your you need to be signed in into your account. You can see that I am logged in at this moment. In this question interview questions@gmail.com that is my subscription I will select that I will say next So, I will see that this is a locally redundant LRS. So, let me go and select it as LRS for now, I will say I want to host in South Central somewhere, right?

And let me give some name here, this is Shiv cloud service right. So, this is a shift cloud service which I want to host here, I will say create So, you can see I'm just going and filling the drop downs. Now, every web application every cloud service application, what you host right needs a storage account. This storage account is nothing but you know, in which you can go and create your blobs you can create your tables remember we covered in the first lessons. So, why is the storage account needed because in case we are doing some logging activity in case we are writing some information, then it gets all logged in into this right. So I'll say yes, I need that.

I have also given some name here to the storage of Count write MVC application.as your I will say next and let us go into unpublish. So, what we have done is we have taken an existing MVC application we have converted into Cloud Service and we are trying to host it on as your. So, I will say that I don't want to do any kind of diagnostic at this moment, I just want to go ahead and host it. So, now there it is, I will save this profile and I will try to publish it. So, what I've done is I have taken the existing MVC application and and I have converted it into a cloud service again insist on that word, I have converted it into a cloud service right, I have converted it into a cloud service right. So, there it is, let us give it some time so that, you know this application gets posted on as your it gets hosted on AWS, your so you can see the application has got published and you can see the URL.

So if I click on this URL, it will open up this site out here. As you can see, my application has got published on this shift cloud service dot cloud app dotnet. And over here, I can see my MVC application running. It is showing me the homepage, right? If I go to my portal, and if I do a refresh, I can see that he has created some resources here, you can see that he has created shift cloud service, which is a default storage, you can see that he has created a shift cloud service, which is a cloud service application, right? And you can see that he has also created this application insight, which is for debugging and performance purpose, right?

If you remember, when I published You know, it said that do you want to also do application insight. So that's why he created this. As such, we don't need this if you want, you can go and delete this for now. Let me delete this. For now, right. So we can think about that there are two resources which is created.

One is this default storage, and the other one is cloud service. Again, I insist on that one. He has created a cloud service, right? And the application is running happily out here. The shift cloud service dot cloud app dotnet. Now there is one more way of publishing the application.

And that way is just by using publish. So if I just go and say publish, right? Let me do this. So the same MVC application, I'm going to go and again, publish, but this time, I'm going to go and publish it as an app service, the one which I just published, it was published as a cloud service, right? So let us let me do that. So I'm going to go and hit publisher.

Okay. So that is let us publish this. So I'll say yes, I want to go and publish my app on the as your right publisher app, does your Yes, say publish. You can see now that he's saying, Do you want to publish it as an app service? So I'm saying yes, I want to pass She does an app service. He is creating some default storage out here he is having an hosting plan.

You know how my application is going to host right, I'm going to just go ahead and say created. And please start hosting it. So you can see I've set created and i'm i've started hosting it. Previously, I right clicked and I published as cloud service. And this time, I'm just saying publish, and I'm saying publish as an app service. So the same application, and we'll find out the differences you can see at this moment, it is saying deploying step one, so let's give it some time, and let it deploy.

So there you can see that he has deployed the DLL successfully, my HTML successfully and he has given me the URL. And if I go and browse to that URL, if I go and browse to that URL, I should see the same MVC application what we had previously right. So and if I go and refresh on my as your site, I would see now more resources getting created. So we can see here, there are two resources at this moment. One resource is the app service, which hosted the MVC application. And the other one is the cloud service, which actually hosted the cloud service.

Right? So we have two resources, right, though, because we did two deployments, right? So one deployment happened by using the app service, and the other deployment happened by using the cloud service. So another question which comes is that so we can do MVC deployment by using either App Service way or either cloud service way? What is the difference between both of them? Now, this storage account, which is related to the cloud service is used only for tracing and logging purpose.

So in case you are using trace dot write, and those kinds of syntaxes in your MVC application, then all those gets logged into tables out here. So what I can do is for now, this is not really needed to run your application. So I'm going to go and delete this. I just want to I want I want to emphasize on the fact that what is the difference between a Cloud Service and app service. So I'm trying to remove the noise. So I'm going to go and delete even the storage account.

So if you really see what we need to host an app service and a cloud services, in App Service, we need two resources. And in Cloud Service, we just need one resource, right? So you can see that this is my cloud service. And in this, I can go and see my application here. So this is the MVC application, right, which is running. And the one which is hosted by using App Service, I can go and see by using this so.

So one, which is my app service, I can go and see from this URL, so that is the URL. So you can see this is my app service URL. And this is my cloud service URL. But now the question comes is what is the difference, right? So what I've done is I've just deleted the cloud service storage account, which is used for for instrumentation for error messages for for logging and tracing information I've just deleted Did it so then we can just focus on what is the difference between an app service and a cloud service. So, let us try to analyze what exactly we have done here.

So we have this MVC application and this MVC application, we want to go and run on a car. Now in order to run this MVC application, we will need a lot of things, you know, we will need a Internet Information Server, we will need a virtual machine we will need Windows Server and so on. Right We will probably also need SQL Server. So basically, in order to run this MVC application, we need a virtual machine. So when we hosted this MVC application as a cloud service, so you can see in this cloud service here, you will find that there is a virtual machine. So for example, if you see this cloud service, this is the shift cloud service.

Remember, this is the Cloud Service and the top one, both of them are app services. Okay. So over here, when I click on the shift cloud service, you can see that in order to run this cloud service, there is this roles and instances and if I click on this, you can see that this is the virtual machine and it says the virtual machine sizes small it is up and running. So basically our MVC application at this moment is running inside this virtual machine. But now, the question comes is that how was this virtual machine configured? when we when we especially talk about cloud service in a When did I configure this virtual machine?

So basically, if you look at your MVC application, in the cloud service, it also has some configuration files. So, you can see this CSC fg configuration file. So, if you click on this CSC f g configuration file inside this you know, you can see that there is something called as roles. And over here, you know, we have specified that we need one instance here, right? So we need basically one instance Inside this we need to go and run this MVC application right. And if you see there is one more failure CS def in the CS def, we have also specified that this virtual machine is of small size, right.

So because of these configuration files, it has automatically gone ahead and created this instance for us. So in other words in the cloud service, we have source code, plus we have configurations to define how the virtual machine should be created. I will again repeat this statement. In cloud service. We have the source code that is our MVC application source code. And we also have the configuration file, the configuration file, which defines so we have these configuration files, which defines you know, What is the size of a virtual machine, you know, how many instance we want and so on.

Also, one very important point I want to stress here is, we have one only one entry of resource of the shift cloud service. So for the cloud service, we just have one entry here. And in this one resource, we have the code or I will say the website. So you can see in this one resource, we have the website, this shift, Cloud Service dot cloud app dotnet. And also, we have the virtual machine. So we have one resource group here, which represents the code or other the website, as well as the virtual machines.

So this is a very, very important point, which I want to stress here. And the other important point, which I want to stress out here is that these virtual machines are accessible. We can go and get exclusive access to these virtual machines. Or I can say we can go and do RDP into it, or we can do a remote desktop into it. So I can go to this virtual machines. And I can actually go and connect over here, I can reboot, you can see these virtual machines, which you see out here and I can connect.

In order to connect to this virtual machine, we have to first go and enable the remote desktop. So this the remote desktop says that yes, you want people to go and connect to the virtual machines access it, you know, go to the is install something. So let me go and give some access here. So I'm going to go and put a password here. Put a password. So, so for the RDP, he says that please create a password.

Let's create let's use one of the ready made encryption certificates, you know what they have given and Let us save this. So now with this, what will happen is that we can go and do a remote desktop or RDP into this machine. Machine out here. So we can see it is still installing let us give it some time so that the remote desktop is enabled into into these instances. So now that the RDP has been enabled, so now we can go and connect to the virtual machine. So you can see that I have have clicked on that instance.

And I said Connect. Once I say Connect, it actually downloads an RDP file to my desktop. And then I can go and run this RDP file, I need to put the same password you know, which I, which I've used, you know, when I created the ship account when I was creating the RDP user, so I'm going to go and say yes, and let's get connected. So once I do this, it actually starts my Microsoft Terminal Services. And Microsoft Terminal Services is a tool, you know, which actually helps you to connect to servers, you know, so you can see here, actually, I'm connecting to my server. And you can see that I'm able to access my server here, right.

So this is this instance. And this is instance, is running this cloud service. So it's an exclusive instance. It's an exclusive instance, which is created via the config file which we have provided and this instance we can access it, we can go and do installations on these this instance, we can go and put software's and so on. So, there is an exclusive virtual machine in a which is given when you actually create an cloud service. So summarizing, whatever we have seen about Cloud Service, we can summarize it into three important points.

First one, we have code, the source code of the web application plus we have config files, and these config files define how the virtual machine will be created. Right. So the config files have the necessary properties and the values which says that how the virtual machine will be created, how many instance has to be created? Is it a small virtual machine is it a large virtual virtual machine and so on? The second important point is that these virtual machines you know, which are created from these config files are exclusive OR exclusive for a cloud service, so, it you know, if you see the virtual machine, which we just saw, it was very exclusive and attached to the cloud service write to this source code to this web application. And the third important point, you know, which is noticeable here is that the VM, the virtual machine, and the source code are into one resource group.

So, the VM and source code, they belong to one resource group, right. So there are three important points you know, which can which we can take, which we can take from this cloud service. First is the code, the resource code and also the source code has config files and these config files define how the virtual machine will be created. Second thing is virtual machines are exclusive for that web role. Right? And the third one is that the virtual machine and the source code, they are all clubbed into one resource group.

Now let's try to analyze that. How does app services look like? So we are looked into Cloud Service. Now let us look at app service. So in App Service, we will find that there are two resource entries. So you can see that there is something called as an app service.

And there is something called as an app service plan. So if I go to this app service here, this app service is the resource which indicates that this is your code. This is your website. And this app service plan is nothing but it is a plan which says that what kind of virtual machine it is, you know, what is the size of it, how many instances and so on so this service plan says that how your virtual machines will be created. So here you can see that there are two different resource resources, one for the source code And the other one, which defines that how your virtual machine will be created. So if I click on this app service here, you can see that I should be seeing the URLs I should be seeing the web application.

So if you see here, this is the my MVC web application, and all that, right. And if I go to the App Service Plan here, this app service plan says that Okay, so, if I go to the properties, it says that Okay, so, this is located in central us, it is a small VM, you know, this is the instance and so on. So, you can see here you know, the, there are two resource groups one which defines that how your virtual machine will be configured and one which defines that how your code and web application will be configured. And one more very important point to note in this UI is in this VM, I cannot go and connect exclusively in other words, I do not see a Connect button I cannot access this VM. This VM is has been created automatically and it has created Automatically as per this plan, so you can see that I do not have an exclusive control over this VM.

Right. So in other words, you know, here we have two different resources. And second, I do not have an exclusive control. So if I go ahead here in cloud services, so this top one, sorry, this top one was cloud service. So in Cloud Service, we said that these are the three important points. And the the blue one, I'm writing about app services.

So in App Service, the first thing is code is different. And configuration is different, you know, it is not one thing you know, so basically, you're the code is hosted the code has different resource group, right different resource and the configuration The, the virtual machine is configured via a plan. So that is a separate resource group. So virtual machine has different risks. All right. And the third important point to note here is that VM, we do not have exclusive access to exclusive access to the VM.

So, you can see, I have noted down three important points of App Service, which is very different than cloud service code is different configuration is different. So the the code has a different resource. And the VM has a different resource, you know, and they are configured via that different resource that is a service plan. And we do not have exclusive access to the virtual machine. Also, I would like to highlight one more important vocabulary as we move ahead, because probably, we will use that vocabulary now. And then this cloud service is also termed as classic way of doing deployment.

So if you see a lot of developers who work with as your deployment, they say that one is the app service. We have deploying things. And the other one is a cloud service, or a classic way of deployment. So if anybody says this is a classic way of deployment, he also means that it is cloud service. So now what we'll do is let us go back and let us go back to our PowerPoint presentations and diagrams. And let us understand that what is the difference between both of them?

So, we have understood the, the basic way both of these things work, you know, but let us try to understand what is good and which we should be using when we start our deployment. Now, as we said in the first video of Azhar that a cloud service is divided into three important layers, SPS and CLS in case you have not, if you have not understood these layers, I would say that please revisit the first video. But here I want to emphasize some very important point. Every layer, what is there in this cloud is targeted for a specific kind of user, for example, this ies layer is you know, where network people infrastructure people, hardware people, people who are admins are more interested The P S is the layer where developers script who writes script to access API's are more interested and the CS layer is for the end users the power users you know, who want to go and use applications.

So, every layer is meant for certain nature of user and the users who work in one layer does not want to get involved into other layer does not want to take unnecessary the work of other layer for which he does not have knowledge of right. So, here the most important part of a good cloud service is that he says that if you change in this one layer, the other layer will not get affected and it is encapsulated from you. So now, with this understanding, let us now go to this both deployment models, the cloud service and app service. And let us see that which one of them respects this thing called as that everybody should only see his work he should do one Li his work right, and not get unnecessarily involved with the other layer. So let's See that from both of these deployment model who respects that?

That rule. So we have this application source code. And we can deploy by using the classic model. And we can deploy by using the cloud or the app service model. So we can deploy by using the app service model. And we can deploy by using the cloud service model or the classic model.

So now what happens you have the application source code. And let us say you want to deploy by the classic model, then in classic model, you have source code plus configuration files, and the code and configuration files they get deployed into the past layer into the platform layer. And this configuration file is used to create the virtual machine so in this config file, if you remember those CS df and you know those configuration files is where we have defined you know, what is the size of our virtual machine in how many instances we want and so on. Right? So think about it. You are an MVC developer, but you are getting involved with virtual machines.

You are getting involved with the infrastructure. layers. And the most important thing is if you remember, there was only one resource group, which actually binded all these things together. So there was only one resource group. So in other words, if tomorrow I want to take this virtual machine and if I want to use with some other application, it is not possible, because this virtual machine is exclusive for that source code, and for or for that application. So in other words, in this classic model, everything was tightly coupled, the virtual machine, the EOS layer, the PS layer, your source code, right.

So as a developer, I was responsible for both of the things I will responsible for the platform source code, as well as I was responsible for the virtual machine settings or the virtual machine configuration. Right. You can see in this diagram, I have grayed out this area, and this area says that, what is the responsibility of the developer in both the deployment models. So in the classic deployment model, the developer was responsible for doing both the things he was responsible for doing peers as well as he was responsible for doing the ies work. And the second important point is, in the classic model, there was only one resource group, you remember, there was only one resource group, this shift cloud service, if you remember. And in this one resource group, it had everything, it had the source code, it had the virtual machine, and this virtual machine, I cannot reuse with some other resources because it was tightly coupled, it was exclusively bound to that web role.

Right? Now it does go to the new model, that is the as your resource group model, or I will say, the app service model in the app service model, if you see I just deployed the code, I don't need the configuration to create the VMs, the virtual machine got created because of this app service plan. And this app service plan, I can create it separately. Right? So the app service plan and the source code. Both are different.

And if you remember, we had two user groups here. So as a developer Don't have to worry about that which is a virtual machine at the background, how does it look like I don't have to do RDP, everything is encapsulated from from the as your end. So that's why this, this model of deployment, that is the app service model of deployment, which is the new way of deployment is better than the classic model. Now classic model is good for those people, you know, who have been deployed by using the classic way, so they would probably want to continue that way for some time. But if you're deploying new new applications, then I would suggest, please use the app service model because in app service model, there is a there is a fully isolation between the past layer and the iOS layer. So here is a nice comparison architecture diagram, you know which can which will tell us you know, that what is the difference between both of these models.

I know that I'm repeating this, this thing again and again, but believe me that it is the most important thing because as soon as you go to Visual Studio and you say you want to publish on as your These two are the deployment models and people get confused about it, right. So we have the classic model, or we can see the cloud service model, where everything is tightly coupled. So you have the S layer and the PS layer, and you as a developer is responsible for it. So when you create a web application, which is a web role, which runs as a website, or it can be in a worker role, which runs as a background process, so you also have to provide the config file. And in this config file we provide, you know, what is the size of the VM, we provide the NIC, we provide the IP address, we provide the V net.

So this whole infrastructure layer, you as a developer has to provide via the contract file. So the developer in the classic model or in the cloud service model is responsible for everything, right. And in this case, the VM is exclusive for this web role or worker role. Why in the other thing that is the Azure Resource Manager deployment or we can say the App Service Deployment I just take my website app and I just go ahead and deploy it. I don't have to worry about, you know, what is the virtual machine at the background? Who is going to create it, right?

That is defined by a different thing called as the app service plan. So this app service plan is responsible for creating the VM. And the app service plan can be created by any infrastructure person, the developer does not have to create it as such, right. So the developers source code does not is not mixed with infrastructure configuration, right? In this case, the developer source code is mixed with infrastructure configuration, and that violates the single responsibility principle that means my one to one thing should do one thing at a time. If this is a MVC application, it should have controllers, it should have C sharp code, it should have database connectivity.

What is the infrastructure configuration doing in my source code, right? So that's why you know this model is mixed up this model is decoupled. So use the CRM model, use the app store This model, in case you have an old project, and you want to just continue for some time, use the classic model. Also, I would like to point one more thing here, which is very important from the cost perspective. This statement, which I'm making is very important. In this case, I get an exclusive VM, I get an exclusive VM in the classic model, I can go and I can do an RDP into it, I can go and I can install things into it.

In this case, I don't get an exclusive VM, these VMs are shared VMs. So there are standard shared VMs with IAS and everything, and it just takes that VM from the pool and gives it to you. So you do not have access to those VMs. You cannot do any kind of customized configuration on this VM. So this is more cheaper as compared to this one. Because here, we have a full blown VM for a simple MVC application.

So sometimes you want to just create a website, you don't want to have virtual machines, you don't want to have that big ceremony, then definitely this becomes costly. So that's at that time, another webinar. becomes more a bit better way of deploying things. If you see in this demo, what I did is, when I started this demo, I created an MVC application. And then that MVC application or the web application, I converted into a cloud service. Or I'll say I hosted that as a web app, right?

But you can go the other way around around also, what you can do is you can create a new project, and you can say that, okay, I want to host this on cloud. So you can click on cloud. And then you can go and say that, okay, I want to create an Azure Cloud Service, right? So in this case, what will happen is if you create an Azure Cloud Service, remember, Cloud Service, classic model, tightly coupled model, right? So you can see this is a cloud service model. So if you want to create a web UI, or user interface or MVC application, you can select this.

If you want to create a background processing or worker role, you can also select this. So if you do okay over here, what he will do is he will start with the same MVC application template, right? But he will create those CS def And the configuration file, the CSC fg file and the CS def file, you can see those are created right from the start. So, in the previous demo, you know, what happened is I created the MVC application. And then later on when I right clicked and said that please convert this to a cloud service, then these configurations were created. But now in this case, what I'm doing is I'm starting it as studying and saying that, okay, I want to create as a cloud service.

So you can see here, he's creating the project. But the configuration files are also created at the start itself. And if you want to go and publish an application as an app service, then you can go and select this web application, and you can right click and say publish, you don't have to do anything special. Now, remember that all these things like as your functions, web application, web job, web job, again, is a background task, right? All of this comes into app services. So this is app service model, you know where we deployed things differently.

You can create a simple as your function which has 1015 lines of code, and you can host it on cloud, you can have a full blown MVC application. And then also you can host it on cloud, you can have a background task, you know, which is a web job, and you can host it on house on cloud. So inside the app service, you have these three categories of code, which you can have, while in Cloud Service, you have the worker role, and the web role. So these are all way of doing things. So in Cloud Service, if you want to create a website, it is a web role. And if you want to create a background task, it is a worker role.

Now in this video, I have targeted only on the differences. So I just created an UI based application and I showed you the difference. I did not talk about the background processing codes like worker role and web job. So in the next video, my focus will be on background tasks like worker role and web role. So I hope that you enjoyed this video in In this video we were trying to understand what is the difference between cloud services and app services hosting model

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.