Your SlideShare is downloading. ×
Service Management Dec 11
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Service Management Dec 11

232

Published on

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

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
232
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Azure Service Management API A journey ending in billing, monitoring and usage
  • 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. What can I manage?• Hosted services• Storage accounts• Affinity groups• Security (X509v3 certificates)• Subscription history• Access Control Services
  • 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. 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. 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. 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. 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. DEMOCreating and Deleting a Hosted Service Programmatically
  • 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. 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. DEMOCreating and Deleting a Hosted Service with Powershell
  • 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. DEMOUsing Fiddler to check on a Deployment
  • 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. 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. 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. Azure Service Manager

×