Permalink
Browse files

Merge pull request #279 from WindowsAzure/dev

Windows Azure Management Libraries Preview
  • Loading branch information...
2 parents 511ae4b + 74f2453 commit 0e684fcb2901d9b297467266800dad6412708806 @jeffwilcox jeffwilcox committed Oct 22, 2013
Showing with 79,561 additions and 48 deletions.
  1. +36 −0 .gitattributes
  2. +11 −4 .gitignore
  3. +177 −24 README.md
  4. +6 −0 libraries/.nuget/NuGet.Config
  5. BIN libraries/.nuget/NuGet.exe
  6. +136 −0 libraries/.nuget/NuGet.targets
  7. +95 −0 libraries/WindowsAzureLibraries.sln
  8. +425 −0 libraries/libraries.msbuild
  9. +505 −0 libraries/packages/Microsoft.Bcl.Build.1.0.10/License-Stable.rtf
  10. BIN libraries/packages/Microsoft.Bcl.Build.1.0.10/Microsoft.Bcl.Build.1.0.10.nupkg
  11. 0 libraries/packages/Microsoft.Bcl.Build.1.0.10/content/net40/_._
  12. 0 libraries/packages/Microsoft.Bcl.Build.1.0.10/content/netcore45/_._
  13. 0 libraries/packages/Microsoft.Bcl.Build.1.0.10/content/portable-net40+win8+sl4+wp71/_._
  14. 0 libraries/packages/Microsoft.Bcl.Build.1.0.10/content/sl4-windowsphone71/_._
  15. 0 libraries/packages/Microsoft.Bcl.Build.1.0.10/content/sl4/_._
  16. +37 −0 libraries/packages/Microsoft.Bcl.Build.1.0.10/tools/Install.ps1
  17. BIN libraries/packages/Microsoft.Bcl.Build.1.0.10/tools/Microsoft.Bcl.Build.Tasks.dll
  18. +232 −0 libraries/packages/Microsoft.Bcl.Build.1.0.10/tools/Microsoft.Bcl.Build.targets
  19. +25 −0 libraries/packages/Microsoft.Bcl.Build.1.0.10/tools/Uninstall.ps1
  20. +146 −0 libraries/src/Common.NetFramework/CertificateCloudCredentials.cs
  21. +104 −0 libraries/src/Common.NetFramework/Common.NetFramework.csproj
  22. +102 −0 libraries/src/Common.NetFramework/Internals/PlatformConfigurationHelper.cs
  23. +39 −0 libraries/src/Common.NetFramework/Platform/CertificateCloudCredentialsProvider.cs
  24. +172 −0 libraries/src/Common.NetFramework/Platform/CloudConfigurationProvider.cs
  25. +28 −0 libraries/src/Common.NetFramework/Platform/CryptographyProvider.cs
  26. +28 −0 libraries/src/Common.NetFramework/Platform/HttpTransportHandlerProvider.cs
  27. +290 −0 libraries/src/Common.NetFramework/Platform/ServiceRuntimeReference.cs
  28. +35 −0 libraries/src/Common.NetFramework/Properties/AssemblyInfo.cs
  29. +72 −0 libraries/src/Common.NetFramework/Properties/Resources.Designer.cs
  30. +123 −0 libraries/src/Common.NetFramework/Properties/Resources.resx
  31. +8 −0 libraries/src/Common.NetFramework/packages.config
  32. +47 −0 libraries/src/Common/CloudClients.cs
  33. +64 −0 libraries/src/Common/CloudContext.cs
  34. +128 −0 libraries/src/Common/Common.csproj
  35. +325 −0 libraries/src/Common/Configuration/CloudConfiguration.cs
  36. +48 −0 libraries/src/Common/Configuration/ConnectionStringSettingsFormat.cs
  37. +46 −0 libraries/src/Common/Configuration/JsonSettingsFormat.cs
  38. +54 −0 libraries/src/Common/Credentials/CloudCredentials.cs
  39. +35 −0 libraries/src/Common/Credentials/SubscriptionCloudCredentials.cs
  40. +269 −0 libraries/src/Common/Exception/CloudException.cs
  41. +77 −0 libraries/src/Common/Exception/CloudHttpErrorInfo.cs
  42. +101 −0 libraries/src/Common/Exception/CloudHttpRequestErrorInfo.cs
  43. +90 −0 libraries/src/Common/Exception/CloudHttpResponseErrorInfo.cs
  44. +45 −0 libraries/src/Common/Handlers/ClientRequestTrackingHandler.cs
  45. +64 −0 libraries/src/Common/Handlers/LinearRetryHandler.cs
  46. +44 −0 libraries/src/Common/Handlers/RetryHandler.cs
  47. +141 −0 libraries/src/Common/Internals/CloudExtensions.cs
  48. +287 −0 libraries/src/Common/Internals/ConfigurationHelper.cs
  49. +344 −0 libraries/src/Common/Internals/ConnectionStringParser.cs
  50. +53 −0 libraries/src/Common/Internals/Cryptography.cs
  51. +69 −0 libraries/src/Common/Internals/DisposableReference.cs
  52. +380 −0 libraries/src/Common/Internals/HttpExtensions.cs
  53. +26 −0 libraries/src/Common/Internals/ICloudSettingsFormat.cs
  54. +36 −0 libraries/src/Common/Internals/IndisposableDelegatingHandler.cs
  55. +128 −0 libraries/src/Common/Internals/PortablePlatformAbstraction.cs
  56. +123 −0 libraries/src/Common/Internals/Tracing.cs
  57. +98 −0 libraries/src/Common/Internals/TypeConversion.cs
  58. +39 −0 libraries/src/Common/Models/OperationResponse.cs
  59. +36 −0 libraries/src/Common/Platform/ICloudConfigurationProvider.cs
  60. +35 −0 libraries/src/Common/Platform/ICloudCredentialsProvider.cs
  61. +25 −0 libraries/src/Common/Platform/ICryptographyProvider.cs
  62. +33 −0 libraries/src/Common/Platform/IHttpTransportHandlerProvider.cs
  63. +31 −0 libraries/src/Common/Properties/AssemblyInfo.cs
  64. +118 −0 libraries/src/Common/Properties/Resources.Designer.cs
  65. +139 −0 libraries/src/Common/Properties/Resources.resx
  66. +219 −0 libraries/src/Common/ServiceClient.cs
  67. +33 −0 libraries/src/Common/ServiceOperations.cs
  68. +122 −0 libraries/src/Common/Tracing/CloudTracing.cs
  69. +81 −0 libraries/src/Common/Tracing/ICloudTracingInterceptor.cs
  70. +15 −0 libraries/src/Common/app.config
  71. +8 −0 libraries/src/Common/packages.config
  72. +89 −0 libraries/src/ComputeManagement/ComputeManagement.csproj
  73. +81 −0 libraries/src/ComputeManagement/ComputeManagementClient.Customization.cs
  74. +40,150 −0 libraries/src/ComputeManagement/ComputeManagementClient.cs
  75. +31 −0 libraries/src/ComputeManagement/Properties/AssemblyInfo.cs
  76. +8 −0 libraries/src/ComputeManagement/packages.config
  77. BIN libraries/src/Keys/Development.snk
  78. BIN libraries/src/Keys/MSSharedLibKey.snk
  79. +89 −0 libraries/src/Management/Management.csproj
  80. +81 −0 libraries/src/Management/ManagementClient.Customization.cs
  81. +5,463 −0 libraries/src/Management/ManagementClient.cs
  82. +31 −0 libraries/src/Management/Properties/AssemblyInfo.cs
  83. +8 −0 libraries/src/Management/packages.config
  84. +87 −0 libraries/src/NetworkManagement/NetworkManagement.csproj
  85. +32 −0 libraries/src/NetworkManagement/Properties/AssemblyInfo.cs
  86. +93 −0 libraries/src/NetworkManagement/VirtualNetworkManagementClient.Customizations.cs
  87. +7,789 −0 libraries/src/NetworkManagement/VirtualNetworkManagementClient.cs
  88. +8 −0 libraries/src/NetworkManagement/packages.config
  89. +40 −0 libraries/src/PackageSpecs/Microsoft.WindowsAzure.Common.Dependencies.nuspec
  90. +54 −0 libraries/src/PackageSpecs/Microsoft.WindowsAzure.Common.nuspec
  91. +34 −0 libraries/src/PackageSpecs/Microsoft.WindowsAzure.Management.Compute.nuspec
  92. +32 −0 libraries/src/PackageSpecs/Microsoft.WindowsAzure.Management.Libraries.nuspec
  93. +34 −0 libraries/src/PackageSpecs/Microsoft.WindowsAzure.Management.Storage.nuspec
  94. +34 −0 libraries/src/PackageSpecs/Microsoft.WindowsAzure.Management.VirtualNetworks.nuspec
  95. +34 −0 libraries/src/PackageSpecs/Microsoft.WindowsAzure.Management.WebSites.nuspec
  96. +34 −0 libraries/src/PackageSpecs/Microsoft.WindowsAzure.Management.nuspec
  97. +109 −0 libraries/src/PackageSpecs/NuGetSpecs.proj
  98. +31 −0 libraries/src/StorageManagement/Properties/AssemblyInfo.cs
  99. +89 −0 libraries/src/StorageManagement/StorageManagement.csproj
  100. +81 −0 libraries/src/StorageManagement/StorageManagementClient.Customization.cs
  101. +3,722 −0 libraries/src/StorageManagement/StorageManagementClient.cs
  102. +8 −0 libraries/src/StorageManagement/packages.config
  103. +32 −0 libraries/src/WebSiteManagement/Properties/AssemblyInfo.cs
  104. +189 −0 libraries/src/WebSiteManagement/WebSiteCloudException.cs
  105. +89 −0 libraries/src/WebSiteManagement/WebSiteManagement.csproj
  106. +83 −0 libraries/src/WebSiteManagement/WebSiteManagementClient.Customization.cs
  107. +13,236 −0 libraries/src/WebSiteManagement/WebSiteManagementClient.cs
  108. +15 −0 libraries/src/WebSiteManagement/app.config
  109. +8 −0 libraries/src/WebSiteManagement/packages.config
  110. +71 −0 libraries/src/libraries.targets
  111. +20 −18 microsoft-azure-api/Configuration/Microsoft.WindowsAzure.Configuration/AzureApplicationSettings.cs
  112. BIN microsoft-azure-api/Configuration/Microsoft.WindowsAzure.Configuration/GlobalSuppressions.cs
  113. +5 −1 ...pi/Configuration/Microsoft.WindowsAzure.Configuration/Microsoft.WindowsAzure.Configuration.csproj
  114. +1 −1 ...ft-azure-api/Configuration/Microsoft.WindowsAzure.Configuration/{Utilities.cs → NativeMethods.cs}
  115. +2 −0 microsoft-azure-api/Configuration/Microsoft.WindowsAzure.Configuration/Properties/AssemblyInfo.cs
  116. +59 −0 tools/Microsoft.WindowsAzure.Build.Tasks/GetBuildVersionTask.cs
  117. +59 −0 tools/Microsoft.WindowsAzure.Build.Tasks/Microsoft.WindowsAzure.Build.Tasks.csproj
  118. +28 −0 tools/Microsoft.WindowsAzure.Build.Tasks/Microsoft.WindowsAzure.Build.Tasks.sln
  119. +33 −0 tools/Microsoft.WindowsAzure.Build.Tasks/Properties/AssemblyInfo.cs
  120. +71 −0 tools/Microsoft.WindowsAzure.Build.Tasks/RegexReplacementTask.cs
  121. +88 −0 tools/Microsoft.WindowsAzure.Build.Tasks/StrongNameUtility.cs
  122. +153 −0 tools/Microsoft.WindowsAzure.Build.Tasks/ValidateStrongNameSignatureTask.cs
  123. +55 −0 tools/Microsoft.WindowsAzure.Build.msbuild
View
@@ -0,0 +1,36 @@
+*.bmp binary
+*.dll binary
+*.gif binary
+*.jpg binary
+*.png binary
+*.snk binary
+*.exe binary
+*.wmv binary
+*.mp4 binary
+*.ismv binary
+*.isma binary
+
+*.ascx text
+*.cmd text
+*.config text
+*.cs text diff=csharp
+*.csproj text merge=union
+*.edmx text
+
+*.htm text
+*.html text
+
+*.js text
+*.json text
+
+*.msbuild text
+*.nuspec text
+
+*.resx text
+*.ruleset text
+*.StyleCop text
+*.targets text
+*.txt text
+*.xml text
+
+*.sln text eol=crlf merge=union
View
@@ -7,13 +7,11 @@
*.sln.docstates
# Build results
-
+binaries/
[Dd]ebug*/
[Rr]elease/
-
build/
-
[Tt]est[Rr]esult
[Bb]uild[Ll]og.*
@@ -51,6 +49,9 @@ ipch/
*.psess
*.vsp
+# Code analysis
+*.CodeAnalysisLog.xml
+
# Guidance Automation Toolkit
*.gpState
@@ -98,12 +99,18 @@ ClientBin
Generated_Code #added for RIA/Silverlight projects
+# Build tasks
+tools/*.dll
+
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
# NuGet
-packages/
/microsoft-azure-api/Services/Storage/Test/Unit/RT/AppPackages/
+libraries/packages
+
+# Mac development
+.DS_Store
View
@@ -1,11 +1,8 @@
-# Windows Azure SDK for .NET 4, Windows 8, and Windows Phone 8 (2.1.0.0)
+# Windows Azure SDK for .NET
The Windows Azure SDK for .NET allows you to build Windows Azure applications
that take advantage of scalable cloud computing resources.
-Please note that Windows 8 and Windows Phone 8 libraries are CTP (Community
-Technology Preview) releases.
-
This repository contains the open source subset of the .NET SDK. For documentation of the
complete SDK, please see the [Windows Azure .NET Developer Center](http://www.windowsazure.com/en-us/develop/net/).
@@ -20,11 +17,51 @@ complete SDK, please see the [Windows Azure .NET Developer Center](http://www.wi
- Create/Delete Queues
- Insert/Peek Queue Messages
- Advanced Queue Operations
+- Management Libraries
+ - Compute
+ - Infrastructure
+ - Storage
+ - Virtual Networks
- Media
> Available in separate [Media Services repository](http://github.com/WindowsAzure/azure-sdk-for-media-services/tree/master/src/net/Client)
-# Getting Started
+# Getting started
+
+The complete Windows Azure SDK can be downloaded from the [Windows Azure Downloads Page](http://www.windowsazure.com/en-us/downloads/?sdk=net) and ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more.
+
+For the best development experience, developers should use the official Microsoft NuGet packages for libraries. NuGet packages are regularly updated with new functionality and hotfixes.
+
+## Target Frameworks
+
+- .NET Framework 4.0: As of October 2013, the Windows Azure SDK for .NET (v2.2) supports primarily the desktop .NET Framework 4 release and above. For earlier .NET versions, SDK v2.1 is still supported.
+- Windows 8 for Windows Store app development: Storage Client Libraries are available for Windows Store applications.
+
+## Requirements
+
+- Windows Azure Subscription: To call Windows Azure services, you need to first [create an account](https://account.windowsazure.com/Home/Index). Sign up for a free trial or use your MSDN subscriber benefits.
+- Hosting: To host your .NET code in Windows Azure, you additionally need to download the full Windows Azure SDK for .NET - which includes packaging,
+ emulation, and deployment tools, or use Windows Azure Web Sites to deploy ASP.NET web applications.
+
+## Need Help?
+Be sure to check out the Windows Azure [Developer Forums on MSDN](http://go.microsoft.com/fwlink/?LinkId=234489) if you have trouble with the provided code or use StackOverflow.
+
+## Collaborate & Contribute
+
+We gladly accept community contributions.
+
+- Issues: Please report bugs using the Issues section of GitHub
+- Forums: Interact with the development teams on StackOverflow or the Windows Azure Forums
+- Source Code Contributions: Please follow the [contribution guidelines for Windows Azure open source](http://windowsazure.github.io/guidelines.html) that details information on onboarding as a contributor
+
+For general suggestions about Windows Azure please use our [UserVoice forum](http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting).
+
+# Storage Client Library for .NET 4, Windows 8, and Windows Phone 8 (2.1.0.0)
+
+The Storage Client Library ships with the Windows Azure SDK for .NET and also on NuGet. You'll find the latest version and hotfixes on NuGet via the `WindowsAzure.Storage` package. You can [read about the 2.1 release on the storage team blog post](http://blogs.msdn.com/b/windowsazurestorage/archive/2013/09/07/announcing-storage-client-library-2-1-rtm.aspx).
+
+Please note that Windows 8 and Windows Phone 8 libraries are CTP (Community
+Technology Preview) releases.
## Download & Install
@@ -40,22 +77,10 @@ cd azure-sdk-for-net
### Via NuGet
To get the binaries of this library as distributed by Microsoft, ready for use
-within your project you can also have them installed by the .NET package manager [http://www.nuget.org/](NuGet).
+within your project you can also have them installed by the .NET package manager [NuGet](http://www.nuget.org/).
`Install-Package WindowsAzure.Storage`
-## Target Frameworks
-
-- .NET Framework 3.5: At this time the majority of the Windows Azure SDK for .NET supports primarily the desktop .NET Framework 3.5 and above.
-- .NET Framework 4.0: Storage Client Library for .NET supports the desktop .NET Framework 4.0 and above.
-- Windows 8 for Windows Store app development: Storage Client Libraries are available for Windows Store applications.
-
-## Requirements
-
-- Windows Azure Subscription: To call Windows Azure services, you need to first [create an account](https://account.windowsazure.com/Home/Index). Free trial subscriptions are available.
-- Hosting: To host your .NET code in Windows Azure, you additionally need to download the full Windows Azure SDK for .NET - which includes packaging,
- emulation, and deployment tools, or use Windows Azure Web Sites to deploy ASP.NET web applications.
-
## Dependencies
### OData
@@ -117,15 +142,143 @@ CloudTable peopleTable = tableClient.GetTableReference("people");
peopleTable.Create();
```
-# Need Help?
-Be sure to check out the Windows Azure [Developer Forums on MSDN](http://go.microsoft.com/fwlink/?LinkId=234489) if you have trouble with the provided code or use
-StackOverflow.
+# Windows Azure Management Libraries
-# Feedback
+Automate, configure and command your Windows Azure deployments, infrastructure and accounts with the Windows Azure Management Libraries.
-For feedback related specificically to these open source client libraries, please use the Issues section of the repository.
+> *Preview:* At this time the Windows Azure Management Libraries are in the preview state as the teams gather feedback and prepare for the initial release. Please enjoy using the libraries and source in any capacity, but understand that there may be breaking changes with the 1.0 release.
-For general suggestions about Windows Azure please use our [UserVoice forum](http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting).
+## Download & Install
+
+### Via Git
+
+To get the source code of the SDK via git just type:
+
+```bash
+git clone git://github.com/WindowsAzure/azure-sdk-for-net.git
+cd azure-sdk-for-net\libraries
+```
+
+### Via NuGet
+
+Official binaries are distributed by Microsoft and available using the .NET package manager [NuGet](http://www.nuget.org/).
+
+To get all of the management libraries setup in your project:
+
+`Install-Package Microsoft.WindowsAzure.Management.Libraries -IncludePrerelease`
+
+> You can also install just the management library for a service of interest. To deploy a virtual machine to the cloud, the `Microsoft.WindowsAzure.Management.Compute` package can be used, for example.
+
+### Code Samples
+
+This code would result with a list of the regions in the Windows Azure fabric. The location object provided in the result provides properties to define which assets are supported by each region.
+
+```csharp
+using (ManagementClient client = CloudContext.Clients.CreateManagementClient(Credentials))
+{
+ var result = await client.Locations.ListAsync();
+ var locations = result.Locations;
+ foreach (var location in locations)
+ {
+ Console.WriteLine("Location: {0}", location.Name);
+
+ foreach (var feature in location.AvailableServices)
+ {
+ Console.WriteLine(feature);
+ }
+ }
+}
+```
+
+To create a storage account,The code below will create a storage account in the West US region.
+
+```csharp
+var storageAccountName = "mystorageaccount";
+
+using (StorageManagementClient client =
+ CloudContext.Clients.CreateStorageManagementClient(Credentials))
+{
+ await client.StorageAccounts.CreateAsync(
+ new StorageAccountCreateParameters
+ {
+ ServiceName = storageAccountName,
+ Location = LocationNames.WestUS
+ });
+}
+```
+
+The code below will obtain the storage account keys to construct a connection string on the fly.
+
+```csharp
+var storageAccountName = "mystorageaccount";
+
+using (StorageManagementClient client =
+ CloudContext.Clients.CreateStorageManagementClient(Credentials))
+{
+ var keys = await
+ client.StorageAccounts.GetKeysAsync(storageAccountName);
+
+ string connectionString = string.Format(
+ CultureInfo.InvariantCulture,
+ "AcountName={0};AccountKey={1}",
+ storageAccountName, keys.SecondaryKey);
+
+ return connectionString;
+}
+```
+
+The following code will create a new (empty) Cloud Service in the Windows Azure fabric.
+
+```csharp
+var cloudServiceName = "MyCloudService";
+
+using (ComputeManagementClient client =
+ CloudContext.Clients.CreateComputeManagementClient(Credentials))
+{
+ await client.HostedServices.CreateAsync(
+ new HostedServiceCreateParameters
+ {
+ ServiceName = cloudServiceName,
+ Location = LocationNames.WestUS
+ });
+}
+```
+
+Once a storage account has been created, the Windows Storage SDK can be used to upload .CSPKG files into the storage account. Then, the cloud service could be deployed. The code below demonstrates this functionality.
+
+```csharp
+var blobs = CloudStorageAccount.Parse(storageConnectionString).CreateCloudBlobClient();
+
+var container = blobs.GetContainerReference("deployments");
+
+await container.CreateIfNotExistsAsync();
+
+await container.SetPermissionsAsync(
+ new BlobContainerPermissions()
+ {
+ PublicAccess = BlobContainerPublicAccessType.Container
+ });
+
+var blob = container.GetBlockBlobReference("MyCloudService.cspkg");
+
+await blob.UploadFromFileAsync("MyCloudService.cspkg", FileMode.Open);
+
+var cloudServiceName = "MyCloudService";
+
+using (ComputeManagementClient client =
+ CloudContext.Clients.CreateComputeManagementClient(Credentials))
+{
+ await client.Deployments.CreateAsync(cloudServiceName,
+ DeploymentSlot.Production,
+ new DeploymentCreateParameters
+ {
+ Name = cloudServiceName + "Prod",
+ PackageUri = blob.Uri,
+ Configuration = File.ReadAllText("MyCloudService.cscfg"),
+ StartDeployment = true
+ });
+}
+```
# Learn More
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <solution>
+ <add key="disableSourceControlIntegration" value="true" />
+ </solution>
+</configuration>
Binary file not shown.
Oops, something went wrong.

0 comments on commit 0e684fc

Please sign in to comment.