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...
What can I manage?•   Hosted services•   Storage accounts•   Affinity groups•   Security (X509v3 certificates)•   Subscrip...
What tools can I use to manage?• The management portal!• Windows Azure Powershell CmdLets• The Azure MMC SnapIn• Visual St...
What do we mean by Management?•   Create-Read-Update-Delete (CRUD)•   Manage transaction security•   Checking full audit h...
Management API details• RESTful (REpresentational State Transfer)• Use of OData (ACS Management)• Use of HTTP and multiple...
Management Examples (CRUD)• Listing hosted services   – GET http://management.core.windows.net/[subscription     id]/servi...
What else goes into the request?•   Header x-ms-version: 2011-10-01•   Content-type: application/xml•   X509v3 certificate...
DEMOCreating and Deleting a Hosted   Service Programmatically
My Request Message<?xml version="1.0" encoding="utf-8"?><CreateHostedServicexmlns="http://schemas.microsoft.com/windowsazu...
My Response ExceptionHTTP/1.1 400 Bad RequestContent-Length: 194Content-Type: application/xml; charset=utf-8Server: Micros...
DEMOCreating and Deleting a Hosted   Service with Powershell
Steps to Using Powershell CmdLets to                   Deploy•   Generate a certificate with the following command:     – ...
DEMOUsing Fiddler to check on a       Deployment
Steps to Using Fiddler and Azure• Use Request Builder• Add certificate file to C:UsersxxxMy  DocsFiddler2ClientCertificate...
Summary• Service Management is web friendly, open, platform  independent and standardised• There are a variety of tools an...
http://azuresm.codeplex.com  Azure Service Manager is an enterprise application which provides an subscriber-based API thr...
Azure Service Manager
Upcoming SlideShare
Loading in …5
×

Service Management Dec 11

294
-1

Published on

This is a London Windows Azure Group Presentation for December 11 on the Windows Azure Service Management API

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
294
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Service Management Dec 11

  1. 1. Azure Service Management API A journey ending in billing, monitoring and usage
  2. 2. 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?
  3. 3. What can I manage?• Hosted services• Storage accounts• Affinity groups• Security (X509v3 certificates)• Subscription history• Access Control Services
  4. 4. 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!
  5. 5. 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
  6. 6. 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
  7. 7. Management Examples (CRUD)• Listing hosted services – GET http://management.core.windows.net/[subscription id]/services/hostedservices HTTP/1.1• Creating a hosted service – POST http://management.core.windows.net/[subscription id]/services/hostedservices HTTP/1.1• Deleting a hosted service – DELETE http://management.core.windows.net/[subscription id]/services/hostedservices/[SERVICE NAME] HTTP/1.1• Updating a hosted Service – PUT http://management.core.windows.net/[subscription id]/services/hostedservices/[SERVICE NAME] HTTP/1.1
  8. 8. 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
  9. 9. DEMOCreating and Deleting a Hosted Service Programmatically
  10. 10. My Request Message<?xml version="1.0" encoding="utf-8"?><CreateHostedServicexmlns="http://schemas.microsoft.com/windowsazure"> <ServiceName>lwaugtest1.bad</ServiceName> <Label>djE=</Label> <Description>this is the first test service for the user group</Description> <Location>North Europe</Location></CreateHostedService>
  11. 11. 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="http://schemas.microsoft.com/windowsazure"xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>BadRequest</Code><Message>The hostedservice name is invalid.</Message></Error>
  12. 12. DEMOCreating and Deleting a Hosted Service with Powershell
  13. 13. 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 http://lwaugbe.blob.core.windows.net/packages/HelloCloud.cspkg -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
  14. 14. DEMOUsing Fiddler to check on a Deployment
  15. 15. 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 https://management.core.windows.net/edd1c493-f3f5- 42d0-ba03-7bf1eb2cfcaa/operations/[token] HTTP/1.1• Look for an InProgress or Succeeded response
  16. 16. 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
  17. 17. http://azuresm.codeplex.com 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.
  18. 18. Azure Service Manager
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×