Hello everyone and welcome to lab one of learn as your step by step video tutorial. And in this first lab which is approximately of 45 minutes, what I will be doing is I will be going and I'll be hosting a website on as your portal. So what I will do in this 45 minutes I will be doing the following First I will start with fundamentals, I will first talk about what is csps and ies because without this you won't be able to understand what is cloud and what is as your and once these terminologies are cleared you know I will talk about as your and cloud. Once that is done, I will help you in understanding how to go and register on the as your portal and how to get your free credit limits. And once that is done, we will go and we'll create a simple website or a simple HTML page.
And we will deploy it on the as your portal. Now while I'm doing this demo, I will be also going to law of small small things I will talk about resource. I will talk about resource groups. I will talk about app editor. I will talk about service plans I will be doing an FTP and so many things. So it's a promise if you go through this 45 minutes, you'd be at least in a position to go and host your first website on the as your portal.
So let us start. Now before we start with as your before we go into a car we need to understand something called as cloud. And in order to understand cloud we need to understand three terminologies. See as p as an S, you can see that I did not spell it as SAS pass, and I did not spell that because when you spell this word ay ay ay ay ay ay ay s, right, it looks very embarrassing right. So you can use my trick you can say see as PS and yes right. So let us first try to understand these these three terminologies.
So we'll start from right to left will first understand these three terminologies then we will define cloud and then we will define as your now when you when you go to whole host of websites. So when you actually go to some hosting provider and you say you want to host a website, the hosting provider has to give you a lot of services, he has to give you hard disk, he has to give you bandwidth, he has to allocate your RAM he has to allocate your CPU, he has to allocate virtual machines give you software's and so many things, right. If you see these services, we can divide into three categories. So these all services we can divide into three categories. One is the infrastructure service. Another one is a platform service.
And the last one is a software service. So let's quickly run through each one of these layers. So the infrastructure layer is the metal part of your hosting. So metal part means it has RAM, hard disk, virtual machines, the CPU, your routers, your networking, everything is in this layer. On the top of it, we have the platform layer you know which has operating systems probably you need databases like SQL server or Rachael, you need frameworks like Java dotnet or like Angular right? You need a web servers like is Tomcat Apache.
So, this this, this is basically your platform you know, which makes this metal alive. Remember, any hardware which we which we buy right you know only becomes alive or only becomes useful when you have the necessary software like operating system and so on. So, that is a platform part. And then the third layer is the software's layer wherein we need we have application software, for example, probably you have a main software for your website, you have invoicing must be or you have accounting software's, or you have a control panel right. So, all that thing actually comes in the software layer. So, in short, you know when any hosting provider wants to give you service for hosting a website, it is classified into three layers.
One is the infrastructure layer, the platform layer and the software layers. Now, if you supposed to do all of these things by yourself? It is quite hard work, right? So, you know, like, for example, if you want to host a website and you say that I will do all of these things by myself, then you need to hunter data center, you need to buy the operating system license upfront. You need to get the hardware, the CPU, the ram the whole box, right you need. We need technicians, you need to network guys, you need database guys, you need hardware engineers and so on.
Right? So basically, you pay upfront all the costs, right? And you're not aware still that your site will be giving you how much ROI right or how much money. So you would like to engage with the web hosting provider in such a way that you you, you'd want it to be elastic, you'd want it to be flexible. You want to pay for only what you use, right? In other words, you want it to be on demand.
So in cloud, what happens is it follows the two principles of So, there are two principles you know over and over. So all the first row stands for on demand on demand means I will say that okay, I just need one GB RAM 200 GB Hard Disk for 10 days. Right. So first is the the first principle of of cloud is that it is on demand it is flexible, it is elastic in nature. So, I can start with like, let's say, you know, a simple machine like four GB RAM and 200 GB Hard disk and tomorrow if I if I grow I will say okay, now I want an eight GB RAM machine. So I can I can scale up and I can scale down right, and I will pay only for what I use.
The second thing is everything is outsourced to second O stands for outsourcing means I don't worry about who takes the backup, who installs the software? Where do you procure it from? Right so that the the resources part also declined over here because not everything is outsourced to your hosting provider. So, cloud has the two big goals. The first one is everything is on demand it is elastic. And the second one is everything is outsourced.
So that you just concentrate on your website you just concentrate on your business. In other words, you know, we want things to be as a service. Again, I repeat the sentence, we want to deal with the hosting provider in terms of services rather than buying things upfront. For example, when you go to a hotel right to eat, you do not worry about the cook you do not worry about, you know, what is happening at the back you know, from various buying things you say you just place your order, you eat it, and you go, and after that washing the dishes, keeping the place clean, everything is the headache of the restaurant, right. So here also we want to deal in terms of services. So, it is possible that I just want the infrastructure as a service, or must be I want the platform as a service.
And or I want just a software as a service. So basically, we want the hosting provider To provide us a flexibility saying that which layer you want and from that which item you want as a service, and for how much time. So that's what exactly cloud is all about. Cloud is all about on demand, and outsourced. So now coming to zero. So now that we know the definition of cloud, so what is as your as your is nothing but it is Microsoft's cloud.
It is the solution given by Microsoft for cloud. So if you see here, like you can see that I am logged into the Azure portal, I will I will come to the steps of how to go and register to the Azure portal. But here you can see, I can go and I can scale up and I can scale down elastic. That's a very important word. So you can see like when I go and choose any kind of a service, you know, for example, we can see here I can go to any kind of service, I want to add a service. So I'll say I want to go and just host a simple website.
Now when I go to This website, you know, I can go and define that, what kind of plan I want, I can go and say that I just want it to be free. You can see this is the thing, which is free with a one GB storage, right? Or I can just pay some money and say, Okay, I just, I want one GB storage, but I need some domain names as well, right? custom domains, right? Or I can. So let's say I start with three and my website goes great, right?
And tomorrow, if I want to go and upgrade, I don't have to send a mail to the hosting provider saying please upgrade and then negotiate right? What I can do is I can just go and change my plan. So I can just go up, I can scale up and I can choose must be this service, you know where I will say, Okay, I want a four core machine with a 14 gb ram and 250 GB Hard disk, right? So you can see like, this is the most important part of a cloud that you can scale up. You can scale down, you can pay as you use, right? So if I want to host this service, so he will only charge me for the time I've used it.
If I go and shut down That website, I will not be charged for that. So normally when you buy from GoDaddy or from other hosting providers, they take the money upfront from you that they are not elastic in nature. So they say that Okay, here is my standard package with this much hard disk with this operating system with this, this, this this that's it. Right? Now you use the serve website or you do not use the website, you have to pay it upfront, right? While in case of a cloud based solution, like as your or Amazon, you will pay only for what you use.
That's a big difference. So that was the definition of cloud that was the definition of Azure and that was the understanding for ers, PS and CRS. So the first step is we need to get access to the as your account right to your portal. So go ahead to account.zero.com fill in the registration. Now in order to get access to the three services, right so you can see it gives you a 12 months of free service. With 13,300 of us your credit, right.
And it also says that this is a free free account, it does not automatically upgrade to a paid subscription. Now 13,300 rupees approximately comes to $200, approximately, okay, so you need to provide your credit card in order to get access to the as your services. So please do go and provide it and as Microsoft is saying that there is no commitment, they will not be upgrading automatically to paid subscription. So I don't think that the money will be deducted, right. So go ahead, register yourself and get access to the free as your credits so that you can go ahead with this training. Now once you log into the site, or once you register on your site, you get access to a portal like this.
So you can see now I'm actually surfing portal.zero.com. So I get access to the site. And when I log in, you can see in my messages it says that you have some free subscription trial and this is amount right. Now one very important tip, you know, before you start learning as your, as your has a lot of services, you can see at the left hand side, look at those menus, you know, they are huge in numbers, right? these menus also have sub menus inside it. So do not try to learn all of this in one go.
If you try to do that you lose stamina, and you will not end up anywhere, right? So for the coming one or two hours, try to follow me. And once you are inside as your project, you can go and hunt for those higher end services right. Now, as we said previously, that at the end of the day, the whole goal of cloud is that we want to actually go and avail services we want to go and book services and we want to pay as we use, right. So in as your actually what you have to do is you have to actually go and say that which resources you want. So you need to log into Azure portal and say that I want a virtual machine of Windows Server 2012.
I want SQL Server RDBMS I want an IIS server right. So in short, you know, if you see out here, there is something called as resources. That's the first thing you can see there's a dashboard here at the left hand side, this dashboard actually shows you the overall things what is happening in as your I will talk about this later on. Let's go to resources. So you can see at the left hand side, you have a resource. So basically in as your, you will be actually going and adding a resource.
So we'll say that, okay, I want to go and add Windows Server 2016 virtual machine, or I want to go and add the storage device, I want to go and add this web project, right. So in other words, in as your, we actually first create a resource. Now, when you're working with bigger projects, you'd be dealing with lot of resources, you would be dealing with 5060 resources at one time. So you can have a resource called a server, you can have a resource, which is a database, you can have a resource, which is a web server, and so on. And for better management of these resources you'd like to group them for example, you'd like to Create a resource group called as web development and in their web development, you will say okay, this is web development for xx client, and it has the server it has this database.
So you would like to group these resources so that you can do accounting, you can better manage them and so on, right? So we can see over here in the portal, that is something called as resource group. So first thing is in this all resources, you will see all your resources, what is there currently, in your portal, and in the resource groups, you can go and create group and put the resources into this group so that you can do better accounting, you can better manage them. So let us first go and create a resource group here. So I'll say okay, this is a resource group. So I have clicked on add here.
And let us name this resource group as let's say web development, web development for blind one. So there is some client one out there and for that client one, I'm going to go and put a lot of resources So I have grouped them into a group name called as the app development for client one and the subscription. So at this moment I have this free trial, I will use this. Now you can see there is something called as a resource group location, right? So what exactly is this? Now, when you take any resource, for example, when you take a server, then that server is actually running on some data center, which is probably in us probably in UK.
So you can say that okay, this server actually runs on the US data center. So you have the, you know, the flexibility to pick up the geographical location where you want that resource to be allocated. For example, if I am from India, so I would like to take the data center, which is near to India, right. So each one of these resources can have their own geographical data center. Now in the resource group, we have the meta data store the metadata stored for all of these resources. So you would like to store that meta data into some data center, right?
So that's why we have Have this small thing here called as resource group location. So this says that Where do you want to store the metadata of this resource group? Please note this is the metadata not the actual resource, right? So I'll say okay, I want to store it in us at this moment. Please fix the errors Okay, looks like the resource cannot have alphanumeric characters and so on. So let's say web development right, web development client one, okay.
And I will say create. Now, the time I say create, you can see that it tells me that the resource group has been created. So if I go to resource groups, I can see this web development client one. So now that you have created the resource group, now it is time to go and add resources to this resource group, right. So let us say that you want to go and host a website. So what I've done over here As you can see that I have a very, very simple folder here.
And in this I've created one HTML page. And in this HTML page, I have like, this is my first as your website. So let's say I want to go and host this HTML page onto as your right. So for that, I need to go and allocate resources, right? So to this resource group, I will go and do that. Now remember, a website, or mobile application or web application, these are all applications, right?
So for the applications, you can see that there is a menu here called as an app service. So when you want to go and you know in, you know, host a website or host a mobile app or host API service, this is the menu what you will select on, so I'm going to go and click on App services. And over here, I will go and say add here. Now as soon as I say add, it actually gives me a lot of flavors. Application saying that is this a simple web application? Is this web application with SQL Server?
Is this an app service is this using WordPress site core. So we can see lots of flavor out here, you know, you know, which you can use here. So currently, I'll say this is a very simple web application. I'll click on this. And I will see here create. And let us give a name to this app.
Now, whatever name you give to this app, it will become like the app name.as, your website's dotnet. So for example, if I give a name here, our test my app, you can see like, all the names have been taken till now. So I'll say test my app in Mumbai, okay? Or in india.as, your website's dotnet. Right. So there is a look at what is the subscription, the subscription is a free trial, which I'm using for now.
And I will add this resource to this resource group. So you can see now I'll go and add this to this resource group. Remember, we said that resource group helps you to put the, you know, put or take the resources and put them into a specific container so that you can monitor them you can do accounting, right, it actually groups them into a specific logical unit right. Now, depending on what technology you have used must be you want to use the Windows operating system or must be you want to use Linux, right? So, I'm going to go and pick on windows at this moment. After this, he says that, okay, so this app for this app, how much do you want to spend?
How much heavy resources do you want? Do you want one GB RAM? Do you want two GB RAM Do you want dual core multi core. And also, you can see that is decided by this app service plan here. So I'm going to go and click on App Service Plan. At this moment, if you see it is actually if you see by default, this app service is using a standard plan at this moment.
So let me go and create my own plan. So if I say click on this plan, so it says, so I'll say this is my plan 123 Okay. Now it says that Okay, so this plan is, you know is applicable for which geographical location? So, in short in short it says that Where do you want to store the metadata of it? Where do you want to allocate the service right? So, I will say us at this moment, I will leave it after that we have this pricing tier, this pricing tier, depending on what what this pricing tier defines that how much money do you want to spend on this app?
For example, if you say that no, like this is just a test that must be you want to just use a one GB storage, if you say no, like I also need some domains and you can say one GB plus custom domains. You know, if you say that, okay, I want you know, something more stronger must be you can just go at the top and you can say, Okay, I want an isolated virtual machine, you know, allocated to him with the 14 GPU an SSD and all that and you can see that it's a per month cost right it is in INR, but you can convert it to $1 as well right. So, this pricing plan actually just tells you that how much strong resources you want right. So, it starts from a free and goes still isolated. Now, I will not go through each one of these plans out here you can read it you can understand it right.
What we will do is you know, we we are already working we are already using the free thing, right? We have just such a small amount of money right? So let us go and select this free f one free storage zero month zero INR per month, so I'm gonna go and select this so that I don't spend my money unnecessarily. Right and I'll say okay, so I am creating a plan which is actually a free plan and in this free plan, I have said that I want to use this simple one GB of storage, nothing more than that right? And I'll say okay, I'll say created. Now once you click on Create, it will actually create a web application.
It will actually create a simple web application kind of a directory. If you see out here as soon as I said create, you can see that it is actually doing a deployment you can see this, it's saying deployment to the to the resource groups, it's actually creating a resource and allocating it to the resource group right. And once this deployment is successful, it will actually give a message here that it is successful, right? So you can see deployment in progress and after some time, I hope to see deployment completed. So you can see here you can see all the status here this is dismissed. This is informational.
This is completed. This is all right. So okay, what happened? Right What happened to my messages like so It's just gone. Right? Okay, but but I hope Okay, so there it is.
It says that deployment succeeded. And it has been deployed to this resource. And the group is web development client one, right? So if we go to App services, now, you can see that we have this test map in India, right? And inside this test map, we can now go ahead and deploy our project, right? So I can click on this test map in India.
So if you go to this test map in India, you can see lot of things out here, right? As I've said previously, go slow, do not try to learn all the menus in one go, right. So over here, if you see the the most important thing is that you would like to know what are the settings for this means in other words, which framework it is using, does it have Java installed or not? So for that, you can click on this application settings out here so it says that it you know, it's a it's an iOS As applicants is web server, and it has dotnet, 4.4 point seven, it has PHP and all that, right? So I am not interested in PHP at this moment, I can just offer it, you know, so that Python also I have offered it, so you can see it's integrated, kind of a pipeline and all that.
So you can this is all the settings have is you know, which you have been seeing from the IRS menu at this moment. So I'm going to go and save this. And I have disabled the PHP version out here because I'm not going to use PHP, right. So that's good. So I have created the resource and we want to go and deploy now, this website, this home dot html, into this my test my app in India right. Now, from these tabs out here, let's start with at least three tabs.
The first one is overview in the overview, you can see the see the resource group name, you can see that the status it is running or not, what is the location where this resource is hosted FTP and so on, right so you can see an overall view of this resource, right. The second one, which we just visited is the application setting where you can go and see that which kind of frameworks version has been installed. And what kind of thing has been configured for this application, right. The third one, which is very important is the deployment credentials. Now we would like to go and deploy on this application which we have created right on this web app, which we have created. So for that, we need to go and create an FTP username and password so we can see that there is an FTP username here.
So let me go and type a password here. So I'll just go and type a password right. So there it is. And I will just save this. So I've just created an FTP username and password so that if somebody wants to go and upload things, you know, you can do it over here, right? If you want to get the FTP access, you can go and click on this overview over here.
And on this overview, you can see that the FTP URL is given here. So this is the FTP URL. So let me go and try to do an FTP. So I'm going to go and copy this directly over here. So I'm going to go directly to the FTP and it's asking me for the username, so my username is this one. Right and my password so with this, I should be able to go and see the files.
So there the files are there. Now you can see that there is a directory here called a site. So let me go and click on this site here. So in this site, you can see there is a ww root directory, so you need to go and upload your file to this WWE directory. Okay, so at this moment, I am not connected through a proper FTP. So let's go ahead and connect to a proper FTP client, right.
So let me download FTP client. And let us connect to this as your website and it is hosted right. So basically what you need to do is you need to go and upload your site in this ww root, if you do not upload in the WW root, you won't be able to see your page. So you can see that I have downloaded this cute FTP software over here. And through this FTP let us go and upload our website right so our website at this moment is a simple home dot html page. Well, I can just rename this to index dot HTML page you know so that you know, we can just get get we can just see though see the site right?
Because index HTML page is the startup page in the web app. So now let us go and connect over here so I will say a file new FTP site So we already have the credentials. So the FTP site, the FTP, this is the FTP URL. FTP username, copy this password. And as we have said that you should upload in the WW root folder. So there it is, you can see the site folder inside the site folder that is ww root.
So let us go and upload this website inside this. So let us so I'm going to go and upload this HTML page onto this. And now let us try to go and browse the site. So I'm going to go and browse this URL. test my app in india.as. your website's dotnet for some reason, it did not show up the index dot HTML.
But there it is, right. I think it should be Filling in these two index dot htm. That should be the startup. Let me check it. So I've just renamed this to index dot htm. And let us see.
Okay, so we'll check out, you know, what is the homepage for it? How we can make it as a startup page. So that's, that's an extra exercise. But you can you can see that I can browse to my website, and it's working. Okay. Good.
But definitely when you're working on big projects, you know, you people don't use FTP like this, right? You'd like to do it through your visual studio or through your tool, right? So let me now go and host an MVC application over here. So let me create an ASP. NET MVC application. And let me host it so what I'm gonna do is I'm going to go and open up Visual Studio 2017 let me create an ASP.
NET Core application must be or must be an MVC five application, whatever. And let us try to host it on this web app. So you Here is a simple MVC application I have created. I just took the basic MVC web application template, and I just pressed okay. So I have not coded anything, I have not created any kind of code or pages. I just took the default template, what comes with your MVC web application, and I have created this project.
So when I run this project, I get to see the so that's the homepage right. So the way we are seeing this homepage in offline, we would like to see it also online, right? So let us go ahead and host it. So hosting is again, simple, we are to say build and publish. So you can see this build and publish menu. So let us click on Publish.
And it says that so one is that you can directly go and host on as your app service. Or you can go and do an FTP as well, right. So FTP I've already done I will not show it over here. Right, let us do using the as your app service. So I'll say as your app service, I'll select existing one. And I will say publish.
Now once I say publish, right, it actually opens up the screen here. And you need to be logged in with your, your account so you can your Microsoft account. So you can see here, at this moment, I'm logged in with this questpond account, right? So if you're not logged in, you have to add the account here. Okay. So it says that, okay, so that's a free trial, and it is the resource.
This is a resource group, right? And you want to host it in this test app, my India test app in India, right? So I want to host it there. So I will select this test app, my India test app in India, and I'll say OK, so you can see now it is preparing the profile. And let me just hit Publish. First it actually does a build by default.
And once the bill finishes it will start publishing the site. So let's see what happens so you can see now that it's trying to publish that publish activity. So there it is, you can see it says publish succeeds, succeeded. And if I click on this website, you can see now, my ASP dotnet MVC core application is running on as your, so that's the thing. Now, let us go back to the dashboard and let us see that where these files have been uploaded. Also, you can see like over here you are getting notification saying, you know, this has been deployed, it has been, you know, the set and all that.
So let us go and see that where our files have been uploaded. So if you want to go and see the files out here, again, there is one more important menu over here which I always use, which is the console I like this. Let us click on console and this console is like your normal command prompt you have so you can see like, it has actually taken me to the web root folder. So if I just go and say directory or here I should be able to see all my files. So, slow directory, you can see all my files, my app settings dot Jason Bower dot Jason my index HTM M or my views and all everything has been installed out here right? So again remember this console is also a nice thing you know, it's just in case you want to quickly see the files.
So remember console. The second one which is important is a properties right and the one which have said application settings, right and the first one is the overview. So overview overview deployment credentials, right? FTP application settings, just see which the frameworks are, and console. So for now, just remember these menus. As we said, Do not try to learn all of them in one go.
As we proceed, we will try to learn more things right. Also over here, there is a nice thing called as an app service editor. Right? This app service editor is nothing but it is an online editor. You know, in case you want to just go and change something in the files you don't want to download. You don't want to upload right?
So you can go and go to this app service editor out here. It's asking me for the password. So let be telling me to sign in. That is strange. Yeah, because so it's quite a long password. I've kept such a long name here.
Questpond interview questions@gmail.com Oh, gosh. So Sarah, so let me do that. I'm sorry for this email id actually, you know, like, if you look at the past history, I've been writing a lot of interview questions right so this account was created at that time. So I just use this account to create my as your account and password. So what is this editor Actually, this editor is nothing but it's its online editor. In a variant, you'd like to just go ahead and edit some files and save it right away there.
So you can see now it has opened up this looks exactly like VS code. So it is like VS code online, actually. In case You are new to VS code, I would suggest to go and watch this video of VS code, where we explain what exactly is vs. Code, right? So this in this vs. So here, what I can do is I can just quickly go and edit like for example, I can go and edit as index dot HTML, I can just go and see added something. Right?
And I can quickly go and save this to the saved as well, right? So basically, if you want to quickly go and change some, something's out here online, you can do it. Now remember, it's always a bad idea to change something on production. But we all know that developers have that. You know, out of the box solution, sometimes in a day, they try to find production. So you can use it once in a while.
Right. So App Service editor console. Then we have application settings. deployment options. Right? And the old view, right?
So this was a very simple demo, you know, where we actually deployed an MVC application online. So you can deploy by using FTP. Or if you want, you can also deploy by using the Publish wizard. So if you see this build publish wizard you have. One is you have the FTP option as well. You also have the as your app service as well.
Also, one more great option of doing a publish is by getting the Publish profile. So you can see here like, what you can do is you can go and go to the overview here. And in the overview, you can click on this more and you can get this published, published precise profile file. Now what is this publish profile file? This file has the necessary credentials, you know, by which you can go and you can log into the site. So what I can do is I can go here to my Visual Studio, and I can say create a new profile and I'll say import this profile, right?
So I can go and say import profile. And I can go and point to that file. So with that, what will happen is I don't have to give the username and passwords again and again. What happened to the import profile? file? So I'll just click on this import profile.
Import this publish settings. Right, so now my publish settings have been imported, right? And you can see over here, I have multiple profiles. One is FTP and one is web deploy, right. So now what I can do is I can just say build publish. Right?
And okay, we need to change something out here. Remember that if nothing changes does not deploy anything. So that's again, a very good idea. So we'll publish a noticing Yes, now, what you want to do. So now what I can do is I can go and I can, you know, select that profile. So you can see that he has he has already has this profile out here.
So this profile, I can go and I can just say publish on this, right. So, remember, you can also use the profile file as well. So, you can use FTP, you can use profile, or you can go and directly publish it. So, that brings us to the end of this session, right. So, in this session, what we did is we just got warmed up. So we first understood what is as your what is cloud, what is ESP as NCS, and then we went ahead and we registered outs ourself into the as your website.
And then we walked through some important fundamentals like resource groups, resources, we created a simple web service and we hosted MVC application, we hosted a simple HTML file file as well. So we saw different publishing options like one is you can use FTP you can use the normal publish or also if you want, you can use the public setting files right. And also we went through some important menus out here. So we saw you know how to go and set the deployment options, we saw how to go and see that which frameworks have been installed for a specific web application. And we also looked into the command prompt you know, where we can go and console application or console I will say rather, where we can go and see the directories and also we talked about AB service editor, which is an online editor where we can go and see the face.
So I hope that you have enjoyed this video. So this was the lab one. Now in lab two, we will go ahead and we will create SQL Server resource and we will see that can be connected to our MVC application to SQL servers. So we have completed till now approximately 45 minutes of the video, and in the next video we will look into SQL Server