Sunday, August 20, 2017

Hello World to Cloud Computing


Hello World to Cloud Computing


What is Cloud computing?


Cloud computing is a new form of Internet-based computing that provides shared computer processing resources and data to computers and other devices on demand.

What are Cloud Deployment Models?

Cloud deployment model refers to how logically grouping is provided to host the contents, it may or may not have exact one to one similarities with physical location. 
  • Public Cloud 
    •  Owned by commercial company who provides a service to host the contents.

  • Private Cloud
    • Owned  by a company for it's own use and strictly allows access to companies  authorized users.
  • Hybrid Cloud
    •  Data center owned by a company which is interacting to the Public Clouds hosted    by the Cloud Vendors. 
  • Community Cloud
    • Owned  and Managed by a company and setup is for a dedicated community e.g.  Bank or Trading company. 


What are the types of Cloud Services?
    • IaaS   -   Infrastructure as a Service - 
      • Offering Infrastructure as a service.
      • Infrastructure is managed by the cloud vendor. 
      • Examples are  deploying Virtual Machines, deploying servers etc.  
    • PaaS -   Platform as a Service   
      • Offering Platform as a service.
      • Platform is managed by the cloud vendor.
      • Examples are Installing  database, Installing web servers etc. 
    • SaaS -   Software as a Service 
      • Software is managed by a vendor.
      • Examples are Microsoft Office 365. 

Azure supporting Languages

  • .NET  / JAVA / Python / Node.js / PHP                   
  •              


Steps to write 'Hello World' in Cloud Computing



 A. Write a .NET Hello World Application

  1. Install Visual Studio Community 2017 from  https://www.visualstudio.com/downloads/- free for developers and students for non-production use, this has most latest API's available for cloud. 
  2. In following window from 'WEB and Cloud' select 
    • Select 'ASP.NET and web development'
    • Select 'Azure development'
    • Click on 'Install' 
  3. After finishing installation, Open Visual Studio 2017 community - Click on File - New - Project - ASP.NET Web Application.
  4. Choose MVC Project and click OK. 
  5.  You will get following screen, as you can see MVC Project created with all necessary files and directories. 
     
  6. Save - Build - and Run the project
  7. You will see following screen notice address bar this is running on your local IIS Server .
  8. To give it more Accurate name, change above 'ASP.NET' message to 'Hello World To Cloud Computing' ,  and optionally change the description with any other details e.g. I have put here pratimas.blogspot.com. Build and keep it ready to publish on Cloud. 

  9. By now you are ready with your .NET Hello World application running on Local Server. In Section B we will see how to setup you FREE AZURE/Cloud  30 day account with $200 credit.  
B.  Create a AZURE Cloud account


1. Create a free AZURE account by visiting link https://azure.microsoft.com/en-us/free/ and click on
    'Start Free'.



2. In order to start a free AZURE subscription, you need to login to your Microsoft account or create   new one. If you use your company account and Windows Federal Authentication is already setup, you can directly login using your company email address or you can user your microsoft personal account.

3. You need to give your Credit Care Details for Authorization purpose only . Microsoft does't charge your account unless and until you set it like that . 


3. Following screen will appear which will do Authentication and Authorization with your personal account or companies account using Federal Authentication (https://msdn.microsoft.com/en-us/library/ee517293.aspx).


4. Welcome to the World of CLOUD - 

     After login AZURE Dashboard will be shows as below.




5. To host a services on AZURE you need Virtual Machine and to create a Virtual Machine, you need to create Resource Group. On left pane of the screen click on 'Resource Group'  on

  • Resource Group -   A resource group is a logical container for Azure resources


  6. Click on 'Add' to add Resource Group.


   7. Add Resource group name , Subscription and resource group location and screen will look  
       like following.

   8.  Provide resource group name, in this example I have used pratimas.blogspotResourceGroup',          Subscription choose 'Free Trial'  and location to host your service e.g. 'Central India'  Location        needs to select based on the users of your service to reduce network glitches.  

Checked on the box 'Pin to Dashboard' in order to appear resource group tile on your dashboard screen.



9. Click on a 'Dashboard' from the left Pane, and you can see currently created resource group on  
  right hand panel.


10. By now you are ready with your .NET Hello World application and CLOUD Account using 
AZURE.

C.  Deploy Hello World to Microsoft AZURE Cloud

  1. In Visual Studio Community 2017 , Open solution explorer - Right Click and click on Publish.                     
  2. Following screen will be displayed , click on Create New 
  3. Select 'Create New ' and provide following details as shown below.
  4. For App Service Plan click on 'NEW' and provide details as shown below 
  5. Following screen will be shown for a fraction of second which shows resources are deploying on CLOUD. 
  6. CONGRATULATIONS you have your first application on Cloud.
    http://helloworldtocloudcomputing.azurewebsites.net/ 

IMPORTANT POINTS IN THIS BLOG 


    • Microsoft Visual Studio Community 2017  is FREE and has most latest API to write Cloud computing application. [For non production use]
    • Microsoft give 30 day FREE AZURE subscription and $200 Credit to host content.
    • Microsoft AZURE Dashboard - portal.azure.com
    • .NET Program deployed @ http://helloworldtocloudcomputing.azurewebsites.net/