Wednesday, 5 September 2018

Microsoft Azure - Storage

The Storage component of Windows Azure represents a durable store in the cloud. Windows Azure allows developers to store tables, blobs, and message queues. The storage can be accessed through HTTP. You can also create our own client; although Windows Azure SDK provides a client library for accessing the Storage.
In this chapter, we will learn how to create a Windows Azure Storage account and use it for storing data.

Creating Azure Storage Account

Step 1 − When you login into your Azure account, you can find ‘Storage’ under ‘Data Services’.
Storage Account
Step 2 − Click on ‘Quick Create’ and it will ask for ‘Account Name’.
Storage Account
You can see there are four options in the ‘Replication’ dropdown. A copy of the data is kept so that it is durable and available at high speed. It is retained even in case of hardware failure. Let’s see what these options mean −
  • Locally redundant storage − Copy of the data is created in the same region where storage account is created. There are 3 copies of each request made against the data that resides on separate domains.
  • Zone-redundant storage (available for blobs only) − Copy of the data is created on separate facilities either in the same region or across two regions. The advantage is that even if there is failure on one facility, the data still can be retained. Three copies of data are created. One more advantage is that data can be read from a secondary location.
  • Geo-redundant storage − `Copy is created in a different region which means data is retained even if there is a failure in the complete region. The numbers of copies of data created are 6 in this case.
  • Read-access geo-redundant storage − This option allows reading of data from a secondary location when data on the primary location is not available. The number of copies created is 6. The main advantage here is that availability of data can be maximized.
There are different price plans for each replication option and the ‘Local Redundant’ is the cheapest of them all. So, choosing the replication of data depends on the cost and individual requirements.

Storage Account Endpoints

Step 1 − Click on the ‘Storage Account’ it will take you to the next screen.
Step 2 − Click on ‘Dashboard’ from top horizontal menu.
Storage Account Endpoints
Here you can see four items under services. You can create blobs, tables, queues and files in this storage account.
There will a unique URL for each object. For example, here account name is ‘tutorialspoint’ then the default URL for blob is https://tutorialspoint.blob.core.windows.net Similarly, replace blob with table, queue and file in the URL to get the respective URLs. To access an object in the location is appended in the URL. For example,http://tutorialspoint.blob.core.windows.net/container1/blob1

Generating an Access Key

Access key is used to authenticate the access to the storage account. Two access keys are provided in order to access the account without interrupting it, in case, one key has to be regenerated.
To get the Access Keys, click on ‘Manage Access Keys’ in your storage account. The following screen will come up.
Generating an Access Key
Regenerating the key at regular intervals is advised for security reasons.

Managing Data to Azure Storage

How can you upload or download data to Azure store? There are many ways to do it, but it can’t be done within the Azure portal itself. You will have to either create your own application or use an already built tool.
There are many tools available for accessing the data in an explorer that can be accessed by clicking on ‘Storage Explorer’ under ‘Get the Tools’ in your Azure storage account. Alternatively, an application can also be built using Software Development Kit (SDK) available in Windows Azure Portal. Using the PowerShell commands is also an option to upload data. PowerShell is a command line application that facilitates administering and managing the Azure storage. Preset commands are used for different tasks to manage the storage.
You can install PowerShell by going to ‘Downloads’ on the following screen in your account. You will find it under Command-Line tools.
Managing Data to Storage
There are specific commands for each task. You can manage you storage account, create a new account, and create a container. Additionally, blobs, tables, queues messages can also be managed using PowerShell.

Microsoft Azure - Fabric Controller

Microsoft Azure - Fabric Controller



Fabric Controller is a significant part of Windows Azure architecture. When thinking of the components or services provided by Windows Azure, we wonder how all this works and what is happening in clouds. It seems very complex from our end. Let us look into the physical architecture of these services to have a better understanding of Fabric Controller.
Fabric Controller
Inside the datacenter, there are many machines or servers aggregated by a switch. We can say that fabric controller is a brain of the azure service that analyses the processes and makes decisions. Fabrics are group of machines in Microsoft’s datacenter which are aggregated by a switch. The group of these machines is called cluster. Each cluster is managed and owned by a fabric controller. They are replicated along with these machines. It manages everything inside those machines, for e.g., load balancers, switches, etc. Each machine has a fabric agent running inside it and fabric controller can communicate with each fabric agent.
When selecting a virtual machine offered by Windows Azure services, there are five options to choose from. The configuration is as follows −
MemoryCPUInstance Storage
Extra Small768 MBSingle core 1.0 GHz20 GB
Small1.75 GBSingle core 1.6 GHz225 GB
Medium3.5 GBDual core 1.6 GHz490 GB
Large7 GBFour core 1.6 GHz1,000 GB
Extra Large14 GBEight core 1.6 GHz2,040 GB
When a user chooses one of the virtual machine, the operating system, patch updates and software updates are performed by fabric controller. It decides where the new application should run which is one of the most important functions of Fabric Controller. It also selects the physical server to optimize hardware utilization.
When a new application is published in Azure, an application configuration file written in XML is also attached. The fabric controller reads those files in Microsoft datacenter and makes the setting accordingly.
In addition to managing the allocation of resources to a specific application, it also monitors the health of compute and storage services. It also makes the failure recoveries for a system.
Imagine a situation where four instances of web role are running, and one of them dies. The fabric controller will initiate a new instance to replace the dead one immediately. Similarly, in case any virtual machine fails, a new one is assigned by the fabric controller. It also resets the load balancers after assigning the new machine, so that it points to the new machine instantaneously. Thus, all the intelligent tasks are performed by the Fabric Controller in Windows Azure architecture.

Microsoft Azure - Compute Module

In the last chapter, we explained how to create an Azure account. In this chapter, you will find step by step explanation of each component −
Step 1 − First, login in to your Azure account.
Step 2 − Click ‘New’ at the left bottom corner and drag your cursor to ‘Compute‘.
Now you will see a list of models under Compute Model as shown in the following image.
Compute Model

Create a Web App

Step 1 − Click Web App.
Step 2 − Click Quick Create and enter the URL and choose a service plan from the dropdown list as shown in the following image.
Create a Web App
When you go back to the main screen, it will show the website just created. And when you click the website URL, it will take you to the website.
Create a Web App
The following image shows how your website will look when you click the URL.
Create a Web App
Similarly, you can choose ‘From Gallery’ when creating a web app instead of ‘Quick Create’. This will let you choose the development framework in which you want to create your app.
Create a Web App
Windows Azure supports .Net, Java, PHP, Python, Node.js and Ruby. There are several ways of publishing the code to Azure server. It can be published using FTP, FTPs, Microsoft Web Deploy technology. Various source control tools such as GitHub, Dropbox and Codeplex can also be used to publish the code. It provides a very interactive interface to keep track of changes that have been published already and also unpublished changes.

Create a Virtual Machine

Step 1 − Click on ‘Virtual Machine’ from the list.
Step 2 − Then click ‘From Gallery’.
Create a Virtual Machine
Step 3 − Choose the Operating System or Program you want to run.
Create a Virtual Machine
Step 4 − Choose the configuration and fill in the details.
Create a Virtual Machine
The Username and Password you set up here will be needed to access the virtual machine every time.
On the next two screens you can leave the default values on for the first time.
Step 5 − The virtual machine just created will be displayed when you click on ‘Virtual Machine’ on the left panel as shown in following image. It might take a few minutes to show up.
Create a Virtual Machine
Step 6 − Once the machine is created you can connect to it by clicking on the connect icon displayed at the bottom of the screen. It will save a .rpd file on your machine as shown in the following image. Chose ‘save file’ on the screen and it will save in ‘downloads’ or the in the set location on your machine.
Create a Virtual Machine
Step 7 − Open that .rpd file and you can connect to the VM by filling in the credentials into the following screen.
Create a Virtual Machine
You can also use your own image by capturing the image of an existing virtual machine or virtual hard drive. Virtual machines are beneficial in several ways.
  • A user can try new operating system without actually installing them.
  • A VM can be deleted when you are done with the operating system.
  • New versions of an operating system can be tried and tested before the user installs them on the machine.
  • VM provides a very economical and hassle free way of using a development framework or a tool that runs on specific version of OS.

Creating a Mobile Service

Mobile services compute hosting model is optimized to provide a cloud backend for applications that run on mobile devices. For creating a mobile service −
Step 1 − Select Mobile services under Compute and click on create. A new window will be open as shown in the following image.
Create a Mobile Service
Step 2 − Fill in the URL. Select the database, region and backend.
Step 3 − Tick the check box if you want to configure the advance push settings. This option allows us to configure our Mobile Service to use an existing notification hub or specify the name of a new one. If you leave this checkbox unmarked, a new hub will be created in a new namespace with a default name.

Creating Batch Service

Batch service is needed when a large scale application is run and a parallel high performing computing is required. The developers can create batches to run a task parallel that eases the workload at no extra cost. Azure charges for only the virtual machines which are being used. They can schedule a task, put them in queues and manage the workload in cloud. Batch creation does not involve setting up a separate VM, cluster or job scheduling.
To creating a batch service follow the similar steps for creating other services under Compute model. The following image shows how a batch service can be created quickly.
Create Batch Service
Once you have created a batch service, you can see the details by selecting it from the left panel. The following image pops up on the screen.
Create Batch Service

Microsoft Azure - Components

Microsoft Azure - Components




Categorizing the services would help you understand Azure better. These categories are termed as ‘Components’ in this tutorial. The Individual components are explained with detailed pictures in subsequent chapters.

Compute / Execution Models

This is the interface for executing the application, which is one of the basic functions of Azure.
Compute Execution Models
As seen in the above image, there are different models such as Web App, Virtual Machine, Mobile Service, Cloud Service, and Batch Service. These models can be used either separately or in combination as per the requirement.

Data Management

Data management can be done by using SQL server Database component or the simple data storage module offered by Windows Azure. SQL server database can be used for relational database. The storage module can store unrelated tables (without foreign key or any relation) and blobs. Blobs include binary data in the form of images, audio, video, and text files.
Compute Data Management

Networking

Azure traffic manager routes the requests of a user intelligently to an available datacenter. The process involves finding the nearest datacenter to the user who makes the request for web application, and if the nearest datacenter is not available due to various reasons, the traffic manager deviates the request to another datacenter. However, rules are set by the owner of the application as to how a traffic manager should behave.
The virtual network is another feature that is part of networking in services offered by Windows Azure. The virtual network allows a network between local machines at your premise and virtual machine in Azure Datacenter. IPs to virtual machines can be assigned in a way that makes them appear to be residing in your own premise. The virtual network is set up using a Virtual Private Network (VPN) device.
The following image shows how these two features actually look in Azure portal.
Azure Portal

Big Data and Big Compute

The large amount of data can be stored and managed using Windows Azure. Azure offers HDInsight which is Hadoop-based service. Organizations often need to manage large amount of data which is necessarily not relational database management. Hadoop is a prominent technology used these days. Thus, Azure offers Hadoop service on their platform for clients.
The term ‘Big Compute’ refers to high performing computations. This is achieved by executing code on many machines at the same time.

Messaging

Windows Azure offers two options for handling the interactions between two apps. One falls under storage component of the service and is called 'Message Queues'. The other one comes under the app service and is called 'Service Bus'. The messages can be sent to initiate communication among different components of an application or among different applications using these two options.
Components Messaging

Caching

Microsoft Azure offers two kinds of caching which are in-memory Caching and Content Delivery Network (CDN) for caching frequently accessed data and improves the application performance. CDN is used to cache the blob data that will be accessed faster by users around the world.

Identity and Access

This component is about management of users, authentication and authorization. Active directory stores the information of users accessing the application and also the organization’s information. It can synchronize with the related information on local machines residing on premises. Multifactor Access (MFA) service is built to address the security concerns such as only the right user can access the application.
Components Identity and Access

Mobile Service

Windows Azure offers a very easy platform to develop mobile application. You can simply start using mobile development tools after logging into your account. You don’t have to write big custom codes for the mobile application if you use this service. The push notifications can be sent, data can be stored and users can be authenticated in very less time.
Components Mobile Service

Backup

The site recovery service replicates the data at secondary location as well as automates the process of recovery of data in case of data outage. Similarly Azure backup can be used to backing up the on premise data in clouds. Data is stored in encrypted mode in both the cases. Windows Azure offers a very effective and reliable backup service to clients and ensures they don’t face inconvenience in case of hardware failures.
Components Backup

Media

This service addresses multiple concerns related to uploading media and making it available to end users easily. Users can manage tasks related to the media like encoding, ad insertion, streaming, etc. easily.

Commerce

Windows Azure offers the opportunity to users to buy or sell applications and data through their platform. The applications are put in the marketplace or Azure store from where they can be accessed and bought by other users.

Software Development Kit (SDK)

Azure applications can be produced by the developers in various programming languages. Microsoft currently provides language-specific SDKs for Java, .NET, PHP, Node.js, Ruby, and Python. There is also a general Windows Azure SDK that supports language, such as C++.

Microsoft Azure - Windows




 
There are many cloud computing platforms offered by different organizations. Windows Azure is one of them, which is provided by Microsoft. Azure can be described as the managed data centers that are used to build, deploy, manage the applications and provide services through a global network. The services provided by Microsoft Azure are PaaS and IaaS. Many programming languages and frameworks are supported by it.

Azure as PaaS (Platform as a Service)

As the name suggests, a platform is provided to clients to develop and deploy software. The clients can focus on the application development rather than having to worry about hardware and infrastructure. It also takes care of most of the operating systems, servers and networking issues.

Pros

  • The overall cost is low as the resources are allocated on demand and servers are automatically updated.
  • It is less vulnerable as servers are automatically updated and being checked for all known security issues. The whole process is not visible to developer and thus does not pose a risk of data breach.
  • Since new versions of development tools are tested by the Azure team, it becomes easy for developers to move on to new tools. This also helps the developers to meet the customer’s demand by quickly adapting to new versions.

Cons

  • There are portability issues with using PaaS. There can be a different environment at Azure, thus the application might have to be adapted accordingly.

Azure as IaaS (Infrastructure as a Service)

It is a managed compute service that gives complete control of the operating systems and the application platform stack to the application developers. It lets the user to access, manage and monitor the data centers by themselves.

Pros

  • This is ideal for the application where complete control is required. The virtual machine can be completely adapted to the requirements of the organization or business.
  • IaaS facilitates very efficient design time portability. This means application can be migrated to Windows Azure without rework. All the application dependencies such as database can also be migrated to Azure.
  • IaaS allows quick transition of services to clouds, which helps the vendors to offer services to their clients easily. This also helps the vendors to expand their business by selling the existing software or services in new markets.

Cons

  • Since users are given complete control they are tempted to stick to a particular version for the dependencies of applications. It might become difficult for them to migrate the application to future versions.
  • There are many factors which increases the cost of its operation. For example, higher server maintenance for patching and upgrading software.
  • There are lots of security risks from unpatched servers. Some companies have welldefined processes for testing and updating on-premise servers for security vulnerabilities. These processes need to be extended to the cloud-hosted IaaS VMs to mitigate hacking risks.
  • The unpatched servers pose a great security risk. Unlike PaaS, there is no provision of automatic server patching in IaaS. An unpatched server with sensitive information can be very vulnerable affecting the entire business of an organization.
  • It is difficult to maintain legacy apps in Iaas. It can be stuck with the older version of the operating systems and application stacks. Thus, resulting in applications that are difficult to maintain and add new functionality over the period of time.
It becomes necessary to understand the pros and cons of both services in order to choose the right one according your requirements. In conclusion it can be said that, PaaS has definite economic advantages for operations over IaaS for commodity applications. In PaaS, the cost of operations breaks the business model. Whereas, IaaS gives complete control of the OS and application platform stack.

Azure Management Portal

Azure Management Portal is an interface to manage the services and infrastructure launched in 2012. All the services and applications are displayed in it and it lets the user manage them.

Getting started

A free trial account can be created on Azure management portal by visiting the following link - manage.windowsazure.com
The screen that pops up is as shown in the following image. The account can be created using our existing Gmail, Hotmail or Yahoo account.
Sign In To Azure
Once logged in, you will be redirected to the following screen, where there is a list of services and applications on the left panel.
Azure Management Portal
When you click on a category, its details are displayed on the screen. You can see the number of applications, virtual machine, mobile services and so on by clicking on the menu item.
The next chapter contains a detailed explanation of how to use this portal to manage Azure services.

Cloud Computing - Overview

Cloud Computing - Overview



 
 

The popular trend in today's technology driven world is ‘Cloud Computing’. Cloud computing can be referred to as the storing and accessing of data over the internet rather than your computer's hard drive. This means you don't access the data from either your computer's hard drive or over a dedicated computer network (home or office network). Cloud computing means data is stored at a remote place and is synchronized with other web information.
One prominent example of cloud computing is Office 365 which allows users to store, access, edit their MS Office documents online (in browser) without installing the actual program on their device.
Cloud Computing

Architecture of Cloud Computing

The architecture of cloud computing comprises of the following components −
  • Front-end device
  • Back-end platform
  • Cloud-based delivery
  • Network
Front-end Devices − These are basically the devices that are used by clients to access the data or program using the browser or special applications.
Back-end Platform − There are various computers, servers, virtual machines, etc. that combine to become a back-end platform.

Types of Cloud

The storage options on cloud is in 3 forms −
  • Public
  • Private
  • Hybrid
Types of Cloud
Public Cloud − A service provider makes the clouds available to the general public which is termed as a public cloud. These clouds are accessed through internet by users. These are open to public and their infrastructure is owned and operated by service providers as in case of Google and Microsoft.
Private Cloud − These clouds are dedicated to a particular organization. That particular organization can use the cloud for storing the company's data, hosting business application, etc. The data stored on private cloud can't be shared with other organizations. The cloud is managed either by the organization itself or by the third party.
Hybrid Cloud − When two or more clouds are bound together to offer the advantage of both public and private clouds, they are termed as Hybrid Cloud. Organizations can use private clouds for sensitive application, while public clouds for non-sensitive applications. The hybrid clouds provide flexible, scalable and cost-effective solutions to the organizations.

Benefits of Cloud

There are many benefits of clouds. Some of them are listed below.
  • Cloud service offers scalability. Allocation and de-allocation of resources is dynamically as per demand.
  • It saves on cost by reducing capital infrastructure.
  • It allows the user to access the application independent of their location and hardware configuration.
  • It simplifies the network and lets the client access the application without buying license for individual machine.
  • Storing data on clouds is more reliable as it is not lost easily.

SPI

Next comes how cloud services are categorized. S stand for Software, P stands for Platform and I for Infrastructure in SPI. SaaS is Software as a service; PaaS is Platform as a service and IaaS is Infrastructure as a Service.
SPI
Following are the live examples of these models.
  • SAAS Model − E-mail (Gmail, Yahoo, etc.)
  • PAAS Model − Microsoft Azure
  • IAAS Model − Amazon S3

Table of Contents








Windows Azure, which was later renamed as Microsoft Azure in 2014, is a cloud computing platform, designed by Microsoft to successfully build, deploy, and manage applications and services through a global network of datacenters. This tutorial explains various features of this flexible platform and provides a step-by-step description of how to use the same.

Audience

This tutorial has been designed for software developers who are keen on developing best-in-class applications using this open and advanced platform of Windows Azure.

Prerequisites

To learn Windows Azure, you need to be familiar with the Windows environment and have a basic knowledge of cloud computing.