Hello Everyone, welcome to Lab 1 of Learn Azure Step by Step video tutorial. It is first lab which is approximately of 45 minutes. Where we will be hosting a website on the Azure portal. In this 45 minutes video we will doing the following:- First will start with fundamentals, will talk about SaaS, PaaS & IaaS Without this we won’t be able to understand what is Cloud & Azure. once these terminologies are cleared then will talk about Azure & Cloud. Once that is done will try to understand how to register on the Azure portal & how to get free credit limits. Once that is done will create a simple website or a simple HTML page and will deploy it on the Azure portal. Will also go though lot of small small things like Resource, Resource Groups, App Editor, Service plans, FTP & so many things. It’s a promise if we go through this 45 minutes we would be atleast in a position to host our first website on the Azure portal. Before we start with Azure we need to understand something called as Cloud. To understand Cloud we need to understand three terminologies SaaS, IaaS & PaaS. Will start from right to left. First will understand these three terminologies then will define Cloud and then will define Azure. When we go to some hosting provider and host a website The hosting provider has to give lot of services. It has to give hard disk, bandwidth, allocate a RAM, CPU Virtual Machines, Softwares and so on. These 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. Infrastructure layer is the metal part of hosting. Metal part means it has a RAM, Hard Disk, Virtual Machine, CPU, Routers, Networking, everything in this layer. On the top of it we have the platform layer which has. Operating Systems, Databases like SQL Server, Oracle, Frameworks like Java, .NET or Angular. We need Web Servers like IIS, Tomcat, Apache. This is basically a platform which makes this metal alive. Any hardware which we buy, only becomes alive or useful when we have the missionary softwares like operating system and so on. That is a Platform part. The third layer is the Softwares Layer We have application Software for example we have a male>>>>software or a website, invoicing, accounting softwares, Control Panel. All that things comes in the Software layer. When any hosting provider wants to give a service for hosting a website it is classified into three layers i.e. Infrastructure layer, Platform Layer and Software Layer. If we want to host a website and do all things by ourselves then we need to hunt a data center, buy the operating system license upfront get the hardwares, CPU, RAM, the whole box, technicians, Network guys, Databse guys, hardware engineers and so on. We would like to engage with the Web Hosting Provider in such a way that we want to it to be Elastic, Flexible. and pay for only what we use. We want it to be on demand. In Cloud it follows the two principles “O”. The first O stands for Ondemand. Ondemand means we need 1 GB RAM, 200 GB Hard Disk for 10 days. The first principle of Cloud is it is Ondemand, flexible, elastic in nature. We can start with a simple machine like 4 GB RAM 200 GB Hard Disk. Tomorrow if we we say we want 8 GB RAM machine We can scale up and scale down and pay only for what we use. The second thing is every thing is Outsourced. Second “O” stands for Outsourced means we don’t worry about who takes a backup, installs a software, where do we procure it from. The resources part also declined over here because everything is Outscourced to the hosting provider. Cloud has the two big Os. The first one is everything is Ondemand & the second one is everything is Outsourced so that we can just concentrate on the website and business. We want things to be as a “SERVICE”. For example, when we go to a hotel to eat we do not worry about the cook what is happening at the back, from where he is buying things. We just place order eat it and go. After that washing the dishes, keeping the place clean, everything is the headache of the restaurant. Here also we want to deal in terms of Services It possible that we just want the Infrastructure as a Service or want the Platform as a Service or a Software as Service. Basically we want the hosting provider to provide a flexibility saying which layer we want and from which icon we want a Service and for how much time? Cloud is all about Ondemand and Outsourced. Azure is a Microsoft’s Cloud. It is the solution given by Microsoft for Cloud. Here we have logged into Azure portal. Will come to the steps of how to register to the Azure portal. We can scale up and scale down. When we choose any kind of a service add a service and want to host a simple Website. When we go to host the website we can define what kind of plan we want. We want it to be free. This is free with a 1 GB storage or we can pay some money and want 1 GB storage with domain names as well. If we start with free and the website goes great and tomorrow if we want to update, we do not want send a mail to the hosting provider and upgrade then negotiate. We can change the plan by scaling up and choose this service where we want a 4 Core machine with a 14 GB RAM and 250 GB Hard Disk. This is the most important part of a Cloud that we can scale up, scale down and pay as we use. If we host this service it will only charge for the time we have used it. If we shut down the website we will not be charged for that. When we buy from GoDaddy or from other hosting providers they take the money upfront they are not elastic in nature. Now we use the website or don’t use the website but we have to pay it upfront. While incase of Cloud based solution like Azure or Amazon we will pay only for we will use. That’s a big difference. That was a definition of Cloud, Azure by understand for IaaS, PaaS & SaaS. The first step is we need to get access to Azure account or portal. Go to https://account.azure.com/ Fill in the registration To get access to the free service it gives a 12 months of free service with the 13,300 of Azure credit. It also says that this a free account and does not automatically upgrade to a paid subscription. Rs. 13,300 comes to 200$ approximately. We need to provide credit card in order to get access to Azure services. Once we login to Azure site we get access to a portal like this. When we login in the messages it says we have free subscription trial and this is the amount. Azure has lot of services. At the left hand side the menus are huge in numbers. This menu also have some menus inside it,. For the coming 1 or 2 hours try to follow Once we are inside Azure project we can hunt for those hiring services. The whole goal of Cloud is we want to avail service or book service and pay as per use. In Azure we have to say which resources we want We need to login to Azure portal and say we want a Virtual Machine of Windows Server 2012, SQL Server RDBMS, an IIS Server. There is something called as Resources, Dashboard at the left hand side. The Dashboard shows the overall things happening in Azure. At the left hand side we have a Resource. In Azure we will be adding resource. Add Windows Server 2016 VM or add the storage device, add Web Project. In Azure will first create a resource. When we are working with bigger projects we would be dealing with lot of resources about 50-60 resources at one time We can have a Resource called as a Server. Resource which is a Database, Resources which is a Web Server and so on. For better management of this Resources we would group them. Create a Resource Group called as Web Development. This is Web Development for XX Client. It has the Server, Database. Will group this Resources so we can do accounting, better manage them and so on. In the Portal there is something called as Resource Groups. First thing is in the All Resources we can see all the resources which is there currently in the Portal. In the Resource Groups we can create group and put the Resources into this Group. to do better better accounting and manage them. First will create a Resource Group here. Click on Add –>Name the resource group as WebDevelopment Client1 For that Client 1 we will put lot of resources. We have grouped them into a group name called as WebDevelopmentClient1. At this moment we have free trial subscription There is something called as Resource group location. When we take Resource or a Server then that Server is running on some Data Center which is in US or in UK. This Server runs on the US Data center. We have the flexibility to pickup the geographical location where we want the Resource to be allocated. If we are from India then we would take the data center which is near to us in India. Each one of these resources can have their own geographical Data Center. In the Resource Group we have the Meta-Data stored. The Meta-Data for all of these Resources. We would store the Meta-Data into some Data Center. That’s why we have this Resource group location. This says where do we want to store the Meta-Data of this resource group. Please note this is the Meta-Data not the actual resource. Will store it in US at this moment. The time we click on Create it tells the Resource group has been created. In the Resource group we can see WebDevelopmentClient1. We have created the Resource group now it is time to add resources to this resource group. Let us say we want to host a Web sites, Over here we have a very simple folder where we have created a HTML page. In this HTML page we have like For that we need to allocate resources. A Website, a mobile, application, a web application are all applications. For the applications there is a menu called as an App Services. To host a website, a mobile app or an API Service this is the menu we will select. Click on App Services –>Click on Add As soon as it gives lot of flavors of applications like Simple Web Application, Web Application with SQL Server, App Servie, WorPress, Site Core etc… Currently will select a simple web application. Give a name to this app. Whatever name we give to this app it will become the app name .Azurewebsites.net . testmyappindia The subscription is a Free Trial which we are using for now and add this resource to the resource group Resource group helps to take the resources and put them into a specific container to monitor them, do accounting. It groups them into a specific logical unit. Depending on what technology we have used must be want to use Window Operating System or Linux, click on Windows at this moment. After thi it says for this app how much we want to spend? how much heavy resources we want? 1 GB RAM, 2 GB RAM, Dual Core, Multi Core and that is decided by this app service plan. By default This app service is using a standard plan. Will create our own plan This is MyPlan123 It says this plan is applicable for which geographical location? In short it says where we want to store the Meta-Data of it, where we want to allocate the servers. Will select US for now. This Pricing tier defines how much money do we want to spend on this app. For example, if we say this is just a test app and just use a 1 GB storage, if we say we also need some domains and we can say 1 GB+Custom Domains. It is in INR but we can convert it to a Dollar as well. This Pricing plan tells how much strong resources we want. It starts from a free and goes till Isolated. We are already using the free thing select the free F1 Free Storage 0 INR/Month . We are creating a plan which is free plan, in this plan we have said we want to use simple 1 GB of Storage. and create it. Once we click on Create it will create a Web Application kind of a directory. As soon as we did create, it it is doing a deployment. It is creating a resource and allocating it to the resource group. Once this deployment is successful it will give a message that it is successful. We can see all the status here Dismiss, Informational , Completed and All. It says Deployment succeeded and it has been deployed to this resource. and the group is WebDevelopmentClient1 In App Services we have this testmyappinindia Inside this we can now deploy our project. In this testmyappinindia there are lot of things. Will not try to learn all the menus in one go. The most important thing is we would like to know what are the settings for this. Which framework it is using? Does it have Java installed or not? For that click on Application Settings. It is an IIS Web Server and it has .NET 4.7, it has PHP and all that. We are not interested in PHP so we can off it. It’s an Integrated kind of a Pipeline. All the settings of IIS which we have been seeing from from the IIS menu. We have created the resource and now will deploy this website home.html into this testmyappinindia From these tabs let us start with three tabs. The first one is Overview, in the view Overview we can see the Resource Group name, the status and the location where this resources hosted, FTP and so on. The second one which we just visited is the Application Settings where we can see which kind of frameworks version has been installed and what kind of thing has been configured for this application. The third one is very important is Deployment Credentials We would like to deploy on this application which we have created. For that we need to create FTP username and password. To get the FTP access click on Overview On this Overview the FTP URL is given here Copy this go directly to the FTP. With this we should be able to see the files. There is a directory called as site Click on the site here In this site there is www.root directory. We need to upload the files to this www.root directory. At this moment we are not connected through a proper FTP so will connect through a proper FTP client. Download FTP Client and connect to this Azure Website and host it. We need to upload the site in www.root . If we do not upload in www.root we won’t be able to see the page. We have downloaded this FTP software over here. The Website is a simple Home.html page. We can rename this to Index .html page so we can see the site. Index.html page is a startup page in the Web app File –>New –>FTP Site. Let us try to browse this site. Browse this URL testmyappinindia.azurewebsites.net Will check out what is the home page for it. How we can make it as a startup page. But we can browse to the website. When we are working on big projects we don’t use FTP like this, we would do it through the Visual Studio or through the tool. Now will host a MVC application over here. Will create an ASP.NET MVC application Open Visual Studio 2017. Create ASP.NET Core application or a MVC 5 application and host it on the Web App. Here we have created a simple MVC application. We took the basic MVC Web Application Template and pressed OK. We have not coded anything and have not created any kind of code or pages. We just took the default template what comes with the MVC Application and created this project. When we run this project we get to see the Home Page. The way we are seeing this home page in offline we would see it in Online. Now will host it. Build –>Publish One is we can directly host on Azure App Service or we can do a FTP as well. We have already done FTP will not show it here. Will do it using Azure App Service. Select Existing one and Publish it. Once we click on Publish it opens up the screen here. We need to be logged in with the Microsoft account. At this moment we are logged in with questpond account , if not logged in we can add the account. It says that’s a free trial and This is a Resource Group and we want to host it in the testmyappinindia. It is preparing the profile and hit Publish. It says publish succeeded. When we click on the Web Site, we can see the ASP.NET MVC Core Application is running on Azure. Go back to Dashboard and see where these files have been uploaded. Over here we are getting notification saying it has been deployed, reset and all that. There is one more important menu over here which we always use the Console Click on Console and it is like a normal command prompt what we have. It has taken us to the www.root folder and if we say directory we should see all the files. To quickly see the files use Console the second one is properties, Application Settings and the Overview. There is a nice thing called as an App Service Editor. This App Service Editor is an online editor to change something in the files and we do not want to download do not want to upload then go to App Service editor. This editor is an online editor wherein we would edit some files and save it right away there. It has opened up and this looks exactly like VS Code online. Incase you are new to VS Code you can watch the video of VS Code where we have explained what exactly is VS Code. Here we can edit Index.html and say added and save this To quickly change some things out here online we can do it. It is always a bad idea to change the production but we know developers have that out of the box solutions, they try to find production so we can use it once in a while. App Service Editor Console Application Settings Deployment options and the Overview This is a simple demo where we deployed a MVC application online. We can deploy by using FTP or also using a publish wizard. There is one more option of doing a publish is by giving a publish profile. Go to the Overview in the Overview click on More and Get publish profile file. This file has the necessary credentials by which we can log into this site. Go to the Visual Studio and click Create new profile and select Import Profile. We can point to that file and with that we do not have to give the username and password again again. Over here we have multiple profiles one is FTP and one is Web Deploy. Click on Build –>Publish We can also use a Profile file as well. That brings us to the end of the session. In this session we first understood what is Azure, Cloud, IaaS, PaaS & SaaS, Then we registered into the Azure Website. We walked through some important fundamentals, Resource Groups, Resources. We created a simple Web App Service and hosted MVC application and a simple HTML file as well. We saw different publishing options like FTP, the normal publish or we can use Publish Setting files. We went through some important menus how to set the deployment options, how to see if Frameworks have been installed for a specific Web Application and also looked into the Command Prompt where we can see the directories. We talked about Editor which is online editor where we can see the files. This was the Lab 1. In Lab 2 we will create SQL Server Resource and will see can we connect through the MVC Application to SQL Server. We have completed approximately 45 Minutes of the video. In the next video will look into SQL Server.