Introduction to Microsoft Azure Cloud services
A look into Microsoft's Azure Cloud services and how things work in it.
The previous article can be read here.
As we’ve already seen, Windows Azure has different execution models for running applications – with each one providing a different set of services, thus allowing the user to choose the one ideal for him/her. We’ve talked about Virtual Machines and Web Sites before, so now we’re going to talk about Cloud Services.
What is a cloud service?
A cloud service – known as a hosted service in earlier Azure releases – primarily lets the user deploy a multi-tier web application in Azure, allowing flexible scaling of the application, and also defining multiple roles to distribute processing amongst. Along with Web sites, Cloud services comprise the PaaS (Platform as a Service) aspect of the offerings of Windows Azure. They are basically containers of various hosted applications – which could be private processing engines as a backend of your own service, or these could be front-end web applications such as websites or e-commerce solutions. Cloud Services are basically designed to support applications that are scalable, cheap, and easy to operate, without the need for the developers to worry about managing the platform they’re using. There are specific SDKs (Software Development Kits) started by Microsoft for languages such as.NET, Java, Python to aid developers in writing code for cloud services. However, since Microsoft published the source code for their client libraries on GitHub, most other popular languages are also supported through various open source projects.
Why a Cloud Service?
While Azure web sites are perfect for deploying web apps, Azure cloud service gives you a higher amount of control while helping in maintaining the infrastructure for you, performing routine maintenance and the likes. With Virtual Machines, although you get maximum control of the application, there is a lot of maintenance effort that would be required to patch, update and manage the VM environment. For a cloud service however, if the user defines at least two instances of every role, most operations such as maintenance, or service upgradation, would be taken care of by the platform without any interruption in service. Therefore, if you’re looking at a middle ground where you’re looking at lesser management effort required compared to a VM, but more control relative to a web site, then a cloud service is for you.
The working of a Cloud Service, and its advantages
Although Azure uses Virtual Machines even with Cloud Services, the major difference with a PaaS over an IaaS is that instead of creating the Virtual machines, the user just needs to configure them to his/her liking. The user has flexibility in terms of the number of Virtual Machines – worker role instances, and web roles instances – and also what size the VMs should be. And if ever your application is under heavy load, the user can ask for more VMs, and vice versa.
With a Cloud Service, the application is first put onto the staging area, and when the developer is ready to deploy the application, then he/she can request the platform to put it into production. There is no downtime between staging and production making it ideal for upgrading your application without affecting the users. Cloud Services also provide monitoring which – like Virtual Machines – will detect failed physical servers and restart the VMs on a new machine, and can also detect failed VMs and applications, being able to start new VMs and app instances when failures occur.
Now we will cover how to create and deploy a Cloud Service using Quick Create.
Getting started
Before we start with the creation of the Cloud Service, the user will need to ensure that he/she has the Azure SDK for the platform of choice. These are available at the Azure downloads page (link below) where the SDKs for platforms including .NET, JAVA, Node.js, PHP, Python, Ruby, and mobile platforms are available.
Link: http://azure.microsoft.com/en-us/downloads/
Also, the user has to create an account with Microsoft Azure, if not already done. Once logged in, we get to…
Creating a Cloud Service
After logging in to the windows Azure portal, a list of options would pop up – click on the New>Compute>Cloud Services option.
Here it is possible to create a Quick Cloud service and configure it again later or create a custom cloud service by choosing configuration.
For demonstrational purposes, let’s create a Quick Cloud service with parameters such as URL, Region or Affinity Group, and Subscription. Click Create a Cloud Service which will lead you to this screen.
You can use the quick create, choose your URL and subscription. If you’re using the free trial it will show up here. Once the required details are entered, click on Create Cloud Service
The Cloud Services area opens, with the new cloud service displayed, and the service just created should be listed under whatever the user named it. When the status changes to Created, cloud service creation has completed successfully.
There, it’s that simple. Now to the next step – since it’s a two stage process – which is deploying the cloud service.
Deploying the Cloud Service
• To deploy our Cloud Service, we have to Create a Package, choose our Service Configuration and Build Configuration and note the output directory or remove files to our custom directory.
• Go to Management Portal>CloudServices>*Name of the Cloud Service*>Dashboard. This opens up the production environment.
• Click either Upload a new production deployment or Upload. In Deployment label, enter a name for the new deployment. Browse to select the service package file and the service configure file to use.
• And then click OK (The Checkmark) to start the deployment. And that’s it – The cloud service has now been deployed.
You can read our introductory slideshow here