Service management Dec 11
Upcoming SlideShare
Loading in...5

Service management Dec 11



A short description of the Windows Azure Service Management API

A short description of the Windows Azure Service Management API



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Service management Dec 11 Service management Dec 11 Presentation Transcript

  • Azure Service Management API A journey ending in billing, monitoring and usage
  • What are we going to learn?• How Visual Studio deploys under the covers• How to use tools and scripts to automate parts of the deployment• How to monitor asynchronous operations in a deployment• The fundamentals of how we interact Azure beneath all of the libraries and layers of abstraction• A small part of the Service Management API – there is much more SO does this interest me enough to work on a group Codeplex project?
  • What can I manage?• Hosted services• Storage accounts• Affinity groups• Security (X509v3 certificates)• Subscription history• Access Control Services
  • What tools can I use to manage?• The management portal!• Windows Azure Powershell CmdLets• The Azure MMC SnapIn• Visual Studio.NET• Third party tools such as those by Neudesic, Cerebrata, Paraleap and others• An RDP Client• Any device!
  • What do we mean by Management?• Create-Read-Update-Delete (CRUD)• Manage transaction security• Checking full audit history• Locations and “affinity groups”• Accessing and managing storage accounts• Track asynchronous long running operations• Get information about the host operating• Managing Access Control Services
  • Management API details• RESTful (REpresentational State Transfer)• Use of OData (ACS Management)• Use of HTTP and multiple verbs – GET, PUT, POST, DELETE• Endpoints are HTTPS protecting data in transit• Each request needs a “Management Certificate” attached for authentication purposes
  • Management Examples (CRUD)• Listing hosted services – GET[subscription id]/services/hostedservices HTTP/1.1• Creating a hosted service – POST[subscription id]/services/hostedservices HTTP/1.1• Deleting a hosted service – DELETE[subscription id]/services/hostedservices/[SERVICE NAME] HTTP/1.1• Updating a hosted Service – PUT[subscription id]/services/hostedservices/[SERVICE NAME] HTTP/1.1
  • What else goes into the request?• Header x-ms-version: 2011-10-01• Content-type: application/xml• X509v3 certificate• Either blank request OR• XML Document with well known schema
  • DEMOCreating and Deleting a Hosted Service Programmatically
  • My Request Message<?xml version="1.0" encoding="utf-8"?><CreateHostedServicexmlns=""> <ServiceName>lwaugtest1.bad</ServiceName> <Label>djE=</Label> <Description>this is the first test service for the user group</Description> <Location>North Europe</Location></CreateHostedService>
  • My Response ExceptionHTTP/1.1 400 Bad RequestContent-Length: 194Content-Type: application/xml; charset=utf-8Server: Microsoft-HTTPAPI/2.0x-ms-request-id: 3badf9cdddc540cd922993fa01598297Date: Mon, 05 Dec 2011 18:16:45 GMT<Error xmlns=""xmlns:i=""><Code>BadRequest</Code><Message>The hostedservice name is invalid.</Message></Error>
  • DEMOCreating and Deleting a Hosted Service with Powershell
  • Steps to Using Powershell CmdLets to Deploy• Generate a certificate with the following command: – makecert -r -pe -n "CN=Richards New Cert" -a sha1 -len 2048 -ss My "C:richard2.cer“• Add the certificate through the management portal• Open powershell after CmdLets are installed and enter: – Add-PSSnapin AzureManagementToolsSnapIn• Create new Blob container via Storage Services API• Upload .cspkg to Blob Storage• Enter the following into Powershell: – New-Deployment -serviceName lwaugtestone -subscriptionId edd1c493-f3f5-42d0-ba03- 7bf1eb2cfcaa -certificate (get-item cert:CurrentUserMY7A67E9C2225C4930CBFCEF869C993EB560A3B1A4) -slot production – package -configuration "C:ProjectsTech ProjectsLondon Windows Azure User GroupHelloCloudHelloCloudbinReleaseapp.publishServiceConfiguration.Cloud.cscfg" - label lwaugtestone• Followed by: – Set-DeploymentStatus -subscriptionId edd1c493-f3f5-42d0-ba03-7bf1eb2cfcaa -certificate (get-item cert:CurrentUserMY7A67E9C2225C4930CBFCEF869C993EB560A3B1A4) - ServiceName lwaugtestone -Status Running -slot Production
  • DEMOUsing Fiddler to check on a Deployment
  • Steps to Using Fiddler and Azure• Use Request Builder• Add certificate file to C:UsersxxxMy DocsFiddler2ClientCertificate.cer• Add the ms-version-x header• Request the following: – GET 42d0-ba03-7bf1eb2cfcaa/operations/[token] HTTP/1.1• Look for an InProgress or Succeeded response
  • Summary• Service Management is web friendly, open, platform independent and standardised• There are a variety of tools and APIs available to manage services• RESTful services mean you can manage from ANY client application• Ability to create complex continuous integration testing scenarios and deployments with staging and production environments• Ability to manage multiple subscriptions simultaneously• No real constraint on the activities that can be accomplished• All transactions are fully secure
  • Azure Service Manager is an enterprise application which provides an subscriber-based API through WCF to allow clients to collect information on multiple Azure subscriptions, including hosted services, SQL Azure and storage services. It provides service, usage and billing data.
  • Azure Service Manager