0
1.6kviews
Describe a workflow that will illustrate the steps required to develop, build and deploy a simple web role cloud service to the cloud using Windows Azure

Mumbai University >Information Technology>Sem7>Cloud Computing

Marks: 8 M

Year: May 2014, Dec 2014

1 Answer
0
29views

The Azure Management Portal provides two ways for you to create and deploy a cloud service: Quick Create and Custom Create.

Three components are required in order to deploy an application as a cloud service in Azure:

  • Service Definition

    The cloud service definition file (.csdef) defines the service model, including the number of roles.

  • Service Configuration

    The cloud service configuration file (.cscfg) provides configuration settings for the cloud service and individual roles, including the number of role instances.

  • Service Package

    The service package (.cspkg) contains the application code and the service definition file.

Create a cloud service using Quick Create

  1. In the Management Portal, click New>Compute>Cloud Service>Quick Create.

  2. In URL, enter a subdomain name to use in the public URL for accessing your cloud service in production deployments. The URL format for production deployments is:

https://myURL.cloudapp.net

  1. In Region or Affinity Group, select the geographic region or affinity group to deploy the cloud service to. Select an affinity group if you want to deploy your cloud service to the same location as other Azure services within a region.

  2. Click Create Cloud Service.

Upload a certificate for a cloud service

  1. In the Management Portal, click Cloud Services, click the name of the cloud service, and then click Certificates.

  2. Click either Upload a certificate or Upload.

  3. In File, use Browse to select the certificate (.pfx file).

  4. In Password, enter the private key for the certificate.

  5. Click OK (checkmark).

Deploy a cloud service

  1. In the Management Portal, click Cloud Services, click the name of the cloud service, and then click Dashboard.

The dashboard opens in the Production environment, you could at this point select Staging to deploy your application in the staging environment. For more information, see Manage Deployments in Azure.

  1. Click either Upload a new production deployment or Upload.

  2. In Deployment label, enter a name for the new deployment - for example, MyCloudServicev4.

  3. In Package, use Browse to select the service package file (.cspkg) to use.

  4. In Configuration, use Browse to select the service configure file (.cscfg) to use.

  5. If the cloud service will include any roles with only one instance, select the Deploy even if one or more roles contain a single instance check box to enable the deployment to proceed.

Verify your deployment completed successfully

  1. Click Dashboard.

The status should show that the service is running.

  1. Under quick glance, click the site URL to open your cloud service in a web browser.

Setup for Azure Project

Procedure

  1. For setting up the project, first for the Webrole project you need to sign in to the Azure Portal.
  2. In the portal create a cloud service with a unique URL (Here it is example1.cloudapp.net) and a specified server location (here it is in Southeast Asia).
  3. Now for using Visual Studio, in the file menu select "New project" and then in the cloud pane of the window edit the name of the project to example1 (it is not necessary that both the project name and cloud service name will be the same) and click "Ok".
  4. After clicking "Ok" a small window is shown from which we need to select a type of Webrole project, here we will select ASP.NET web role and give a name to it. Let's name it "firstwebrole" then click "Ok" to continue.
  5. You will see the web role in your Solution Explorer.

DESIGNING WEBROLE PROJECT

  1. We will create a web form that will display the text entered into the TextBox after clicking the "Submit" button.

DEVELOPING WEBROLE PROJECT

Procedure

  1. Now in Visual Studio go to the Solution Explorer tab and right-click the Webrole (here it is firstwebrole) then select "Add" > "Add new item". A window will appear for selecting the web form (top of the window) name; nme it "firstform.aspx" and click "Add" to continue:

  2. Then open the "firstform.aspx" file in design mode and drag & drop the following ASP.NET controls to the form

  3. Open the "firstfom.aspx.cs" file and write the business logic for displaying the name entered in the textbox on a button click event:

    protected void Button1_Click(object sender, EventArgs e)

    {

    label1.Text = TextBox1.Text;

    }

  4. Run the project using Ctrl+f5 and test the application. You are now ready to deploy to the Windows Azure Portal

DEPLOYMENT TO WINDOWS AZURE

Procedure

  1. Now login to the Windows Azure Portal and click on pane cloud services Click on "example1 cloud service". We can see the deployment settings under which two options will exist:
  • New Production deployment (for running in a real environment)

  • Staging deployment (for testing the application)

  1. Now come to Visual Studio and right-click the project then select "example1" -> "Package", then a small window will appear, in this window click on the package button. After some time a folder with following two files will appear:

    These files will be upload on the portal.

  2. Now on the portal click NEW PRODUCTION DEPLOYMENT a window will appear then pick the corresponding file by browsing to the same folder in which published file was created in previous step and select files. Also we need to provide a deployment label name (can be any name depends on requirement).

    Now upload the files. It will take 5 to 10 minutes depending on your internet speed. The upload progress will appear in the bottom pane of the portal.

Please log in to add an answer.