Okay, so I know the naming convention is pretty pants but I wanted to make another release. Version 0.4 will include a hosted service delete feature, automatic checks of hosted lists and blob container existance checks, propogation of exceptions from WebExceptions (which are currently suppressed) and enablement of Remote Desktop.

The roadmap for v 0.5 is about a month away but will include an orchestration engine and addition of plugins and new config settings. Remember, this library is still in beta so don’t use this in a production release until we say so!

Firstly we’ll review the new read infosets. This will get the current subscription information:

 var subscriptionManager = new SubscriptionManager(TestConstants.SubscriptionId);
 var subscriptionInformation = subscriptionManager.GetSubscriptionDetailsManager()
                .AddCertificateFromStore(TestConstants.ManagementThumbprint)
                .GetSubscriptionInformation();

This will return the locations available under your subscription. Useful if your subscription is free and is pinned to a particular territory.

 var subscriptionInformation = subscriptionManager.GetSubscriptionDetailsManager()
                .AddCertificateFromStore(TestConstants.ManagementThumbprint)
                .GetSubscriberLocations();

To get a list of hosted services you can use the following:

 var hostedService = subscriptionManager.GetDeploymentManager()
                .ForServiceInformationQuery()
                .UseExistingBuild()
                .AddCertificateFromStore(TestConstants.ManagementThumbprint)
                .GetHostedServiceList();

However, by far the most useful feature is the automatic addition of SSL to package and config. I’m a little tired now but this was not an easy thing to do and required several steps some of which I’ll share over the next few months.

var subscriptionManager = new SubscriptionManager(TestConstants.SubscriptionId);

            var deploymentManager = subscriptionManager.GetDeploymentManager();
            ((DeploymentManager)deploymentManager).AzureTaskComplete += TestConstants.TaskComplete;

            deploymentManager.ForNewDeployment(TestConstants.DeploymentName)
                .SetBuildDirectoryRoot(TestConstants.ProjectBuildRoot)
                .Rebuild()
                .EnableSslForRole(TestConstants.RoleNameHellocloudWeb)
                .UploadExistingServiceCertificate(TestConstants.ManagementThumbprint, "xxxxxxx")
                .AddCertificateFromStore(TestConstants.ManagementThumbprint)
                .WithNewHostedService(TestConstants.HostedServiceName)
                .WithStorageConnectionStringName(TestConstants.ConnectionStringName)
                .AddDescription("My new hosted services")
                .AddEnvironment(DeploymentSlot.Production)
                .AddLocation(Constants.LocationNorthEurope)
                .AddParams(DeploymentParams.StartImmediately)
                .ForRole(TestConstants.RoleNameHellocloudWeb)
                .WithInstanceCount(2)
                .Go();

The above example would create a hosted service and deployment and add SSL to it. It would allow the uploading of a Service Certificate. In many ways, however, when testing the certificate might not be available so you can replace the UploadExistingServiceCertificate with this:

.GenerateAndAddServiceCertificate("helloelastacloud.cloudapp.net")
 

And this will generate the appropriate certificate. In order to actually do this the library needs to rebuild the package from source with new build definitions and cloud config. A lot of refactoring has gone on with the lib so I hope you enjoy the updates. It’s getting that time of night now where I’m sort of slumped over the keyboard and mistyping every third letter. Leave it another 10 minutes and my keyboard will be full of drool so just to say I’m happy that this is a semi-stable release and I’ll upload the new package to nuget tomorrow morning.

Lastly, there is some licensing information in the library which explains the terms of use. Contact us if there are any problems but it’s fairly open, commercial reditribution usage should get in touch as per the terms etc. etc.