0% found this document useful (0 votes)
14 views5 pages

Cloud Unit 2

cloud computing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views5 pages

Cloud Unit 2

cloud computing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Microsoft Azure Tutorial

Microsoft Azure is a cloud computing platform that provides a wide variety of


services that we can use without purchasing and arranging our hardware. It enables
the fast development of solutions and provides the resources to complete tasks that
may not be achievable in an on-premises environment. Azure Services like
compute, storage, network, and application services allow us to put our effort into
building great solutions without worrying about the assembly of physical
infrastructure.

What is Azure
Microsoft Azure is a growing set of cloud computing services created by Microsoft
that hosts your existing applications, streamline the development of a new
application, and also enhances our on-premises applications. It helps the
organizations in building, testing, deploying, and managing applications and
services through Microsoft-managed data centres.
Azure Services
Compute services: It includes the Microsoft Azure Cloud Services, Azure Virtual
Machines, Azure Website, and Azure Mobile Services, which processes the data on
the cloud with the help of powerful processors.
Data services: This service is used to store data over the cloud that can be scaled
according to the requirements. It includes Microsoft Azure Storage (Blob, Queue
Table, and Azure File services), Azure SQL Database, and the Redis Cache.
Application services: It includes services, which help us to build and operate our
application, like the Azure Active Directory, Service Bus for connecting distributed
systems, HDInsight for processing big data.
Network services: It helps you to connect with the cloud and on-premises
infrastructure, which includes Virtual Networks, Azure Content Delivery Network,
and the Azure Traffic Manager.
Azure Test and Deployment

Azure Test and deployment

Below is developed application will be used for demonstrating testing and


debugging features of Azure.
When the cloud service is started in debug mode, Visual Studio brings up the
window shown in Figure 3.4
The left pane shows the result of the program (Web role) i.e web based requests
and the right pane shows the source code of the application(Worker role).i.e back
ground processing
One can add breakpoints, step through the code, and watch variables just as is
done in a regular Visual Studio project.
Please note that Visual Studio must be started in administrator mode to debug
cloud applications.
The application is now running on the local machine on top of a Windows Azure
emulator known as the development fabric.
The development fabric provides the functionality of Windows Azure on the local
machine so that users can debug the logic of their services in the familiar
environment provided by Visual Studio.
The final result of the application is shown in Figure 3.5, where the Web role
received an input string from the user, sent that to the Worker role, and then
received back a server timestamp to display to the user.
One can also view the message queues and trace statements for both Web role and
Worker role. For this, the development fabric view shown in Figure 3.6 is used.
One can select a role on the left pane and see the messages and trace output for
the selected role on the right pane.
A more detailed description about the development fabric from a technical
standpoint is in the next section.

Deploying Azure applications: So far, the development and testing of the new
application happened on the local machine. The same now needs to be deployed on
the cloud. For this, one needs to obtain an Azure subscription from the Microsoft
Online Customer Portal [8].
Once a subscription is created, a developer login is available to the Windows Azure
developer portal at http://windows.azure.com, where the developer can create a new
project.
Figure 3.7 shows the Azure portal page with the project added.
Once a subscription has been obtained in the developer portal, the next step is to
create a hosted service and a storage account for the new application.
The hosted service creates the end points for accessing the application. The unique
service URL that is selected here will be used by clients to access the application.
Similarly, the storage account exposes the endpoints for accessing cloud storage
for the application.
Figure 3.8 depicts the creation of the hosted service and the unique URL chosen
here is simpleazureservicecc.
This implies that the web page will be available to users at
http://simpleazureservicecc.cloudapp.net.
For this example, the application and storage are assumed to be hosted in the US
region– other options for geo-distribution are Europe or Asia Pacific.
Different regions have different cost implications and the details of the different
costs are available on the Azure pricing web-page

Windows Azure allows us to request that multiple roles of an application and the
shared data be deployed in an efficient manner to get good performance.

This is done through affinity groups– applications and data that work together can
be placed in an affinity group so that they are hosted in the same region.

For this example application, the default values for the affinity group will be used.
Clicking on the “Create” button creates a placeholder service using the settings
provided.
Since the example application uses message queues for communication, a storage
account is also created on the portal.
Figure 3.9 shows the portal after the storage account is created.
Three endpoints have been defined for the storage account for different types of
storage that one can use in Azure, namely blobs, tables,andqueues.
The example uses queues. Other models will be examined in the next section.
Similar to a hosted service, the name of the storage account forms part of each
endpoint and defines the highest level namespace for them.

There are two access keys that are generated– either key can be used to obtain
access to the storage endpoints. Microsoft recommends that the keys be changed
reg ularly to avoid the pitfalls of a leaked key.
Windows Azure also offers the option of enabling a content delivery network (CDN)
for the data– this allows applications to serve data from locations that are closest to
the end user. At the time of writing there were 18 data-centers around the world that
are part of the Azure CDN.

After creating a storage account, the configuration should be modified to use the
cloud storage for messages. This is accomplished by modifying the
AzureStorageConnectionString configuration parameter in the service con figuration
(.cscfg) file to use cloud storage for application data. Recall that this parameter was
initially configured to use development storage; the new setting is:
"DefaultEndpointsProtocol= [http|https]; AccountName= ; AccountKey=".

The example is almost complete. In order to host the Web and Worker roles on the
cloud, it is necessary to create a package by using the “Publish” context menu,
shown in Figure 3.11. Choose the “Create Service Package” option to create the
application’s service package (.cspkg) file. Next, we return to the home page of the
hosted service shown in Figure 3.12. The page shows two deployment
environments– production and staging.Both environments host the application on
the cloud, but the staging environment creates

the deployment with a temporary URL as the end point, while the production
deployment uses the service URL. Applications can be moved from production to
staging and vice-versa at any time. First, the application will be deployed in the
staging environment, as shown in Figure 3.13. Green bars next to the Web and
Worker roles indicate that they

Finally, the deployment switch icon is selected to move the service into produc tion.
The application is now available on http://simpleazureservicecc.cloudapp.net. If
more instances of the Web or the Worker role are needed, the service configura tion
from the configuration page in the portal can be modified. The configuration is an
XML file which is similar to the one shown here:

are executing. The staging application is hosted on a temporary URL, one that is
nearly impossible to discover accidentally. This allows developers to deploy their
applications on the cloud and test them before making them publicly available.
Finally, the deployment switch icon is selected to move the service into produc tion.
The application is now available on http://simpleazureservicecc.cloudapp.net. If
more instances of the Web or the Worker role are needed, the service configura tion
from the configuration page in the portal can be modified. The configuration is an
XML file which is similar to the one shown here:

You might also like