Cloud Unit 2
Cloud Unit 2
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
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: