Wednesday, July 04, 2012

Windows Azure and Cloud Computing Posts for 7/2/2012+

A compendium of Windows Azure, Service Bus, EAI & EDI,Access Control, Connect, SQL Azure Database, and other cloud-computing articles. image222

image433

• Updated 7/4/2012 3:00 PM PDT with articles marked .

Note: This post is updated daily or more frequently, depending on the availability of new articles in the following sections:


Azure Blob, Drive, Table, Queue and Hadoop Services

Richard Conway (@azurecoder) posted Copying Azure Blobs from one subscription to another with API 1.7.1 on 7/4/2012:

imageThis is a great feature!

I read Gaurav Mantri’s excellent blog post on copying blobs from S3 to Azure Storage and realised we need that this had been the feature we’d been looking for ourselves for a while. The new 1.7.1. API enables copying from one subscription to another, intra-storage account or even inter-data centre OR as Gaurav has shown between Azure and another storage repo accessible via HTTP. Before this was enabled the alternative to write a tool read the blob into a local store and then upload to another account generating ingress/charges and adding a third unwanted wheel. You need to hit Azure on GitHub – as yet it’s not released as a nuget package. So go here and clone the repo and compile the source.

More on code later but for now let’s consider how this is being done.

Imagine we have two storage accounts, elastaaccount1 and elastaaccount2 and they are both in different subscriptions but we need to copy a package from one subscription (elastaaccount1) to another (elastaaccount2) using the new method described above.

Initially the API uses an HTTP PUT method with the new HTTP header x-ms-copy-source which allows elastaaccount2 to specify an endpoint to copy the blob from. Of course, in this instance we’re assuming that there is not security on this and the ACL is opened up to the public but it may be the case that this isn’t so in which case a Share Access Signature should be used which can be generated fairly easily in code from the source account and appended to the URL to allow the copy to ensue on a non-publicly accessible Blob.

PUT http://elastaaccount2.blob.core.windows.net/vanilla/mypackage.zip?timeout=90 HTTP/1.1
x-ms-version: 2012-02-12
User-Agent: WA-Storage/1.7.1
x-ms-copy-source: http://elastaaccount1.blob.core.windows.net/vanilla/mypackage.zip
x-ms-date: Wed, 04 Jul 2012 16:39:19 GMT
Authorization: SharedKey elastastorage3:<my shared key>
Host: elastaaccount3.blob.core.windows.net

This operations returns a 202 Accepted. The API will then poll asynchronously since this is queued and then use the HEAD method to determine the status. The product team on their blog that there is no SLA currently so you can have this sitting in a queue without an ackowledgement from Microsoft BUT in all our tests it is very, very quick within the same data centre.

HEAD http://elastaaccount1.blob.core.windows.net/vanilla/mypackage.zip?timeout=90 HTTP/1.1
x-ms-version: 2012-02-12
User-Agent: WA-Storage/1.7.1
x-ms-date: Wed, 04 Jul 2012 16:32:16 GMT
Authorization: SharedKey elastaaccount1:<mysharedkey>
Host: elastaaccount1.blob.core.windows.net

Bless the Fabric – this is an incredibly useful feature. Here is a class that might help save you some time now.

///<summary> 
/// Used to define the properties of a blob which should be copied to or from
/// </summary>
public class BlobEndpoint
 {
 ///<summary> 
 /// The storage account name
 /// </summary>
 private readonly string _storageAccountName = null;
 ///<summary> 
 /// The container name 
 /// </summary>
 private readonly string _containerName = null;
 ///<summary> 
 /// The storage key which is used to
 /// </summary>
 private readonly string _storageKey = null;
 /// <summary> 
 /// Used to construct a blob endpoint
 /// </summary>
 public BlobEndpoint(string storageAccountName, string containerName = null, string storageKey = null)
 {
   _storageAccountName = storageAccountName;
   _containerName = containerName;
   _storageKey = storageKey;
 }

///<summary> 
/// Used to a copy a blob to a particular blob destination endpoint - this is a blocking call
/// </summary>
public int CopyBlobTo(string blobName, BlobEndpoint destinationEndpoint)
{
   var now = DateTime.Now;
   // get all of the details for the source blob
   var sourceBlob = GetCloudBlob(blobName, this);
   // get all of the details for the destination blob
   var destinationBlob = GetCloudBlob(blobName, destinationEndpoint);
   // copy from the destination blob pulling the blob
   destinationBlob.StartCopyFromBlob(sourceBlob);
   // make this call block so that we can check the time it takes to pull back the blob
   // this is a regional copy should be very quick even though it's queued but still make this defensive
   const int seconds = 120;
   int count = 0;
   while (count < (seconds * 2))
   {
     // if we succeed we want to drop out this straight away
     if (destinationBlob.CopyState.Status == CopyStatus.Success)
        break;
     Thread.Sleep(500);
     count++;
   }
   //calculate the time taken and return
   return (int)DateTime.Now.Subtract(now).TotalSeconds;
}

///<summary> 
/// Used to determine whether the blob exists or not
/// </summary>
public bool BlobExists(string blobName)
{
   // get the cloud blob
   var cloudBlob = GetCloudBlob(blobName, this);
   try
   {
      // this is the only way to test
      cloudBlob.FetchAttributes();
   }
   catch (Exception)
   {
   // we should check for a variant of this exception but chances are it will be okay otherwise - that's defensive programming for you!
     return false;
   }
   return true;
}

///<summary> 
/// The storage account name
/// </summary>
public string StorageAccountName
{
   get { return _storageAccountName; }
}

///<summary> 
/// The name of the container the blob is in
/// </summary>
public string ContainerName
{
   get { return _containerName; }
}

///<summary> 
/// The key used to access the storage account
/// </summary>

public string StorageKey
{
   get { return _storageKey; }
}

///<summary> 
/// Used to pull back the cloud blob that should be copied from or to
/// </summary>
private static CloudBlob GetCloudBlob(string blobName, BlobEndpoint endpoint)
{
   string blobClientConnectString = String.Format("http://{0}.blob.core.windows.net", endpoint.StorageAccountName);
   CloudBlobClient blobClient = null;
   if(endpoint.StorageKey == null)
     blobClient = new CloudBlobClient(blobClientConnectString);
   else
   {
      var account = new CloudStorageAccount(new StorageCredentialsAccountAndKey(endpoint.StorageAccountName, endpoint.StorageKey), false);
      blobClient = account.CreateCloudBlobClient();
   }
   return blobClient.GetBlockBlobReference(String.Format("{0}/{1}", endpoint.ContainerName, blobName));
 }
}

The class itself should be fairly self-explanatory and should only be used with public ACLs although the modification is trivial.

A simple test would be as follows:

  var copyToEndpoint = new BlobEndpoint("elastaaccount2", ContainerName, "<secret primary key>");
  var endpoint = new BlobEndpoint("elastaaccount1", ContainerName);
  bool existsInSource = endpoint.BlobExists(BlobName);
  bool existsFalse = copyToEndpoint.BlobExists(BlobName);
  endpoint.CopyBlobTo(BlobName, copyToEndpoint);
  bool existsTrue = copyToEndpoint.BlobExists(BlobName);

Andrew Brust (@andrewbrust) asserted “June was a big month for the cloud and for Hadoop. It was also a big month for the intersection of the two” in a deck for his Hadoop in the Cloud with Amazon, Google[, Microsoft] and MapR article of 7/2/2012 for ZDNet’s Big on Data blog:

imageJune of 2012 was a big month for the cloud. On June 7th, Microsoft re-launched its Windows Azure cloud platform, which now features a full-fledged Infrastructure as a Service (IaaS) offering that accommodates both Windows and Linux. Then on June 28, Google, at its I/O conference, launched Google Compute Engine, its own IaaS cloud platform.

image_thumb3_thumbJune was also a big month for Hadoop. The Hadoop Summit took place in San Jose, CA on June 13th and 14th. Yahoo offshoot Hortonworks used the event as the launchpad for its own Hadoop distribution, dubbed the Hortonworks Data Platform (HDP). Hortonworks will now work to achieve the same prominence for HDP as Cloudera has achieved for its Cloudera Distribution including Apache Hadoop (CDH).

Don't forget MapR
imageThe Hadoop world isn't all about CDH and HDP though. Another important distribution out there is the one from MapR, which seeks to make the Hadoop Distributed File System more friendly and addressable as a Network File Storage volume. This HDFS-to-NFS translation gives HDFS files the read/write random access taken for granted with conventional file systems.

imageMapR trails Cloudera's distribution by quite a lot, however. And Hortonworks' distro will probably overtake it quickly, as well. But don't write MapR off just yet, because in the last couple of weeks it has emerged as an important piece of the Hadoop cloud puzzle.

MapR-ing the cloud
imageOn June 16th, Amazon announced that in addition to its own Hadoop distribution, it now provides the option to use MapR's distro on the temporary clusters provisioned through its Elastic MapReduce service, hosted within its Elastic Compute Cloud (EC2). Customers can use the "M3" open source community edition of MapR or the Enterprise edition, known as "M5." M5 carries a non-trivial surcharge but offers Enterprise features like mirrored clusters and the ability to create snapshot-style backups of your cluster.

MapR didn't stop there. Instead, it continued its June cloud crusade, by announcing on June 28th at Google I/O a private beta of its Hadoop distribution running on the Google Compute Engine cloud. Suddenly the Hadoop distro that many considered an also-ran has become the poster child for Big Data in the cloud.

Cloud Hadoop by Microsoft, or even by yourself
image_thumb11Is that enough Hadoop in the cloud for you? If not, don't forget the Microsoft-Hortonworks Hadoop distro for Windows, now available through an invitation-only beta on its Azure cloud. And if you're still not satisfied, check out the Apache Whirr project, which lets you deploy virtually any Hadoop distribution to clusters built from cloud servers on Amazon Web Services or Rackspace Cloud Servers.

Hadoop in the cloud isn't always easy, especially since most cloud platforms have their own BLOB storage facilities that only a cloud vendor-tuned distribution can typically handle. But Hadoop in the cloud makes a great deal of sense: the elastic resource allocation that cloud computing is premised on works well for cluster-based data processing infrastructure used on varying analyses and data sets of indeterminate size.

Hadoop in the cloud is likely to get increasingly popular. In the future it will be interesting to see if the Hadoop distribution vendors, or the cloud platform vendors, will be the ones to lead the charge.


Lynn Langit (@lynnlangit) wrote a Hadoop on Windows Azure post for MSDN Magazine’s July 2012 issue. From the introduction:

imageThere’s been a lot of buzz about Hadoop lately, and interest in using it to process extremely large data sets seems to grow day by day. With that in mind, I’m going to show you how to set up a Hadoop cluster on Windows Azure. This article assumes basic familiarity with Hadoop technologies. If you’re new to Hadoop, see “What Is Hadoop?” As of this writing, Hadoop on Windows Azure is in private beta. To get an invitation, visit hadooponazure.com. The beta is compatible with Apache Hadoop (snapshot 0.20.203+).

What Is Hadoop?

imageHadoop is an open source library designed to batch-process massive data sets in parallel. It’s based on the Hadoop distributed file system (HDFS), and consists of utilities and libraries for working with data stored in clusters. These batch processes run using a number of different technologies, such as Map/Reduce jobs, and may be written in Java or other higher-level languages, such as Pig. There are also languages that can be used to query data stored in a Hadoop cluster. The most common language for query is HQL via Hive. For more information, visit hadoop.apache.org. …

Lynn goes on to describe “Setting Up Your Cluster” and related topics.


Carl Nolan (@carl_nolan) continued his series with Framework for .Net Hadoop MapReduce Job Submission Json Serialization on 7/1/2012:

imageA while back one of the changes made to the “Generic based Framework for .Net Hadoop MapReduce Job Submission” code was to support Binary Serialization from Mapper, in and out of Combiners, and out from the Reducer. Whereas this change was needed to support the Generic interfaces there were two downsides to this approach. Firstly the size of the output was dramatically increased, and to a lesser extent the data could no longer be visually inspected and was not interoperable with non .Net code. The other subtle problem was that to support textual output from the Reducer, ToString() was being used; not an ideal solution.

To fix these issues I have changed the default Serializer to be based on the DataContractJsonSerializer. For the most part this will result in no changes to the running code. However this approach does allow one to better control the serialization of the intermediate and final output.

As an example consider the following F# Type, that is used in one of the samples:

type MobilePhoneRange = { MinTime:TimeSpan; AverageTime:TimeSpan; MaxTime:TimeSpan }

This now results in the following output from the Streaming job; where the key is a Device Platform string and the value is the query time range in JSON format:

Android {"AverageTime@":"PT12H54M39S","MaxTime@":"PT23H59M54S","MinTime@":"PT6S"}
RIM OS {"AverageTime@":"PT13H52M56S","MaxTime@":"PT23H59M58S","MinTime@":"PT1M7S"}
Unknown {"AverageTime@":"PT10H29M27S","MaxTime@":"PT23H52M36S","MinTime@":"PT36S"}
Windows Phone {"AverageTime@":"PT12H38M31S","MaxTime@":"PT23H55M17S","MinTime@":"PT32S"}
iPhone OS {"AverageTime@":"PT11H51M53S","MaxTime@":"PT23H59M50S","MinTime@":"PT1S"}

Not only is this output readable but it is a lot smaller in size than the corresponding binary output.

If one wants further control over the serialization one can now use the DataContract and DataMember attributes; such as in this C# sample class definition, again used in the samples:

[DataContract]
public class MobilePhoneRange
{
[DataMember] public TimeSpan MinTime { get; set; }
[DataMember] public TimeSpan MaxTime { get; set; }
public MobilePhoneRange(TimeSpan minTime, TimeSpan maxTime)
{
this.MinTime = minTime;
this.MaxTime = maxTime;
}
}

This will result in the Streaming job output:

Android {"MaxTime":"PT23H59M54S","MinTime":"PT6S"}
RIM OS {"MaxTime":"PT23H59M58S","MinTime":"PT1M7S"}
Unknown {"MaxTime":"PT23H52M36S","MinTime":"PT36S"}
Windows Phone {"MaxTime":"PT23H55M17S","MinTime":"PT32S"}
iPhone OS {"MaxTime":"PT23H59M50S","MinTime":"PT1S"}

Most types which support binary serialization can be used as Mapper and Reducer types. One type that warrants a quick mention is supporting serializing Generic Lists in F#. If one wants to use a Generic List, a simple List type is required to be defined that inherits from List<T>. Using the following definition one can now use a List of ProductQuantity types as part of any output.

type ProductQuantity = { ProductId:int; Quantity:float}
type ProductQuantityList() =
inherit List<ProductQuantity>()

If one still wants to use Binary Serialization one can specify the optional output format parameter:

-outputFormat Binary

This submission attribute is optional and if absent the default value of Text is assumed; meaning the output will be in text format using the JSON serializer.

Hopefully this change will be transparent but will result in better performance due to the dramatically reduced files sizes; and more data readability and interoperability.


<Return to section navigation list>

SQL Azure Database, Federations and Reporting

Richard Conway (@azurecoder) described Tricks with IaaS and SQL: Part 1 – Installing SQL Server 2012 VMs using Powershell in a 6/30/2012 post:

imageThis blog post has been a long time coming. I’ve sat on IaaS research since the morning of the 8th June. Truth is I love it. Forget the comparisons with EC2 and the maturity of Windows Azure’s offering. IaaS changes everything. PaaS is cool, we’ve built a stable HPC cluster management tool using web and worker roles and plugins – we’ve really explored everything PaaS has to offer in terms of services over the last four years. What IaaS does is change the nature of the cloud.

  1. With IaaS you can build your own networks in the cloud easily
  2. You can virtualise your desktop environment and personally benefit from the raw compute power of the cloud
  3. You can hybridise your networks by renting cloud ready resources to extend your network through secure virtual networking
  4. Most importantly – you can make use of combinations of PaaS and IaaS deployments

imageThe last point is an important one because the coupling between the two can make use of well groomed applications which need access to services not provided out-of-of-box by PaaS. For example, there is a lot of buzz about using IaaS to host Sharepoint or SQL Server as part of an extended domain infrastructure.

This three part blog entry will look at the benefits of hosting SQL Server 2012 using the gallery template provided by Microsoft. I’ll draw on our open source library Azure Fluent Management and powershell to show how easy it is to deploy SQL Server and look at how you can tweak SQL should you need to set up mixed mode authentication which it doesn’t default to.

So the first question is – why use SQL Server when you have SQL Azure which already provides all of the resilience and scalability you would need to employ in a production application? Well … SQL Azure is a fantastic and a very economical use of SQL Server which provides a logical model that Microsoft manages but it’s not without it’s problems.

  • Firstly, it’s a shared resource so you can end up competing for resources. Microsoft’s predictive capability hasn’t proved to be that accurate with SQL Azure so it does sometimes have latency issues which are kinds of things that developers and DBAs go to great pains to avoid in a production application.
  • Secondly, being on a contentious shared infrastructure leads to transient faults which can be more prolific than you would like so you have to think about transient fault handling (ToPAZ is an Enterprise Application Block library which works pretty much out-of-the-box with your existing .NET System.Data codebase).
  • Thirdly, and most importantly, SQL Azure is a subset of SQL Server and doesn’t provide an all-encompassing set of services. For example, there is no XML support in SQL Azure, certain system stored procedures, synonyms, you can’t have linked servers so have to use multiple schemas to compensate. These are just a few things to worry about. In fact, whilst most databases can be updated, some can’t without a significant migration effort and a lot of thought and planning.

IaaS offers an alternative now. In one fell swoop we can create a SQL Server instance, load some data and connect to it as part of our effort. We’ll do exactly that here and the second part using our fluent management library. The third part will describe how we can use failover by configuring an Active-Passive cluster between two SQL Server nodes.

Let’s start with some powershell now.

If you haven’t done already download the WAPP powershell CmdLets. The best reference on this is through Michael Washam’s blog. If you were at our conference in London in June 22nd you would have seen Michael speak about this and will have some idea of how to use Powershell and IaaS. Follow the setup instructions and then import your subscription settings from a .publishsettings file that you’ve previously downloaded. The CmdLet to do the import is as below:

1> Import-AzurePublishSettingsFile

This will import the certificate from the file and associate its context with powershell session and each of the subscriptions.

If you haven’t downloaded a .publishsettings file for any reason use:

1> Get-AzurePublishSettingsFile

and enter your live id online. Save the file in a well-known location and behind the scenes the fabric has associated the management certificate in the file to the subscriptions that your live id is associated with (billing, service or co-admin).

A full view of the CmdLets are available here:

http://msdn.microsoft.com/en-us/library/windowsazure/hh689725.aspx

In my day-to-day I tend to use Cerebrata CmdLets over WAPP so when I list CmdLets it gives me an extended list. Microsoft WAPP CmdLets load themselves in as a module whereas Cerebrata are a snap-in. In order to get rid of all of the noise you’ll see with the CmdLets and get a list of only the WAPP CmdLets enter the following:

1> Get-Command -Module Microsoft.WindowsAzure.Management

Since most of my work with WAPP is test only and I use Cerebrata for production I tend to remove most of the subscriptions I don’t need. You can do this via:

1> Remove-AzureSubscription -SubscriptionName

If there is no default subscription then you may need to select a subscription before starting:

1> Select-Subscription -SubscriptionName

Next we’ll have to set some variables which will enable us to deploy the image and set up a VM. From top to bottom let’s describe the parameters. $img contains the name of the gallery image which will be copied across to our storage account. Remember this is an OS image which is 30GB in size. When the VM is created we’ll end up with C: and D: drive as a result. C is durable and D volatile. It’s important to note that a 30GB page blob is copied to your storage account for your OS disk and locked – this means that an infinte blob lease is used to lock out the drive so only your VM Image can write to it with the requisite lease id. $machinename (non-mandatory), $hostedservice (cloud service), $size and $password (your default Windows password) should be self-explanatory. $medialink relates to the storage location of the blob.

1> $img = "MSFT__Sql-Server-11EVAL-11.0.2215.0-05152012-en-us-30GB.vhd"

2> $machinename = "ELASTASQLVHD"

3> $hostedservice = "elastavhd"

4> $size = "Small"

5> $password = "Password900"

6> $medialink = http://elastacacheweb.blob.core.windows.net/vhds/elastasql.vhd

In this example we won’t be looking at creating a data disk (durable drive E), however, we can have up to 15 data disks with our image each up to 1TB. With SQL Server it is better to create a datadisk to persist this and allow the database to grow beyond the size of the OS page blob. In part two of this series we’ll be looking at using Fluent Management to create the SQL Server which will be creating a data disk to store the .mdf/ldf SQL files.

More information can be found here about using data disks:

http://blogs.msdn.com/b/windowsazure/archive/2012/06/28/data-series-exploring-windows-azure-drives-disks-and-images.aspx

What the article doesn’t tell you is that if you inadvertantly delete your virtual machine (guilty) without detaching the drive drive first you won’t be able to delete it because of the infinite lease. You can also delete via powershell with the following CmdLets if you get into this situation which is easy to do!

1> Get-AzureDisk | Select DiskName

This gives you the name of the attached data or OS disks. If you use Cerebrata’s cloud storage studio you should be able to see these blobs themselves but the names differ. The names are actually pulled back from a disks catalog associated with the subscription via the Service Management API.

The resulting output from the above CmdLet can be fed into the following CmdLet to delete an OS or data disk.

1> Remove-AzureDisk -DiskName bingbong-bingbong-0-20120609065137 -DeleteVHD

The only thing necessary now is to be able to actually run the command to create the virtual machine. Michael Washam has added a -verbose switch to the CmdLet which helps us understand how the VM is formed. The XML is fairly self-explanatory here. First setup the VM config, then setup the Windows OS config and finally pipe everything into the New-AzureVM CmdLet which will create a new cloud service or use an existing one and create an isolated role for the VM instance (each virtual machine lives in a seperate role).

1> New-AzureVMConfig -name $machinename -InstanceSize $size -ImageName $img -MediaLocation $medialink -Verbose | Add-AzureProvisioningConfig -Windows -Password $password -Verbose | New-AzureVM -ServiceName $hostedservice -Location "North Europe" -Verbose

By default Remote Desktop is enabled with a random public port assigned and a load balanced redirect to a private port of 3389.

Remote Desktop Endpoint

Remote Desktop Endpoint

In order to finalise the installation we need to setup another external endpoint which forwards request to port 1433, the port used by SQL Server. This is only half of the story because I also should add a firewall rule to enable access to this port via TCP as per the image.

SQL Server Endpoint

SQL Server Endpoint

image

Opening a firewall port for SQL Server

You would have probably realised by now that the default access to SQL Server is via windows credentials. Whilst DBAs will be over the moon with this for my simple demo I’d like you to connect to this SQL instance via SSMS (SQL Server Management Studio). As we’ll need to update a registry key to enable mixed mode authentication via regedit:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer

And update the LoginMode (DWORD) to 2.

Once that’s done I should be able to startup SSMS on the virtual machine and create a new login called “richard” with password “Password_900″ and remove all of the password rules and expiries so that I can test this. In addition I will need to ensure that my user is placed in the appropriate role (sysadmin is easy to prove the concept) so that I can then go ahead and connect.

Logging into SQL Server

Logging into SQL Server

I then create a new database called “icanconnect” and can set this as the default for my new user.

When I try to connect through my SSMS on my laptop I should be able to see the following as per the image below.

Seeing your database in SSMS

Seeing your database in SSMS

There’s a lot of separate activites here which we’ll add to a powershell script in second part of this series. I realise that this is getting quite long and I was keen to highlight the steps involved in this without information overload. In part two we’ll look at how Azure Fluent Management can be used to do the same thing and how we can also script the various activities which we’ve described here to shrink everything into a single step.


Doug Mahugh (@dmahugh) published Doctrine supports SQL Database Federations for massive scalability on Windows Azure to the Interoperability @ Microsoft blog on 6/29/2012:

imageSymfony and Doctrine are a popular combination for PHP developers, and now you can take full advantage of these open source frameworks on Windows Azure. We covered in a separate post the basics of getting started with Symfony on Windows Azure, and in this post we’ll take a look at Doctrine’s support for sharding via SQL Database Federations, which is the result of ongoing collaboration between Microsoft Open Technologies and members of the Symfony/Doctrine community.

SQL Database Federations

imageMy colleague Ram Jeyaraman covered in a blog post last December the availability of the SQL Database Federations specification. This specification covers a set of commands for managing federations as objects in a database. Just as you can use SQL commands to create a table or a stored procedure within a database, the SQL Database Federations spec covers how to create, use, or alter federations with simple commands such as CREATE FEDERATION, USE FEDERATION, or ALTER FEDERATION.

If you’ve never worked with federations before, the concept is actually quite simple. Your database is partitioned into a set of federation members, each of which contains a set of related data (typically group by a range of values for a specified federation distribution key):

This architecture can provide for massive scalability in the data tier of an application, because each federation member only handles a subset of the traffic and new federation members can be added at any time to increase capacity. And with the approach used by SQL Database Federations, developers don’t need to keep track of how the database is partitioned (sharded) across the federation members – the developer just needs to do a USE FEDERATION command and the data layer handles those details without any need to complicate the application code with sharding logic.

You can find a detailed explanation of sharding in the SQL Database Federations specification, which is a free download covered by the Microsoft Open Specification Promise. Questions or feedback on the specification are welcome on the MSDN forum for SQL Database.

Doctrine support for SQL Database Federations

The Doctrine Project is a set of open-source libraries that help ease database development and persistence logic for PHP developers. Doctrine includes a database abstraction layer (DBAL), object relational mapping (ORM) layer, and related services and APIs.

As of version 2.3 the Doctrine DBAL includes support for sharding, including a custom implementation of SQL Database Federations that’s ready to use with SQL Databases in Windows Azure. Instead of having to create Federations and schema separately, Doctrine does it all in one step. Furthermore, the combination of Symfony and Doctrine gives PHP developers seamless access to blob storage, Windows Azure Tables, Windows Azure queues, and other Windows Azure services.

The online documentation on the Doctrine site shows how easy it is to instantiate a ShardManager interface (the Doctrine API for sharding functionality) for a SQL Database:

The Doctrine site also has an end-to-end tutorial on how to do Doctrine sharding on Windows Azure, which covers creation of a federation, inserting data, repartitioning the federation members, and querying the data.

Doctrine’s sharding support gives PHP developers a simple option for building massively scalable applications and services on Windows Azure. You get the ease and flexibility of Doctrine Query Language (DQL) combined with the performance and durability of SQL Databases on Windows Azure, as well as access to Windows Azure services such as blob storage, table storage, queues, and others.

Doug Mahugh
Senior Technical Evangelist
Microsoft Open Technologies, Inc.

See also Doug’s Symfony on Windows Azure, a powerful combination for PHP developers post in the Live Windows Azure Apps, APIs, Tools and Test Harnesses section below.


<Return to section navigation list>

MarketPlace DataMarket, Social Analytics, Big Data and OData

The WCF Data Services Team described Trying out the prerelease OData Client T4 template in a 7/2/2012 post:

imageWe recently prereleased an updated OData Client T4 template to NuGet. The template will codegen classes for working with OData v3 services, but full support has not been added for all v3 features.

What is the OData Client T4 template?

The OData Client T4 template is a T4 template that generates code to facilitate consumption of OData services. The template will generate a DataServiceContext and classes for each of the entity types and complex types found in the service description. The template should produce code that is functionally equivalent to the Add Service Reference experience. The T4 template provides some compelling benefits:

  • Developers can customize the T4 template to generate exactly the code they desire
  • The T4 template can be executed at build time, ensuring that service references are always fully up-to-date (and that any discrepancies cause a build error rather than a runtime error)

In this blog post, we will walk through how to obtain and use the OData Client T4 template. We will not be covering other details of T4; much of that information is available on MSDN.

OData Client T4 template walkthrough
  1. Let’s begin by creating a new Console Application project.

    image

  2. Next we need to use NuGet to get the T4 template. We can do this by right-clicking the project in the Solution Explorer and choosing Manage NuGet Packages. NOTE: You may need to get the NuGet Package Manager if you are using VS 2010.

    image

  3. In the Package Explorer window, choose Online from the left nav, ensure that the prerelease dropdown is set to Include Prerelease (not Stable Only), and search for Microsoft.Data.Services.Client.T4. You should see the OData Client T4 package appear; click the Install button to install the package.

    image

  4. When the OData Client T4 package has been added to the project, you should see a file called Reference.tt appear in the Solution Explorer. (NOTE: It’s perfectly fine at this point to change the name of the file to something more meaningful for your project.) Expand Reference.tt using the caret to the left of the file and double-click to open Reference.cs. Note that the contents of Reference.cs were generated from the T4 template and that they provide further instructions on how to use the template.

    image

  5. Double-click Reference.tt to open the T4 template. On line 30, add the following: MetadataUri = http://odata.netflix.com/Catalog/$metadata;. NOTE: The T4 template does not currently support actions; if you specify a $metadata that contains actions, code generation will fail.

    image

  6. Save Reference.tt and expand Reference.cs in the Solution Explorer to see the newly generated classes. (NOTE: If you’re using VS 2010, you’ll need to open Reference.cs and browse the code in the file.

    image

  7. Finally, add the following code to Program.cs.

    image

  8. Press Ctrl+F5 to see the result.

    image

Why should I use the T4 template?

Currently the Add Service Reference and DataSvcUtil experiences are both based on a DLL that does not allow for customizable code generation. We believe that in the future both of these experiences will use the T4 template internally, with the hope that you would be able to customize the output of either experience. (Imagine the simplicity of ASR with the power of T4!) To do that, we need to get the T4 template to a quality level equal to or better than the ASR experience.

Feedback, please!

We’d love to hear from you! Specifically, we would really benefit from answers to the following questions:

  • Did the T4 template work for you? Why or why not?
  • What customizability should be easier in the T4 template?
  • Do you use DataSvcUtil today? For what reason?
  • If you only use DataSvcUtil for msbuild chaining, could you chain a T4 template instead?
  • Do you want the T4 template to generate C# or VB.NET?

For political correctness, I want the T4 template to generate either C# or VB.NET.


Clint Edmonson asserted Windows Azure Recipe: Big Data in a 7/2/2012 post to Microsoft’s US DPE Azure Connection blog:

As the name implies, what we’re talking about here is the explosion of electronic data that comes from huge volumes of transactions, devices, and sensors being captured by businesses today. This data often comes in unstructured formats and/or too fast for us to effectively process in real time. Collectively, we call these the 4 big data V’s: Volume, Velocity, Variety, and Variability. These qualities make this type of data best managed by NoSQL systems like Hadoop, rather than by conventional Relational Database Management System (RDBMS).

imageWe know that there are patterns hidden inside this data that might provide competitive insight into market trends. The key is knowing when and how to leverage these “No SQL” tools combined with traditional business such as SQL-based relational databases and warehouses and other business intelligence tools.

Drivers
  • Petabyte scale data collection and storage
  • Business intelligence and insight
Solution

The sketch below shows one of many big data solutions using Hadoop’s unique highly scalable storage and parallel processing capabilities combined with Microsoft Office’s Business Intelligence Components to access the data in the cluster.

image

Ingredients
  • Hadoop – this big data industry heavyweight provides both large scale data storage infrastructure and a highly parallelized map-reduce processing engine to crunch through the data efficiently. Here’s are the key pieces of the environment:
    • Pig - a platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs.
    • Mahout - a machine learning library with algorithms for clustering, classification and batch based collaborative filtering that are implemented on top of Apache Hadoop using the map/reduce paradigm.
    • Hive - data warehouse software built on top of Apache Hadoop that facilitates querying and managing large datasets residing in distributed storage. Directly accessible to Microsoft Office and other consumers via add-ins and the Hive ODBC data driver.
    • Pegasus - a Peta-scale graph mining system that runs in parallel, distributed manner on top of Hadoop and that provides algorithms for important graph mining tasks such as Degree, PageRank, Random Walk with Restart (RWR), Radius, and Connected Components.
    • Sqoop - a tool designed for efficiently transferring bulk data between Apache Hadoop and structured data stores such as relational databases.
    • Flume - a distributed, reliable, and available service for efficiently collecting, aggregating, and moving large log data amounts to HDFS.
  • Database – directly accessible to Hadoop via the Sqoop based Microsoft SQL Server Connector for Apache Hadoop, data can be efficiently transferred to traditional relational data stores for replication, reporting, or other needs.
  • Reporting – provides easily consumable reporting when combined with a database being fed from the Hadoop environment.
Training

These links point to online Windows Azure training labs where you can learn more about the individual ingredients described above.


Hadoop Learning Resources (20+ tutorials and labs)

imageHuge collection of resources for learning about all aspects of Apache Hadoop-based development on Windows Azure and the Hadoop and Windows Azure Ecosystems


SQL Azure (7 labs)

Microsoft SQL Azure delivers on the Microsoft Data Platform vision of extending the SQL Server capabilities to the cloud as web-based services, enabling you to store structured, semi-structured, and unstructured data.

See my Windows Azure Resource Guide for more guidance on how to get started, including links web portals, training kits, samples, and blogs related to Windows Azure.


<Return to section navigation list>

Windows Azure Service Bus, Caching, Active Directory and Workflow

• Brent Stineman (@BrentCodeMonkey) described Session State with Windows Azure Caching Preview in a 7/3/2012 post:

imageI’m working on a project for a client and was asked to pull together a small demo using the new Windows Azure Caching preview. This is the “dedicated” or better yet, “self hosted” solution that’s currently available as a preview in the Windows Azure SDK 1.7, not the Caching Service that was made available early last year. So starting with a simple MVC 3 application, I set out to enable the new memory cache for session state. This is only step 1 and the next step is to add a custom cache based on the LocalStorage feature of Windows Azure Cloud Services.

Enabling the self-hosted, in-memory cache

imageAfter creating my template project, I started by following the MSDN documentation for enabling the cache co-hosted in my MVC 3 web role. I opened up the properties tab for the role (right-clicking on the role in the cloud service via the Solution Explorer) and moved to the Caching tab. I checked “Enable Caching” and set my cache to Co-located (it’s the default) and the size to 20% of the available memory.

clip_image002

Now because I want to use this for session state, I’m also going to change the Expiration Type for the default cache from “Absolute” to “Sliding”. In the current preview, we only have one eviction type, Least Recently Used (LRU) which will work just fine for our session demo. We save these changes and take a look at what’s happened with the role.

There are three changes that I could find:

  • A new module, Caching, is imported in the ServiceDefinition.csdef file
  • A new local resource “Microsoft.WindowsAzure.Plugins.Caching.FileStore” is declared
  • Four new configuration settings are added, all related to the cache: NamedCaches (a JSON list of named caches), LogLevel, CacheSizePercentage, and ConfigStoreConnectionString

Yeah PaaS! A few options clicked and the Windows Azure Fabric will handle spinning up the resources for me. I just have to make the changes to leverage this new resource. That’s right, now I need to setup my cache client.

Note: While you can rename the “default” cache by editing the cscfg file, the default will always exist. There’s currently no way I found to remove or rename it.

Client for Cache

I could configure the cache manually, but folks keep telling me to I need to learn this NuGet stuff. So lets do it with the NuGet packages instead. After a bit of fumbling to clean up a previously botched NuGet install fixed (Note: must be running VS at Admin to manage plug-ins), I right-clicked on my MVC 3 Webrole and selected “Manage NuGet Packages”, then following the great documentation at MSDN, searched for windowsazure.caching and installed the “Windows Azure Caching Preview” package.

This handles updating my project references for me, adding at least 5 of them that I saw at a quick glance, as well as updating the role’s configuration file (the web.config in my case) which I now need to update with the name of my role:

<dataCacheClientname=“default“>
<autoDiscoverisEnabled=“true“identifier=“WebMVC“ />
<!–<localCache isEnabled=”true” sync=”TimeoutBased” objectCount=”100000″ ttlValue=”300″ />–>
</dataCacheClient>

Now if you’re familiar with using caching in .NET, this is all I really need to do to start caching. But I want to take another step and change my MVC application so that it will use this new cache for session state. This is simply a matter of replacing the default provider “DefaultSesionProvider” in my web.config with the AppFabricCacheSessionStoreProvider. Below are both for reference:

Before:

<addname=“DefaultSessionProvider“
type=“System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35“
connectionStringName=“DefaultConnection“
applicationName=“/“ />

After:

<addname=“AppFabricCacheSessionStoreProvider“
type=“Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache“
cacheName=“default“
useBlobMode=“true“
dataCacheClientName=“default“ />

Its important to note that I’ve set the cacheName attribute to match the name of the named cached I set up previously, in this case “default”. If you set up a different named cache, set the value appropriately or expect issues.

But we can’t stop there, we also need to update the sessionState node’s attributes, namely mode and customProvider as follows:

<sessionStatemode=“Custom“customProvider=“AppFabricCacheSessionStoreProvider“>

Demo Time

Of course, all this does nothing unless we have some code that shows the functionality at work. So let’s increment a user specific page view counter. First, I’m going to go into the home controller and add in some (admittedly ugly) code in the Index method:

// create the session value if we’re starting a new session
if (Session.IsNewSession)
Session.Add(“viewcount”, 0);
// increment the viewcount
Session["viewcount"] = (int)Session["viewcount"] + 1;

// set our values to display
ViewBag.Count = Session["viewcount"];
ViewBag.Instance = RoleEnvironment.CurrentRoleInstance.Id.ToString();

The first section just sets up the session value and handles incrementing them. The second block pulls the value back out to be displayed. And then alter the associated Index.cshtml page to render the values back out. So just insert the following wherever you’d like it to go.

Page view count: @ViewBag.Count<br />
Instance: @ViewBag.Instance

Now if we’ve done everything correctly, you’ll see the view count increment consistently regardless of which instance handles the request.

Session.Abandon

Now there’s some interesting stuff I’d love to dive into a bit more if I had time, but I don’t today. So instead, let’s just be happy with the fact that after more than 2 years, Windows Azure finally has “built in” session provider that is pretty darned good. I’m certain it still has its capacity limits (I haven’t tried testing to see how far it will go yet), but to have something this simple we can use for most projects is simply awesome. If you want my demo, you can snag it from here.

Oh, one last note. Since Windows Azure Caching does require Windows Azure Storage to maintain some information, don’t forget to update the connection string for it before you deploy to the cloud. If not, you’ll find instances may not start properly (not the best scenario admittedly). So be careful.


Clemens Vasters (@clemensv) described A Smart Thermostat on the Service Bus in MSDN Magazine’s July 2012 issue. From the introduction:

imageHere’s a bold prediction: Connected devices are going to be big business, and understanding these devices will be really important for developers not too far down the road. “Obviously,” you say. But I don’t mean the devices on which you might read this article. I mean the ones that will keep you cool this summer, that help you wash your clothes and dishes, that brew your morning coffee or put together other devices on a factory floor.

imageIn the June issue of MSDN Magazine (msdn.magazine.com/magazine/jj133825), I explained a set of considerations and outlined an architecture for how to manage event and command flows from and to embedded (and mobile) devices using Windows Azure Service Bus. In this article, I’ll take things a step further and look at code that creates and secures those event and command flows. And because a real understanding of embedded devices does require looking at one, I’ll build one and then wire it up to Windows Azure Service Bus so it can send events related to its current state and be remotely controlled by messages via the Windows Azure cloud.

Until just a few years ago, building a small device with a power supply, a microcontroller, and a set of sensors required quite a bit of skill in electronics hardware design as well as in putting it all together, not to mention good command of the soldering iron. I’ll happily admit that I’ve personally been fairly challenged in the hardware department—so much so that a friend of mine once declared if the world were attacked by alien robots he’d send me to the frontline and my mere presence would cause the assault to collapse in a grand firework of electrical shorts. But due to the rise of prototyping platforms such as Arduino/Netduino or .NET Gadgeteer, even folks who might do harm to man and machine swinging a soldering iron can now put together a fully functional small device, leveraging existing programming skills.

To stick with the scenario established in the last issue, I’ll build an “air conditioner” in the form of a thermostat-controlled fan, where the fan is the least interesting part from a wiring perspective. The components for the project are based on the .NET Gadgeteer model, involving a mainboard with a microcontroller, memory and a variety of pluggable modules.


<Return to section navigation list>

Windows Azure Virtual Machines, Virtual Networks, Web Sites, Connect, RDP and CDN

• Avkash Chauhan (@avkashchauhan) described How to update CentOS kernel to CentOS Plus using Yum in a 7/3/2012 post:

imageWhen you run “sudo yum update” you Cent OS box is updated [with all] packages:

Installed:
kernel.x86_64 0:2.6.32-220.23.1.el6

But if you want to update CentOS to CentOS Plus Kernel you would need to do the following:

First edit the your yum configuration repo for CentOS in [centos] section as following:

[root@hadoop ~]# vi /etc/yum.repos.d/CentOS-Base.repo

[centosplus]
enabled=1
includepkgs=kernel*

Verify the changes as following:

[root@hadoop ~]# cat /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever – Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-$releasever – Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever – Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
includepkgs=kernel*
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib – packages by Centos Users
[contrib]
name=CentOS-$releasever – Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

[root@hadoop ~]# sudo yum update

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.stanford.edu
* centosplus: centos.mirrors.hoobly.com
* extras: mirrors.xmission.com
* updates: mirror.san.fastserv.com
base | 3.7 kB 00:00
centosplus | 3.5 kB 00:00
centosplus/primary_db | 1.7 MB 00:00
extras | 3.5 kB 00:00
updates | 3.5 kB 00:00
Setting up Update Process
Resolving Dependencies
–> Running transaction check
—> Package kernel.x86_64 0:2.6.32-220.23.1.el6.centos.plus will be installed
—> Package kernel-firmware.noarch 0:2.6.32-220.23.1.el6 will be updated
—> Package kernel-firmware.noarch 0:2.6.32-220.23.1.el6.centos.plus will be an update
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
kernel x86_64 2.6.32-220.23.1.el6.centos.plus centosplus 25 M
Updating:
kernel-firmware noarch 2.6.32-220.23.1.el6.centos.plus centosplus 6.3 M

Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 1 Package(s)

Total download size: 31 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): kernel-2.6.32-220.23.1.el6.centos.plus.x86_64.rpm | 25 MB 00:03
(2/2): kernel-firmware-2.6.32-220.23.1.el6.centos.plus.n | 6.3 MB 00:00
——————————————————————————–
Total 7.2 MB/s | 31 MB 00:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : kernel-firmware-2.6.32-220.23.1.el6.centos.plus.noarch 1/3
Installing : kernel-2.6.32-220.23.1.el6.centos.plus.x86_64 2/3
Cleanup : kernel-firmware-2.6.32-220.23.1.el6.noarch 3/3

Installed:
kernel.x86_64 0:2.6.32-220.23.1.el6.centos.plus

Updated:
kernel-firmware.noarch 0:2.6.32-220.23.1.el6.centos.plus

Complete!


• Craig Landis started a Unable to Capture Image: "Endpoint Not found: There was no endpoint listening at..." thread on 7/3/2012 in the Windows Azure Platform > Windows Azure – CTPs, Betas & Labs Forums> Windows Azure Virtual Machines for Windows (and Linux) forums:

imageAn issue has been identified that results in the inability to capture an image. We will update this post when the fix has been implemented.
When attempting to capture an image in the Windows Azure management portal you may receive the following error message:

Endpoint Not found: There was no endpoint listening at https://management.core.windows.net:8443/4321d1e8-da89-46f6-a36f-879c82a4321f/services/hostedservices/myvm/deployments/myvm/roleInstances/myvm/Operations that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

imageUsing the Save-AzureVMImage PowerShell cmdlet, you may receive error:

PS C:\> save-azurevmimage -Name myvm -NewImageName myimage -NewImageLabel myimage -ServiceName mycloudservice
save-azurevmimage : HTTP Status Code: NotFound - HTTP Error Message:
https://management.core.windows.net/4321d1e8-da89-46f6-a36f-879c82a4321f/services/hostedservices/myvm/deployments/myvm/roleInstances/myvm/Operations does not exist.
Operation ID: 5d2f45a33ca54ed39886f42b05f2b71c
At line:1 char:1
+ save-azurevmimage -Name myvm -NewImageName myimage -NewImageLabel ...
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Save-AzureVMImage], CommunicationException
+ FullyQualifiedErrorId :Microsoft.WindowsAzure.Management.ServiceManagement.IaaS.SaveAzureVMImageCommand

Using the cross-platform Azure command-line tool you may receive error:

C:\>azure vm capture myvm myimage --delete
info: Executing command vm capture
verbose: Fetching VMs
verbose: Capturing VM
error: The deployment name 'myvm' does not exist.
error: vm capture command failed


<Return to section navigation list>

Live Windows Azure Apps, APIs, Tools and Test Harnesses

• Robin Shahan (@RobinDotNet) described How to set up an HTTPS endpoint for a Windows Azure web role in a 7/2/2012 post. From the introduction:

imageAt GoldMail, all of our WCF services have https endpoints. How do you do this? First, you need a domain. Then you need to CNAME what your service URL will be to your Azure service. For example, my domain is goldmail.com, and I have CNAMEd robintest.goldmail.com to robintest.cloudapp.net.

Next, you need a real SSL certificate from a Certificate Authority like VeriSign, purchased for your domain. A self-signed certificate won’t work. A certificate from a CA validates that you are who you say you are, and somebody visiting that domain can be sure it is you. You can buy an SSL certificate that is just for yourcompany.com, but if you buy one that is *.yourcompany.com, you can use it for mywebapp.mycompany.com, myotherwebapp.mycompany.com, myservice.mycompany.com, iworktoomuch.mycompany.com, etc., like mine noted above is robintest.goldmail.com.

Next, you need to upload the certificate to the Azure portal for the cloud service you are going to use to host the Azure web role. Then you need to assign the certificate to the web role and set up an https endpoint in the Azure configuration in Visual Studio. …

Robin continues with an illustrated, step-by-step tutorial.


• Robin Shahan (@RobinDotNet) continued here HTTPS series with How to debug a service with an HTTPS endpoint in the Azure compute emulator on 7/2/2012:

imageMy previous post showed how to use your SSL certificate, set up an HTTPS endpoint for your service, and change your service to use HTTPS. If you now run this service in the Compute Emulator, you will see this:

And you will find if you put a breakpoint in the code of the service, and then try to call it from the client, it won’t let you debug into it because the certificate is invalid.

This was really frustrating for me, because I didn’t want to expose an HTTP endpoint, and I didn’t want to keep changing back and forth between HTTP and HTTPS. There’s always a chance I’ll miss something when changing it back, and we’ll publish it to staging and it won’t work right. (Don’t ask.) So I went looking for a way to get around this restriction.

When you run your service in the compute emulator, Windows Azure creates a certificate for 127.0.0.1 and installs it in the machine certificate store. This certificate is not trusted, which is why you get the security error when running your service locally.

To resolve this problem, you have to take that certificate and either copy it into the Trusted Root Certification store for the local machine, or copy it into your user account’s Trusted Root Certification store. This is a security hole on your computer if you trust any HTTPS websites with any valuable information. For this reason, I installed it in my own certificate store rather than the machine certificate store, so it would only endanger my own data. It also makes it easier to remove and re-install when you need to. …

Robin continues with another illustrated, step-by-step tutorial for the Compute Emulator.


Charlie Osborne (@ZDNetCharlie) asserted “Electronics giant Samsung Electronics has chosen to integrate Microsoft's Azure platform with its Smart TV infrastructure” in a deck for her Electronics giant Samsung Electronics has chosen to integrate Microsoft's Azure platform with its Smart TV infrastructure report of 7/3/2012 for ZDNet:

imageElectronics giant Samsung Electronics has chosen to implement Microsoft cloud technology through integration with its Smart TV infrastructure.

Samsung announced on Monday its decision to use Windows Azure technology to manage the Smart TV system through cloud-based technology. The company cited a reduction in costs, increased productivity and a flexible, scalable model which can be expanded to meet its growing customer base.

imageSamsung’s Smart TV service is currently operating in 120 countries -- and the technology giant intends to expand this further. With this in mind, Samsung said it chose Windows Azure in order to stem any concerns for reliability, as well as the ability to support a continual increase in traffic. Through testing, the company found the platform offered a greater speed than competitors, mainly within the Asia region.

imageScalability was one concern, but Samsung has also said that Windows Azure allowed the company to quickly secure and store resources, and focus on expanding their business rather than on security issues. Bob Kelly, corporate vice president of Windows Azure at Microsoft said:

"Windows Azure gives Samsung the ability to focus on its business rather than having its technical team deal with problem-solving and troubleshooting issues."

imageWindows Azure is a modern Microsoft cloud computing platform used to build, host and scale web applications through data centers hosted by the company. The platform consists of various services including the Windows Azure operating system, SQL Azure, and Windows Azure AppFabric.

I have a two month old Samsung 46" LED 1080p 120Hz HDTV UN46D6050 Smart TV but ordinarily use my Sony BlueRay Disk player or a laptop in the living room for Internet access. Both have wired connections to the Internet via my AT&T DSL connection. The laptop connects to one of the TV’s four HDMI ports. By the way, I highly recommend Samsung HDTVs for their excellent image quality and many HDMI ports.

Read more: Microsoft’s Samsung Smart TV Tunes In to Windows Azure press release of 7/2/2012.


Shahrokh Mortazavi described Python on Windows Azure – a Match Made in the Clouds! in a 7/2/2012 post to the Windows Azure blog:

I’m very excited to talk about Python on Windows, which has enjoyed a resurgence at Microsoft over the past couple of years, culminating in the release of Python Tools for Visual Studio and Python on Windows Azure. Let’s dive in to see what we have. But first, a little background…

What is Python & Who Uses It?

Python is a modern, easy to use, concise language that has become an indispensable tool in the modern developer’s arsenal. It’s consistently been in the top 10 TIOBE index, and has become the CS101 language at many universities. But partly due to its vast and deep suite of libraries, it also spans the CS PhD and Mission Critical app zip codes as well. Who exactly uses Python these days? Here’s a snapshot; these names represent some of the highest trafficked sites and popular desktop and networked applications.

imagePython is also pretty popular. Here are the results of a popularity poll Hacker News recently ran:

Another key aspect of the language is that it’s cross-platform. In fact we had to do very little to get the Python Windows Azure Client Libraries to work on MacOS and Linux.

Python on Windows Azure

In our initial offering, Python on Windows Azure provides the following:

  • Python Client Libraries
  • Django & Cloud Services
  • Visual Studio Integration for Python /Azure
  • Python on Windows or Linux VM’s
  • IPython

Python Client Libraries - The Client Libraries are a set of Pythonic, OS independent wrappers for the Windows Azure Services, such as Storage, Queues, etc. You can use them on Mac or Linux machines as well, locally or on VM’s to tap in to Windows Azure vast computation and storage services:

Upload to blob:

myblob = open(r'task1.txt', 'r').read()
blob_service.put_blob('mycontainer', 'myblob', myblob, x_ms_blob_type='BlockBlob')

List the blobs:

blobs = blob_service.list_blobs('mycontainer')
for blob in blobs:
print(blob.name)
print(blob.url)

download blobs:

blob = blob_service.get_blob('mycontainer', 'myblob')
with open(r'out-task1.txt', 'w') as f:
f.write(blob)

Django - For web work, we’ve provided support for Django initially – this includes server side support via IIS and deployment via Python Tools for Visual Studio (PTVS). On Windows you can use WebPI to install everything you need (Python, Django, PTVS, etc.) and be up and running with your 1st website in 15 minutes. Once deployed, you can use Windows Azure’s scalability and region support to manage complex sites efficiently:

Preparing the app for deployment to Windows Azure in PTVS:

Python Tools for Visual Studio - There are a number of good IDE’s, including web-based ones for writing Python. We’re a bit biased toward PTVS, which is a free and OSS (Apache license) plug-in for Visual Studio. If you’re already a VS user, it’s just a quick install. If you’re not, you can install the Integrated Shell + PTVS to get going – this combo gives you a free “Python Express” essentially. The key features of PTVS are:

  • Support for CPython, IronPython
  • Intellisense
  • Local & remote Debugging
  • Profiling
  • Integrated REPL with inline graphics
  • Object Browser
  • Django
  • Parallel Computing

This video provides a quick overview of basic Editing features of PTVS.

Debugging Django templates:

Intellisense support for Django templates:

Check out this video to get a feel for deploying a Django site on Windows Azure (Cloud Service mode). You can also deploy from a Mac/Linux machine into a Linux VM.

PTVS also has advanced features such as high-performance computing (including debugging MPI code), which we’ll enable on Windows Azure in the future.

IPython - We’re also very excited about IPython notebook, which is a web-based general purpose IDE for developing Python, and more importantly, prototyping “ideas”. You can run the notebook on any modern browser that supports websockets (Chrome, Safari, IE10 soon, …) and the “Engine” itself runs on Windows Azure in a VM (Linux or Windows):

This powerful paradigm means instant access to the vast and deep Python ecosystem in a highly productive environment, backed by solid availability and scalability of Windows Azure. Whether you’re a modeler, teacher or researcher, this opens up a whole set of new possibilities, especially with prototyping, sharing and collaboration. And best of all, no installs! Check out this video of IPython, which describes some of its features.

Summary & Roadmap

As you can see, there’s a lot to like about Python on Windows Azure:

  1. It’s a great language, with awesome libraries and a very active community of developers, estimated to be around ~1.5 million
  2. Django & Flask are robust web frameworks with excellent Windows support
  3. PTVS with Windows Azure support turns VS into a world-class Python IDE & best of all it’s FREE (and OSS)
  4. IPython, backed by Windows Azure, turns any browser on any OS into a powerful exploration, analysis and visualization environment
  5. The Windows Azure Client Libraries provide easy, Pythonic access to Windows Azure services from Windows, MacOS and Linux
  6. Persistent Linux and Windows VM’s enable running any Python stack you desire

I should also emphasize that the members of the Python team are huge OSS fans and would love to see you get involved and contribute as well. The Windows Azure Client libraries are OSS on github. PTVS is OSS on Codeplex. If there’s a bug or feature you’d like to work on, please let us know!

We’re also considering support for Big Data (via Hadoop) and High Performance Computing on Windows Azure. Do you have any ideas on what we should work on? Please let us know!

I assume Shahrokh means “Considering support” for Python  by Apache Hadoop for Windows Azure.


Bruce Kyle reported an ISV Video: Lingo Jingo Language Learning Software Powered By Windows Azure in a 7/2/2012 post to Microsoft’s US ISV Evangelism blog:

imageThe Lingo Jingo app is powered by Windows Azure to deliver a social based language learning experience integrating with Facebook, Twitter and LinkedIn to share progress on lessons and exercises. Web roles are used to host its MVC based main marketing site and language learning app, SQL Azure is used for storing user data, sessions and lesson contexts and Azure blog storage for storing lesson images and videos.

Video link: Lingo Jingo Language Learning Software Powered By Windows Azure

imageIn this video, Lingo Jingo's co-founder, Christian Hasker, speaks with Microsoft Architect Evangelist Allan Naim. Allan and Christian discusses why they chose building on Windows Azure. Christian explains the benefits realized from building on the Azure platform.

About Lingo Jingo

Lingo Jingo was founded with one goal in mind – to make it easier for the world to communicate with one another in different languages. If you've ever tried to speak a few words of a foreign language when you are on vacation you'll know how making a little effort to say "Hello, how are you?" can open up a whole new world of experiences.

If you know 500 words in any language, you'll be able to understand rudimentary conversations and make yourself understood. We'll help you gain that confidence.


Joseph Fultz explained Mixing Node.js into Your Windows Azure Solution in his “Forecast: Cloudy” column for MSDN Magazine’s July 2012 issue. From the introduction:

Joseph FultzNode.js has been getting a lot of press as of late, and it’s highly touted for its asynchronous I/O model, which releases the main thread to do other work while waiting on I/O responses. The overarching rule of Node.js is that I/O is expensive, and it attempts to mitigate the expense by forcing an asynchronous I/O model. I’ve been thinking about how it might be incorporated into an already existing framework. If you’re starting from scratch, it’s relatively easy to lay out the technology choices and make a decision, even if the decision is pretty much based on cool factor alone. However, if the goal is to perform a technology refresh on one part of a solution, the trick is picking something that’s current, has a future, doesn’t come with a lot of additional cost and will fit nicely with the existing solution landscape.

That’s exactly what I’m going to demonstrate in this column. I’ll take an existing solution that allows viewing of documents in storage but requires a shared access signature to download them. To that solution I’ll add a simple UI using Node.js. To help with that implementation, I’ll take advantage of some commonly used frameworks for Node.js. The solution, therefore, will include:

  • Node.js—the core engine
  • Express—a Model-View-Controller (MVC)-style framework
  • Jade—a rendering and templating engine

Together these three tools will provide a rich framework from which to build the UI, much like using ASP.NET MVC 3 and Razor.


Tarun Arora (@arora_tarun) described Visual Studio Load Testing using Windows Azure in a 7/1/2012 post:

imageIn my opinion the biggest adoption barrier in performance testing on smaller projects is not the tooling but the high infrastructure and administration cost that comes with this phase of testing. Only if a reusable solution was possible and infrastructure management wasn’t as expensive, adoption would certainly spike. It certainly is possible if you bring Visual Studio and Windows Azure into the equation.

imageIt is possible to run your test rig in the cloud without getting tangled in SCVMM or Lab Management. All you need is an active Azure subscription, Windows Azure endpoint enabled developer workstation running visual studio ultimate on premise, windows azure endpoint enabled worker roles on azure compute instances set up to run as test controllers and test agents. My test rig is running SQL server 2012 and Visual Studio 2012 RC agents. The beauty is that the solution is reusable, you can open the azure project, change the subscription and certificate, click publish and *BOOM* in less than 15 minutes you could have your own test rig running in the cloud.

In this blog post I intend to show you how you can use the power of Windows Azure to effectively abstract the administration cost of infrastructure management and lower the total cost of Load & Performance Testing. As a bonus, I will share a reusable solution that you can use to automate test rig creation for both VS 2010 agents as well as VS 2012 agents.

Introduction

The slide show below should help you under the high level details of what we are trying to achive...

Leveraging Azure for Performance Testing

View more PowerPoint from Avanade

Scenario 1 – Running a Test Rig in Windows Azure

To start off with the basics, in the first scenario I plan to discuss how to,

image

- Automate deployment & configuration of Windows Azure Worker Roles for Test Controller and Test Agent

  • Automate deployment & configuration of SQL database on Test Controller on the Test Controller Worker Role
  • Scaling Test Agents on demand
  • Creating a Web Performance Test and a simple Load Test
  • Managing Test Controllers right from Visual Studio on Premise Developer Workstation
  • Viewing results of the Load Test
  • Cleaning up
  • Have the above work in the shape of a reusable solution for both VS2010 and VS2012 Test Rig
Scenario 2 – The scaled out Test Rig and sharing data using SQL Azure

A scaled out version of this implementation would involve running multiple test rigs running in the cloud, in this scenario I will show you how to sync the load test database from these distributed test rigs into one SQL Azure database using Azure sync. The selling point for this scenario is being able to collate the load test efforts from across the organization into one data store.

image

  • Deploy multiple test rigs using the reusable solution from scenario 1
  • Set up and configure Windows Azure Sync
  • Test SQL Azure Load Test result database created as a result of Windows Azure Sync
  • Cleaning up
  • Have the above work in the shape of a reusable solution for both VS2010 and VS2012 Test Rig
The Ingredients

Though with an active MSDN ultimate subscription you would already have access to everything and more, you will essentially need the below to try out the scenarios,

  1. Windows Azure Subscription
  2. Windows Azure Storage – Blob Storage
  3. Windows Azure Compute – Worker Role
  4. SQL Azure Database
  5. SQL Data Sync
  6. Windows Azure Connect – End points
  7. SQL 2012 Express or SQL 2008 R2 Express
  8. Visual Studio All Agents 2012 or Visual Studio All Agents 2010
  9. A developer workstation set up with Visual Studio 2012 – Ultimate or Visual Studio 2010 – Ultimate
  10. Visual Studio Load Test Unlimited Virtual User Pack.
Walkthrough

To set up the test rig in the cloud, the test controller, test agent and SQL express installers need to be available when the worker role set up starts, the easiest and most efficient way is to pre upload the required software into Windows Azure Blob storage. SQL express, test controller and test agent expose various switches which we can take advantage of including the quiet install switch. Once all the 3 have been installed the test controller needs to be registered with the test agents and the SQL database needs to be associated to the test controller. By enabling Windows Azure connect on the machines in the cloud and the developer workstation on premise we successfully create a virtual network amongst the machines enabling 2 way communication. All of the above can be done programmatically, let’s see step by step how…

Scenario 1

Video Walkthrough–Leveraging Windows Azure for performance Testing

Scenario 2

Work in progress, watch this space for more…

Solution

If you are still reading and are interested in the solution, drop me an email with your windows live id. I’ll add you to my TFS preview project which has a re-usable solution for both VS 2010 and VS 2012 test rigs as well as guidance and demo performance tests.

Conclusion

Other posts and resources available here.

image

Possibilities…. Endless!


Doug Mahugh (@dmahugh) posted Symfony on Windows Azure, a powerful combination for PHP developers to the Interoperability @ Microsoft blog on 6/29/2012:

imageSymfony, the popular open source web application framework for PHP developers, is now even easier to use on Windows Azure thanks to Benjamin Eberlei’s Azure Distribution Bundle project. You can find the source code and documentation on the project’s GitHub repo.

imageSymfony is a model-view-controller (MVC) framework that takes advantage of other open-source projects including Doctrine (ORM and database abstraction layer), PHP Data Objects (PDO), the PHPUnit unit testing framework, Twig template engine, and others. It eliminates common repetitive coding tasks so that PHP developers can build robust web apps quickly.

Azure Distribution BundleSymfony and Windows Azure are a powerful combination for building highly scalable PHP applications and services, and the Azure Distribution Bundle is a free set of tools, code, and documentation that makes it very easy to work with Symfony on Windows Azure. It includes functionality for streamlining the development experience, as well as tools to simplify deployment to Windows Azure.

Features that help streamline the Symfony development experience for Windows Azure include changes to allow use of the Symfony Sandbox on Windows Azure, functionality for distributed session management, and a REST API that gives Symfony developers access to Windows Azure services using the tools they already know best. On the deployment side, the Azure Distribution Bundle adds some new commands that are specific to Windows Azure to Symfony’s PHP app/console that make it easier to deploy Symfony applications to Windows Azure:

  • windowsazure:init – initializes scaffolding for a Symfony application to be deployed on Windows Azure
  • windowsazure:package – packages the Symfony application for deployment on Windows Azure

Benjamin Eberlei, lead developer on the project, has posted a quick-start video that shows how to install and work with the Azure Distribution Bundle. His video takes you through prerequisites, installation, and deployment of a simple sample application that takes advantage of the SQL Database Federations sharding capability built into the SQL Database feature of Windows Azure:

Whether you’re a Symfony developer already, or a PHP developer looking to get started on Windows Azure, you’ll find the Azure Distribution Bundle to be easy to use and flexible enough for a wide variety of applications and architectures. Download the package today – it includes all of the documentation and scaffolding you’ll need to get started. If you have ideas for making Symfony development on Windows Azure even easier, you can join the project and make contributions to the source code, or you can provide feedback through the project site or right here.

Symfony and Doctrine are often used in combination, as shown in the sample application mentioned above. For more information about working with Doctrine on Windows Azure, see the blog post Doctrine supports SQL Database Federations for massive scalability on Windows Azure.

Symfony and Doctrine have a rich history in the open source and PHP communities, and we’re looking forward to continuing our work with these communities to make Windows Azure a big part of the Symfony/Doctrine story going forward!

Doug Mahugh
Senior Technical Evangelist
Microsoft Open Technologies, Inc.


<Return to section navigation list>

Visual Studio LightSwitch and Entity Framework 4.1+

Joe Binder described Writing JavaScript Code in LightSwitch in a 7/3/2012 post to the Visual Studio LightSwitch blog:

imageWith the HTML Client Preview finally available, we thought it’d be useful to drill into the JavaScript coding experience that’s included in the preview so you have some new things to try. If you’re interested in authoring custom HTML, CSS, or performing complex data binding, keep reading! If you’re just getting started with the HTML client, you may want to read my earlier post on creating screens before working through this one.

In keeping with the LightSwitch methodology, code in the HTML client is the primary mechanism by which you can express the logic and behavior that’s very specific to your application scenario. Code fills the gaps between the boilerplate client-server plumbing and the specific business logic requirements that can’t be generalized; it’s your escape hatch when you need to enable a capability LightSwitch doesn’t natively support. And while we always strive to improve the UI-based experience for designing the application, writing business logic in code is a core part of LightSwitch’s offering.

LightSwitch today supports the following types of code:

  1. “Shared” entity business logic: defaulting field values, validation logic, computed properties. This code is run on the middle-tier and Silverlight client.
  2. Server-side business logic: behaviors associated with the Create, Read, Update, and Delete (CRUD) operations. This code is executed on the server when data is queried or received from the client during a save operation.
  3. Authorization logic: code that asserts the permissions required to access a screen, entity, or query.
  4. Custom query logic: complex LINQ expressions can be authored to intercept and augment queries defined in the designer.
  5. Screen and Presentation logic: behaviors associated with a button click; code that runs when a screen is created or before/after data on a screen is saved.

The HTML Client adds a classification of code entry points to customize or create UI programmatically. The Silverlight supports this type of logic through custom controls, but custom controls must be authored in a separate project, which can make some seemingly simple UI tweaks challenging. Based on feedback we’ve heard consistently in the forums, we wanted to make that process more natural for the HTML client. There are two main use cases we had in mind that pertain to customizing the UI programmatically:

  • Augment, restyle, or otherwise tweak the UI elements that LightSwitch creates. For example, if you’re displaying a list of invoices you may want to color the invoices that are overdue red. Or maybe you want to use custom CSS to restyle a built-in control on a specific screen.
  • Create custom UI on a specific screen. For example, use a jQueryMobile plugin for editing dates on a LightSwitch screen.

We used an event-based approach to enable each of the above use cases: The _postRender event allows you to add classes, restyle, and attribute the DOM elements LightSwitch creates; The _render event allows you to generate UI anywhere on a screen dynamically.

The _postRender event

The _postRender event is available on any control. It is fired after the underlying DOM element is created, allowing you to add classes, attributes, etc to the element before jQueryMobile expands it.

Consider a simple example to demonstrate the concept--let’s say I have a list of products and each product has a backorderd field. If the product is backordered, I want to display it in RED.

Product

Create a new “Browse” screen using the New Screen dialog that will display a list of products.

NewScreenDialog

Now create a ViewProductDetail screen, which we’ll link to from the BrowseProducts screen.

NewScreenDialog_ViewDetail

Now jump back to the BrowseProducts screen, and select the Product list in the designer. Configure the tap action for the list to show the View Detail screen.

EditTapAction

EditTapAction_Step2

Now select the item that represents the product list item and open the “Write Code” dropdown to select _postRender.

WriteCode_postRender

Once in code, you will notice that there are two parameters passed available in the _postRender function:

lightSwitchApplication.BrowseProducts.prototype.RowTemplate_postRender = 
function (element, contentItem) { };

The element parameter represents the root DOM/HTML element for the list item. In this case, that element is an <a> element because the list item is a hyperlink that launches the ViewProductDetail screen. The contentItem is the view model for the product—its value and meta-state, such as whether or not the product item is loaded, valid, etc.

To illustrate the basic functionality of each parameter, add the following code:

lightSwitchApplication.BrowseProducts.prototype.RowTemplate_postRender = 
function (element, contentItem) { if (contentItem.value.backordered) $(element).find("p").css("color", "red"); };

contentItem.value will return the product instance; we then check its backordered status and color the paragraph text for the list item accordingly using jQuery. If we run this code with some sample products, you can see that any backordered products are colored red:

clip_image011

This is a remarkably simple example, but it should give you a sense for the types of things you can do with the _postRender event. You can see another example—restyling the built-in list to use tiles—in an earlier post. …

Joe continues with detailed screen shots and sample code.


Return to section navigation list>

Windows Azure Infrastructure and DevOps

• Wely Lau (@wely_live) described Moving Applications to the Cloud: Part 2 – A Scenario-Based Example in a 7/4/2012 post:

imageIn my last post, I discussed some of the key considerations when moving an application to the cloud. To provide a better understanding, I’m using a simple scenario-based example to illustrate how an application could be moved to the cloud.

This article will explain the challenges a company might face, the current architecture of the example application, and finally what the company should expect when moving an application to the cloud. My next article will discuss the recommended solution in more detail.

Disclaimer

idelmaCompany name, logo, business, scenario, and incidents either are used fictitiously. Any resemblance to an actual company is entirely coincidental.

Background

Idelma is a ticket selling provider that sells tickets to concerts, sports event, and music gigs. Tickets are sold offline through ticket counters and online through a website called TicketOnline.

Customers visiting TicketOnline can browse list of available shows, find out more information on each show, and finally purchase tickets online. When a ticket is purchased, it’s reserved but will not be processed immediately. Other processes such as generating ticket and sending the generated ticket along with the receipt will be done asynchronously in a few minutes time.

Current Challenges

During peak season (typically in July and December), TicketOnline suffered from heavy traffic that caused slow response time. The traffic for off-peak season is normally about 100,000 to 200,000 hits per day, with the average of 8 to 15 on-going shows. In peak season, the traffic may reach five to seven times more than off-peak season.

The following diagram illustrates the web server hits counter of TicketOnline over the last three years.

Figure 1 – TicketOnline web server hits counter for the last three years

Additionally, the current infrastructure setup is not designed to be highly-available. This results in several periods of downtime each year.

The options: on-premise vs cloud

Idelma’s IT Manager Mr. Anthony recognizes the issues and decides to make some improvement to bring better competitive advantages to the company. When reading an article online, he discovered that cloud computing may be a good solution to address the issues. Another option would be to purchase a more powerful set of hardware that could handle the load.

With that, he has done a pros and cons analysis of the two options:

  • On-premise hardware investment

There are at least two advantages of investing in more hardware. One, they will have full control over the infrastructure, and can use the server for other purposes when necessary. Second, there might be less or no modification needed on the application at all, depending on how it is architected and designed. If they decide to scale up (vertically), they might not need to make any changes. However, if they decide to scale out (horizontally) to a web farm model, a re-design would be needed.

On the other hand, there are also several disadvantages of on-premise hardware investment. For sure, upfront investment in purchasing hardware and software are considered relatively expensive. Next, they would need to be able to answer the following questions: How much hardware and software should be purchased? What are the hardware specifications? If the capacity planning is not properly done, it may lead to either a waste of capacity or insufficient of capacity. Another concern is, when adding more hardware, more manpower might be needed as well.

  • Cloud

For cloud computing, there’s almost no upfront investment required for hardware, and in some cases software doesn’t pose a large upfront cost either. Another advantage is the cloud’s elastic nature fits TicketOnline periodic bursting very much. Remember, they face high load only in June and December. Another advantage would be less responsibility. The administrator can have more time to focus on managing the application since the infrastructure is managed by the provider.

Though there are a number of advantages, there are also some disadvantages when choosing a cloud platform. For one thing, they might have less control over the infrastructure. As discussed in the previous article, there might also be some architectural changes when moving an application to the cloud. However, these can be dealt with in a one-time effort.

The figure below summarizes the considerations between the two options:

Figure 2 – Considerations of an On-premise or Cloud solution

After looking at his analysis, Mr. Anthony believes that the cloud will bring more competitive advantages to the company. Understanding that Windows Azure offers various services for building internet-scale application, and Idelma is also an existing Microsoft customer, Mr. Anthony decided to explore Windows Azure. After evaluating the pricing, he is even more comfortable to step ahead.

Quick preview of the current system

Now, let’s take a look of the current architecture of TicketOnline.

Figure 3 – TicketOnline Current Architecture

  • TicketOnline web application

The web application is hosted on a single instance physical server. It is running on Windows Server 2003 R2 as operating system with Internet Information Services (IIS) 6 as the web server and ASP.NET 2.0 as the web application framework.

  • Database

SQL Server 2005 is used as database engine to store mainly relational data for the application. Additionally, it is also used to store logs such as trace logs, performance-counters logs, and IIS logs.

  • File server

Unstructured files such as images and documents are stored separately in a file server.

  • Interfacing with another system

The application would need to interface with a proprietary CRM system that runs on a dedicated server to retrieve customer profiles through asmx web service.

  • Batch Job

As mentioned previously, receipt and ticket generation will happen asynchronously after purchasing is made. A scheduler-based batch job will perform asynchronous tasks every 10 minutes. The tasks include verifying booking details, generating tickets, and sending the ticket along with the receipt as an email to customer. The intention of an asynchronous process is to minimize concurrent access load as much as possible.

This batch job is implemented as a Windows Service installed in a separated server.

  • SMTP Server

On-premise SMTP Server will be used to send email, initiated either from the batch job engine or the web application.

Requirements for migration

The application should be migrated to the cloud with the following requirements:

  • The customer expects a cost effective solution in terms of the migration effort as well as the monthly running cost.
  • There aren’t any functional changes on the system. Meaning, the user (especially front-end user) should not see any differences in term of functionality.
  • As per policy, this propriety CRM system will not be moved to the cloud. The web service consumption should be consumed in secured manner.
Calling for partners

As the in-house IT team does not have competency and experience with Windows Azure, Mr. Anthony contacted Microsoft to suggest a partner who is capable to deliver the migration.

Before a formal request for proposal (RFP) is made, he expects partner to provide the following:

  • High-level architecture diagram how the system will look when moving to the cloud.
  • Explanation of each component illustrated on the diagram.
  • The migration processes, effort required, and potential challenges.

If Microsoft recommends you as the partner, how will you handle this case? What will the architecture look like in your proposed solution?

The most exciting part will come in the next article when I go into more detail on which solution is recommended and how the migration process takes place.

This post was also published at ACloudyPlace blog.

One of Windows Azure’s first commercial applications was TicketDirect, an event ticketing organization described in an 11/17/2009 Microsoft Case Study.

Full Disclosure: I’m a paid contributor to Red Gate Software’s ACloudyPlace blog.


• David Linthicum (@DavidLinthicum) asserted “Power loss due to bad weather caused Amazon Web Services to fail a second time. Someone is falling down on the job” in a deck to his No excuse: Storms should not take down your cloud article of 7/3/2012 for InfoWorld’s Cloud Computing blog:

imageFor the second time this month, Amazon.com's Northern Virginia data center suffered an outage caused by a line of powerful thunderstorms coming through the area late Friday night. Disrupted services included Elastic Compute, Elastic Cache, Elastic MapReduce, and Relational Database Services. The outage has affected Instagram, Pinterest, Netflix, and Heroku, used by many startups and mobile apps. (The previous Amazon Web Services outage in Amazon.com's northern Virginia facilities occurred on June 14.)

imageI live a few miles from the larger cloud computing data centers, and I can tell you it was a bad storm that knocked out power and cell service in the region. Many people in the area are still waiting for power to return, and I spent much of Sunday using my typically idle chainsaw to open roads and move larger branches out of the way of doors and off cars. (You gotta have something to do if the Internet is not working, right?)

imageDespite the terrible weather, Amazon.com had no legitimate excuse for the outage. After all, most other cloud providers in the area were able to continue service. Powerful storms are not exactly an uncommon phenomenon in the mid-Atlantic region, so the data center should have been designed and run accordingly.

The people at any cloud provider need to drill fail-over scenarios and make sure the right mechanisms are in place for power loss and other normal consequences of weather, wherever they are located. The loss of power should never interrupt service.

I've often defended Amazon.com and other cloud providers that suffer outages from time to time. For the most part, their uptime records exceed that of many enterprise data centers. But these recent Amazon Web Services outages are unacceptable. We have the technology and capabilities to avoid loss of service -- with proper planning and investment in the appropriate technology.

At this point, I can only draw the miserable conclusion that the market leader in cloud services hasn't done either. Maybe customers should rely more on competing cloud platforms to reduce their risk.


My (@rogerjenn) Adding Windows Azure Preview Features to Subscriptions of Multiple Accounts of 7/3/2012 begins:

imageMy (@rogerjenn) Adding Windows Azure Preview Features to Your Subscription post of 6/8/2012 describes how to add Windows Azure June 2012 Preview features to your default account. However, adding Preview features to multiple accounts isn’t an intuitive process and, as far as I can tell, instructions for doing this aren’t readily accessible in Microsoft’s current documentation.

imageAfter you add June 2012 Preview features to your default account (OakLeaf Azure MSDN Subscription in my case), all Windows Azure features are enabled in the Navigation pane, as shown here:

image

Note: Web Sites, Virtual Machines and [Virtual] Networks are June 2012 Preview features and aren’t visible if you haven’t added Preview features to your default account.

You can’t select subscriptions without Preview features enabled in the Subscriptions list of configuration pages for Virtual Machines, Web Sites or [Virtual] Networks. …

The post continues with step-by-step instructions for adding Preview features to additional subscriptions.


My (@rogerjenn) Uptime Report for my Live OakLeaf Systems Azure Table Services Sample Project: June 2012 = 100% of 7/3/2012 begins:

imageMy live OakLeaf Systems Azure Table Services Sample Project demo runs two small Windows Azure Web role instances from Microsoft’s South Central US (San Antonio, TX) data center. This report now contains a full year of uptime data.

imageHere’s the usual Pingdom Monthly Report for June:

image

Here’s the detailed uptime report from Pingdom.com for June 2012:

image


Following is detailed Pingdom response time data for the month of June 2012:

image

And continues with a table of 13 months of uptime reports, as well as a description of the Azure Table Services Sample Project.


Brian Swan (@brian_swan) described PHP, Memcache, and Windows Azure Caching in a 7/3/2012 post:

imageYesterday, my colleague Larry Franks posted about Windows Azure Caching (Preview) and Ruby Cloud Services. As he points out, most of his post is relevant to any application using Windows Azure Caching, not just Ruby applications. He also pointed out that Windows Azure Caching supports the Memcache wire protocol. So, putting 2 and 2 together (not hard to do in this case), I figured I should be able to take a PHP application that uses the Memcache extension, deploy it as a Windows Azure Web Role, and it should “just work”. And, it does, but with the Caching service being a “preview”, the user experience isn’t as smooth as we’d like it to be, so I’m hoping to get your feedback.

imageI strongly suggest you read Larry’s post, especially the information about the co-located vs. dedicated options. I will be following Larry’s example by using a co-located cache. And, to keep things simple, my “application” will be a single file that uses code from Example #1 of the Memcache extension Basic Usage documentation.

Install the Windows Azure SDK for .NET

Unfortunately, installing the Windows Azure SDK for PHP does not (currently) get you the all the bits you need to use the Caching service. However, getting the bits is still fairly easy: run the WindowsAzureLibsForNet-x64.msi or the WindowsAzureLibsForNet-x86.msi (depending on your architecture) from the Windows Azure SDK for .NET – June 2012 download page. (Note: I’m assuming you also have the Windows Azure SDK for PHP installed.)

Create a Windows Azure PHP Web Role

Rather than repeat the steps for creating a PHP Web Role, I’ll refer you to a post I wrote a couple of weeks ago: Creating a PHP Web Role in Windows Azure (you can probably start with the Import your publish settings section). However, when you get to the Customize your PHP configuration section, you will need to add the php_memcache.dll file to the ext folder (not the php_mongo.dll file as shown in my example) and the Memcache extension will need to be enabled in the php.ini file.

Note: If you don’t have the php_memcache.dll file, I recommend getting the correct version from Pierre Joye’s archive of extensions here: http://downloads.php.net/pierre/.

Edit the Service Definition and Service Configuration Files

Enabling the Caching service (currently) requires that you manually edit the service definition (.csdef) and service configuration (.cscfg) files. So, after you have created your PHP Web Role, open the ServiceDefinition.csdef and ServiceConfiguration.Cloud.cscfg files in your favorite text editor and make the following additions:

In the ServiceDefinition file…

1. Import the caching module by adding the following element as a child of the <Imports> element:

<Import moduleName="Caching" />

2. Add a local store by adding the following element as a child of the <WebRole> element:

<LocalResources> 
   <LocalStorage cleanOnRoleRecycle="false"  name="Microsoft.WindowsAzure.Plugins.Caching.FileStore" sizeInMB="1000"/> 
</LocalResources>

3. Add an endpoint that the client will use to access the cache using the Memcache protocol by adding the following element as a child of the <Endpoints> element:

<InternalEndpoint name="memcache_default" protocol="tcp" port="11211" />

In the ServiceConfiguration file…

Add the following elements as children of the <ConfiguratinSettings> element (replacing “your_storage_account_name” and “your_storage_account_key” with the appropriate values):

<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value=""/>
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.Loglevel" value=""/>
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30"/>
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="DefaultEndpointsProtocol=https;AccountName=your-storage_account_name;AccountKey=your_storage_account_key"/>
Modify your Memcache connection code

The server name in your Memcache connection code is of the form localhost_webRoleName, where webRoleName is the name of your Web Role. In the example in my previous post, I used myWebRole as the Web Role name, so my Memcache connection code looks like this:

$memcache = new Memcache;
$memcache->connect('localhost_myWebRole', 11211) or die ("Could not connect");

As I mentioned earlier, the rest of my “application” is the code from Example #1 of the Memcache extension Basic Usage documentation.

Publish your application

You can now publish your application (or test it in the emulator). If you are following my simple example, you should see something like this:

Screen Shot 2012-07-02 at 12.17.19 PM

That’s it! I know that the Windows Azure team is looking at ways to make enabling the Caching service easier. We’d love to hear your feedback on this, as well as any feedback you have on the service itself.


David Pallman described Applying the Factory Model to Bulk Cloud Migration in a 6/30/2012 post:

Download white paper

imageThis post discusses moving applications to the public cloud in bulk, where dozens or hundreds of applications are in view. After reviewing the challenges and opportunities inherent in bulk migration, an efficient factory-based approach is outlined. Lastly, Neudesic’s bulk migration service for the Windows Azure platform is described, Azure Migration Factory. Here's what we'll cover:

  • The Nature of Cloud Migrations
  • Challenges and Opportunities Inherent in Bulk Migrations
  • A Factory Model Approach to Cloud Migration
  • Neudesic’s Azure Migration Factory
  • Summary

    imageNOTE: Everything described here is equally applicable to both Infrastructure-as-a-Service (IaaS) and Platform-as-a-Service (PaaS) cloud computing. The term “application” refers to the IT assets that make up a software solution. When targeting PaaS, “application” means one or more sets of software code, configuration, and data that work together. When targeting IaaS, “application” means one or more virtual machines containing software, configuration, and data that work together. In either case, the “software” could refer to existing custom-developed code and/or a commercial product.

    The Nature of Cloud Migrations

    Before we contrast individual migrations with bulk migrations, let’s briefly review the common ground intrinsic to any production cloud migration. There are application-level activities to perform as well as organizational readiness activities.

    Application Activities: Assessment, Planning, Technical Work, Support

    Whether one is migrating a single application to the cloud or a dozen, certain things always need to be done. An assessment provides the business and technical analysis needed to make a sound go/no-go decision on moving to the cloud. A migration plan identifies the activities and sequence needed for an orderly and non-disruptive migration. The migration itself is technical work that entails a variety of IT, development, and QA tasks. The people, processes, and systems responsible for monitoring and management need to support the application in its new setting.

    Organizational Activities: Strategy, Compliance, Integration, Adaptation

    There are also organizational activities that must accompany cloud migration. These include: defining a cloud strategy and setting policies and guidelines on appropriate uses; ensuring buy-in across the company from stakeholder departments who must be satisfied about security, risk management, compliance, management, and disaster recovery; integration projects to ensure cloud-hosted assets can interoperate with internal systems; and adaptation of existing application lifecycle processes (deployment, management) to accommodate cloud-hosted applications.

    Typically these organizational activities are trigged by the first production migration to the cloud, and refined over time as experience and comfort level with the cloud increases. In some ways, the first migration is the most expensive migration.

    Challenges & Opportunities Inherent in Bulk Migrations

    Bulk migrations bring both challenges and opportunities:

    Challenges

    A bulk migration is a serious commitment. Whereas an individual application migration might be sponsored by a single department, a bulk migration implies broad buy-in by departments across the organization on a cloud strategy and supporting operational changes. A bulk migration isn’t likely to happen until there is a strong degree of confidence and consensus by stakeholder departments on cloud vision, platform/provider, and integration partner. A proof-of-concept often precedes a bulk migration to validate the platform and partners.

    A bulk migration is challenging to estimate properly. In a single-application migration the candidate application can be deeply studied. In a bulk migration you rarely have that luxury and need to make high-level estimates based more on tribal knowledge about applications and less on direct examination of code.

    A bulk migration represents a sizeable effort, one that needs to be carefully managed. Surprises can surface in the midst of any application migration; when performing a large number of migrations in parallel a mounting number of surprises could quickly put the budget and timeline at risk if not managed well.

    A bulk migration may encounter product obstacles. Products your software is dependent on may or may not be compatible with the cloud. Even without technical hurdles, you may be unable to use some products in the cloud for licensing and support reasons. In these cases, development work may be needed to replace some parts of your technology platform with cloud-friendlier equivalents. This is not always bad news, as it may do away with licensing costs.

    A bulk migration requires organizational cooperation. Even if a migration is being performed by an integration partner, the customer needs to participate. The migration teams will need a supply line by which they can receive, in a timely fashion, application assets (such as source code and database scripts), answers to technical questions (such as environmental information), and assistance integrating to internal systems. If the customer can’t serve in this supporting role and keep pace with the migration teams, the migration effort will be held back. The organization also needs to provide user acceptance testing to sign off on migrated applications.

    Opportunities

    Although a bulk migration does bring its challenges, it also brings opportunities. There are financial and technical reasons to favor a bulk migration over a one-app-at-a-time approach.

    A bulk migration can reduce average application migration time by taking advantage of repeatable tasks, especially when there are multiple applications that share the same architecture and technology platform. Repeat work is an opportunity to increase velocity.

    A bulk migration can save money. Operational costs in the cloud can be reduced by consolidating applications and data in shared cloud resources where it makes sense rather than provisioning each application individually. Analysis, development, IT, and QA activities are more efficient and less costly across a series of applications as opposed to ramping up for applications individually. “Cookie cutter work” can be codified as step-by-step procedures and handled by less expensive resources. Licensing costs could be reduced by moving to application or database platforms that don’t require licensing (for example, from IBM WebSphere in the enterprise to Tomcat in the cloud).

    A bulk migration provides better insights. When applications are migrated individually, decisions about strategy and adapting existing processes and systems are based on a partial view that gets refined over time. In a bulk migration, there’s a large body of evidence to consider all at once: analysis, financial modeling, strategy, and organizational impact are all based on a fuller picture. This makes for better initial decisions.

    A bulk migration is an opportunity for uniformity. As applications are migrated, they can also be retrofitted. For example, all web sites being migrated could be retrofitted to use a common analytics system. If instrumented for monitoring, applications can be configured for auto-scaling, where deployment size is dynamically altered to match changes in load.

    A Factory Model Approach to Bulk Cloud Migration

    Cloud assessment and migration of multiple applications can be handled well using a factory approach. The majority of personnel are allocated to migration teams that make up the factory. QA teams validate the correctness of what the factory produces. An Advance Team analyzes applications first and keeps the factory equipped for the types of work it needs to do. An Exceptions Team supports factory members, helping with problems and sometimes taking over difficult migrations directly.

    Factory Model Cloud Migration


    Let’s review the teams that make up this model, their responsibilities, and how they interact.

    The Factory: Migration Teams Performing Repeatable Technical Work

    The “factory” is one or more technical teams who are able to rapidly perform migration tasks. The high velocity is due to repeatable work of the same nature (“cookie cutter” jobs), steered by concrete guidance. This type of work favors a heavy offshore component to keep costs down. Migration tasks could be complete migrations (e.g. “migrate a PHP web site”) or assembly-line style partial tasks (e.g. “update this application to use a cloud-based caching service“).

    Like a physical factory, one or more supervisors are needed to oversee how things are going and ensure the factory is humming along as it should be. Problems that stop the assembly line need to be dealt with swiftly.

    The Advance Team: Equips the Factory for New Kinds of Work

    The factory only knows how to manufacture what is has been configured to make. Someone needs to teach it new tricks to handle new kinds of applications or variations on past patterns. The Advance Team consists of architects and technology subject matter experts who analyze applications before they are handed off to the factory, categorizing them as previously-encountered types or something new. New kinds of applications are studied, and updated migration guidance for the factory is created. If the new tasks are significantly novel, factory members may need to be formally trained on the new pattern. The advance team also sizes the migration effort required.

    The Advance Team receives feedback from the Exceptions Team on how migration work is going. This feedback loop drives continual improvements into the guidance based on experiences using it.

    The Exceptions Team: Supports the Factory and Takes Over Difficult Migrations

    The factory model is all well and good, but occasional surprises and difficulties are inevitable. The Exceptions Team supports the migration teams and helps them through problems with support. If necessary, the Exceptions Team will take over a difficult migration directly. Unusual, one-of-a-kind, or highly complex migrations will be handled by the Exceptions Team.

    The QA Teams: Validation of Completed Migrations

    The quality assurance teams test migrations produced by the factory to confirm quality requirements are met and the migrated apps have fidelity to the original apps. Often this will consist of a cursory check (performed by the integration partner) followed by user acceptance testing (performed by the owner organization). In the case of simple web site migrations, the first-level quality check might consist of side-by-side comparisons of the original and migrated web site, walking through the site by following its navigation and ensuring pages display and interact identically.

    How We Do It: Neudesic’s Azure Migration Factory

    Azure Migration Factory is Neudesic’s bulk cloud migration service offering for Microsoft’s Windows Azure cloud computing platform. It implements the factory model approach as described earlier and supports both Platform-as-a-Service and Infrastructure-as-a-Service migration.

    In Neudesic’s adoption of the process, a project management office is staffed by Neudesic and client managers; migration teams are primarily staffed with offshore resources; the advance team is staffed with architects, Windows Azure experts, and technology subject matter experts; and the QA/UAT teams are staffed by a mix of Neudesic and customer quality engineers.

    Azure Migration Factory


    The PMO

    Proactive, ongoing management is a cornerstone of Azure Migration Factory. A project management office consisting of Neudesic and client personnel oversee the ongoing migration effort. There are regular meetings to review how the teams are doing against projections; and to determine whether any changes are needed to the size or composition of teams. Work typically proceeds in waves, where forecasts of upcoming work are used to ramp up teams or decommission teams smoothly as the workload changes.

    The Advance Team: Architects and Subject Matter Experts

    The Advance Team consists of architects, Windows Azure experts, and subject matter experts on application technologies such as .NET, Java, or PHP.

    During the assessment process, the advance team evaluates migration candidates and performs a sizing to small, medium, or large which equates to a 1-, 2-, or 4-week migration effort. Early in the process, customers are provided with sizing guidelines so that a preliminary scoping of the effort can be roughed out; some of these findings may be revised once the applications are analyzed directly by the advance team.

    Applications are categorized using an application patterns catalog for which step-by-step migration guidance has been prepared. The catalog is updated when new application architectures or technology platforms are encountered, or when a variation of an existing pattern needs to be accounted for. At the customer’s option, the assessment process can run in parallel and slightly ahead of the migration effort; alternatively, all apps can be assessed before the migration effort gets underway.

    The Factory: Offshore Teams in a Scalable Pod Structure

    Migration teams are made up of “pods” of consultants with a set size, primarily consisting of offshore consultants. Pods can vary in their skill set and platform knowledge, for example a .NET pod or a PHP pod. The customer can balance migration speed vs. spend rate through the number of pods approved to work in parallel.

    Neudesic is able to migrate many kinds of applications to the cloud by leveraging its technology practices, which include Business Intelligence, Connected Systems, CRM/Dynamics, Custom Application Development, Mobility, Portals & Collaboration.

    The Exceptions Team: Experienced Consultants with Relevant Experience

    The Exceptions Team consists of experienced consultants who keep the migration effort on track by quickly unblocking migration teams when they run into problems. They do this through support and, if necessary taking over migration of especially difficult or unusual migrations.

    Neudesic QA Teams paired with Customer UAT Teams

    Neudesic Quality Assurance teams verify migration success, reporting issues back to the appropriate migration team if results do not match expected appearance and behavior. Customer User Acceptance Teams then confirm whether migrated applications meet their expectations.

    Windows Azure Expertise

    The breadth of the Windows Azure platform allows migration to target the most appropriate mode for an application: Platform-as-a-Service, Infrastructure-as-a-Service, or managed web sites. Neudesic’s Windows Azure experts are experienced across the entire platform and include Microsoft-recognized MVPs.

    Accelerators: Unique Intellectual Property

  • Neudesic has unique intellectual property in the form of libraries and tools that accelerate the analysis and migration of applications to Windows Azure. This includes tools that partially automated the analysis of applications.

  • Management and Support Services

    Customers who migrate to the cloud in bulk are often also in need of a partner for support and management. Neudesic offers support and management services for cloud applications through the Neudesic Managed Services group.

    Training Services

    Neudesic provides Windows Azure training services for customers who wish to bring cloud skills in-house to their development and IT groups.

    Summary

    Once an organization has completed evaluating a cloud platform and is ready for production migration, they have the option of individual migrations or bulk migration. For companies with large numbers of applications, bulk migrations—if planned and executed properly—offer great economy of scale. The cost of migrating applications can be drastically lowered when they are part of a group effort. Operational costs in the cloud may also be lowered by finding opportunities to co-locate applications and data on shared resources.

    Bulk cloud migrations are best served by a factory approach, in which similar applications and migration tasks can be made cookie-cutter and easily repeatable. In this model the “factory” are lower-rate migration teams who make up the majority of the work force. The factory is supported by an advance team, an exceptions team, and QA teams.

    Applications migrated together can be retrofitted for uniform methods of monitoring and analytics; and configured for auto-scaling.

    Neudesic has implemented the factory approach for the Windows Azure platform in its Azure Migration Factory service offering.

    Large-scale migrations require large-scale thinking. The factory approach described here provides a scalable pool of affordable migration resources, coupled with the support of senior resources necessary to ensure success.

    Neudesic - The Trusted Technology Partner in Business Innovation
    http://www.neudesic.com
    http://cloud-assessment.com


  • Shaun Xu (@shaunxu) continued his series with Windows Azure Evolution &ndash; Deploy Web Sites (WAWS Part 3) on 6/24/2012 (missed when posted):

    imageThis is the sixth post of my Windows Azure Evolution series. After talked a bit about the new caching preview feature in the previous one, let’s back to the Windows Azure Web Sites (WAWS).

    Git and GitHub Integration

    imageIn the third post I introduced the overview functionality of WAWS and demonstrated how to create a WordPress blog through the build-in application gallery. And in the fourth post I covered how to use the TFS service preview to deploy an ASP.NET MVC application to the web site through the TFS integration. WAWS also have the Git integration.

    I’m not going to talk very detailed about the Git and GitHub integration since there are a bunch of information on the internet you can refer to. To enable the Git just go to the web site item in the developer portal and click the “Set up Git publishing”.

    image

    After specified the username and password the windows azure platform will establish the Git integration and provide some basic guide. As you can see, you can download the Git binaries, commit the files and then push to the remote repository.

    image

    Regarding the GitHub, since it’s built on top of Git it should work. Maarten Balliauw have a wonderful post about how to integrate GitHub to Windows Azure Web Site you can find here.

    WebMatrix 2 RC

    WebMatrix is a lightweight web application development tool provided by Microsoft. It utilizes WebDeploy or FTP to deploy the web application to the server. And in WebMatrix 2.0 RC it added the feature to work with Windows Azure.

    First of all we need to download the latest WebMatrix 2 through the Web Platform Installer 4.0. Just open the WebPI and search “WebMatrix”, or go to its home page download its web installer.

    001

    Once we have WebMatrix 2, we need to download the publish file of our WAWS. Let’s go to the developer portal and open the web site we want to deploy and download the publish file from the link on the right hand side.

    002

    This file contains the necessary information of publishing the web site through WebDeploy and FTP, which can be used in WebMatrix, Visual Studio, etc..

    Once we have the publish file we can open the WebMatrix, click the Open Site, Remote Site. Then it will bring up a dialog where we can input the information of the remote site. Since we have our publish file already, we can click the “Import publish settings” and select the publish file, then we can see the site information will be populated automatically.

    003

    Click OK, the WebMatrix will connect to the remote site, which is the WAWS we had deployed already, retrieve the folders and files information. We can open files in WebMatrix and modify. But since WebMatrix is a lightweight web application tool, we cannot update the backend C# code. So in this case, we will modify the frontend home page only.

    004

    After saved our modification, WebMatrix will compare the files between in local and remote and then it will only upload the modified files to Windows Azure through the connection information in the publish file.

    005

    Since it only update the files which were changed, this minimized the bandwidth and deployment duration. After few seconds we back to the website and the modification had been applied.

    006

    Visual Studio and WebDeploy

    The publish file we had downloaded can be used not only in WebMatrix but also Visual Studio. As we know in Visual Studio we can publish a web application by clicking the “Publish” item from the project context menu in the solution explorer, and we can specify the WebDeploy, FTP or File System for the publish target. Now we can use the WAWS publish file to let Visual Studio publish the web application to WAWS.

    Let’s create a new ASP.NET MVC Web Application in Visual Studio 2010 and then click the “Publish” in solution explorer. Once we have the Windows Azure SDK 1.7 installed, it will update the web application publish dialog. So now we can import the publish information from the publish file.

    007

    Select WebDeploy as the publish method.

    We can select FTP as well, which is supported by Windows Azure and the FTP information was in the same publish file.

    008

    In the last step the publish wizard can check the files which will be uploaded to the remote site before the actually publishing. This gives us a chance to review and amend the files. Same as the WebMatrix, Visual Studio will compare the files between local and WAWS and determined which had been changed and need to be published.

    009

    Finally Visual Studio will publish the web application to windows azure through WebDeploy protocol.

    010

    Once it finished we can browse our website.

    011

    FTP Deployment

    The publish file we downloaded contains the connection information to our web site via both WebDeploy and FTP. When using WebMatrix and Visual Studio we can select WebDeploy or FTP. WebDeploy method can be used very easily from WebMatrix and Visual Studio, with the file compare feature. But the FTP gives more flexibility. We can use any FTP client to upload files to windows azure regardless which client and OS we are using.

    Open the publish file in any text editor, we can find the connection information very easily. As you can see the publish file is actually a XML file with WebDeploy and FTP information in plain text attributes.

    012

    And once we have the FTP URL, username and password, when can connect to the site and upload and download files. For example I opened FileZilla and connected to my WAWS through FTP.

    013

    Then I can download files I am interested in and modify them on my local disk. Then upload back to windows azure through FileZilla.

    014

    Then I can see the new page.

    015

    Summary

    In this simple and quick post I introduced vary approaches to deploy our web application to Windows Azure Web Site. It supports TFS integration which I mentioned previously. It also supports Git and GitHub, WebDeploy and FTP as well.

    All documents and related graphics, codes are provided "AS IS" without warranty of any kind.

    Copyright © Shaun Ziyan Xu. This work is licensed under the Creative Commons License.


    <Return to section navigation list>

    Windows Azure Platform Appliance (WAPA), Hyper-V and Private/Hybrid Clouds

    image_thumb2No significant articles today.


    <Return to section navigation list>

    Cloud Security and Governance

    The Trust Services Team sent the following Microsoft Codename "Trust Services"  lab update pre-announcement message to registered users on 7/3/2012:

    imageAs a registered user of Microsoft Codename "Trust Services" lab I’m pleased to inform you that the lab will be refreshed next week (9th July 2012) with additional improvements and features [link added]:

    • imageSearch on encrypted data
    • Encryption of streams
    • Separation of roles for data policy administration, publishing and consumption

    image_thumbPlease note that after the lab refresh is done you will not be able to access the previous versions of :

    • The client-side "Trust Services" SDK

    If you wish to use this refreshed lab, you have to register again. [Emphasis added.]

    Your feedback will shape the future direction of this service. We look forward to hearing from you!


    <Return to section navigation list>

    Cloud Computing Events

    • Seb from AlfaPeople posted Interesting event Azure related (XRM Virtual Group) on 7/2/2012 to his Mind the Cloud blog:

    imageThe XRM User Group will host [on 7/3/2012] a very interesting webcast, which some of the Azure & MS CRM enthusiasts will like it; see description from their website:

    Windows Azure 2012 Spring Wave and what it means for CRM

    Shan McArthur will discuss some of the highlights of the important changes made to Windows Azure in the 2012 spring wave and how you can leverage some of the new changes in your CRM environment.

    Focus will be on Azure Web Sites and the new deployment model for your xRM Portals or extensions as well as Azure Virtual Machines where you can set up development or demo CRM environments running in the cloud.

    Link to Meeting


    <Return to section navigation list>

    Other Cloud Computing Platforms and Services

    • My (@rogerjenn) Google I/O 2012 Day 2 Keynote by Urs Hölzle Senior VP of Engineering: Google Compute Engine Announcement post of 7/4/2012 begins:

    imageYouTube’s video archive of Urs Hölzle’s Google Compute Engine announcement during the Google I/O 2012 Day 2 Keynote includes an interactive transcript. Following is a excerpt from the transcript starting at 00:36:07 and ending at 00:47:01. …

    image

    The transcript includes details of the Institute for Systems Biology’s 770,000-core genome data crunching application and the Google/IBS Genome Engine (above.)


    Stuart Johnston (@stuartj1000) posted Google delivers IaaS cloud without Windows support on 7/2/2012 to TechTarget’s SearchCloudComputing blog:

    imageGoogle launched its IaaS platform last week to compete with AWS and Windows Azure, but the Web giant may have an uphill battle with a cloud offering that only supports open source operating systems.

    The Google Compute Engine, revealed during the Google I/O conference in San Francisco last Thursday, is an Infrastructure as a Service (IaaS) platform that allows customers to launch and manage virtual machines (VM) running either Ubuntu or CentOS Linux on one, two, four or eight virtual core instances with 3.75 GB of RAM per virtual core.

    imageGoogle executives emphasized its Compute Engine's scalability by demonstrating a genomics research application running on 600,000 virtual cores.

    Some industry watchers said IaaS is the right direction, but others are a little confounded by Google's vision.

    "The one thing that jumped out at me is they only support Linux in general -- and Ubuntu and CentOS specifically," said Mark Eisenberg, director at Fino Consulting, an enterprise application and cloud integration firm based in New York.

    That seems pretty restrictive for an offering that is supposed to be based on empty VMs that customers configure in any manner they choose, he added.

    imageOthers agreed that a lack of Windows support will keep enterprise shops from using Google’s IaaS.

    "Being Linux-only cuts the number of potential enterprise users by a substantial percentage," said Roger Jennings, a Windows Azure MVP and developer in Oakland, Calif.

    Google, Microsoft and AWS bet on IaaS
    In early June, Microsoft announced updates to its Windows Azure cloud service to make it an IaaS player akin to Amazon Web Services (AWS), which also supports Windows.

    image_thumb[8]Though Google Compute Engine only offers open source OS support, industry watchers say that Google has entered the IaaS game for the same reason Microsoft did.

    image“Customers are not buying into [Platform as a Service] and the money is all in IaaS until 2015," Eisenberg said.

    PaaS providers have discovered they need to support existing application models, and in many ways, IaaS is more suitable for that than typical PaaS offerings, said Al Hilwa, program director for applications development software at research group IDC, based in Framingham, Mass.

    "While early adopters in cloud have been a lot of consumer, social and mobile apps, enterprise is where the money is ultimately, and offering a portfolio of IaaS and PaaS, including hybrid and compatible private cloud capabilities, is ultimately what is needed," Hilwa said.

    imageMost analysts consider Google’s new service to be an Amazon competitor, but Jennings considers it more of a Windows Azure competitor, when compared to Microsoft's June rollout of Persistent VM Roles.

    In fact, AWS has little to fear from Google, at least for the time being, said Jennings.

    "Google Compute Engine is a fledgling no-frills IaaS offering from an organization that knows how to keep a massive big data infrastructure running in the cloud," he said.

    Google Compute Engine is available only as a limited preview so far and is still a ways from commercial release.

    Full Disclosure: I’m a paid contributor to SearchCloudComputing.com.


    Richard Seroter (@rseroter, pictured below) asked Is PaaS PLUS IaaS the Killer Cloud Combination? in a 7/2/2012 post:

    imageGeorge Reese of enstratus just wrote a great blog post about VMware’s cloud strategy, but I zeroed in on one of his major sub-points. He mentions that the entrance into the IaaS space by Google and Microsoft signifies that PaaS isn’t getting the mass adoption that was expected.

    imageIn short, Microsoft and Google moving into the IaaS space is the clearest signal that Platform as a Service just isn’t ready for the big leagues yet. While their respective PaaS offerings have proven popular among developers, the level of adoption of PaaS services is a rounding error in the face of IaaS adoption.

    image_thumb[8][4]The move of Google and Microsoft into the IaaS space may ultimately be a sign that PaaS isn’t the grand future of cloud everyone has been predicting, but instead just a component of a cloud infrastructure—perhaps even a niche component.

    I highlighted the part in the last sentence. Something that I’ve seen more of lately, and appreciate more now that I work for Tier 3, is that PaaS is still really ahead of its time. While many believe that PaaS is the best cloud model (see Krish’s many posts on PaaS is the Future of Cloud Services), I think we’ve seen some major companies (read: Google and Microsoft) accept that their well-established PaaS platforms simply weren’t getting the usage they wanted.

    One could argue that has something to do with the platforms themselves, but that would miss the point. Large companies seem to be now asking “how” not “why” when it comes to using cloud infrastructure, which is great. But it seems we’re a bit of a ways off from moving up the stack further and JUST leveraging application fabrics.

    During the recent GigaOM Structure conference, there was still a lot of focus on IaaS topics, but Satya Nadella, the president of Microsoft’s Server and Tools Business, refused to say that Microsoft’s PaaS-first decision was the wrong idea. But, he was realistic about needing to offer a more comprehensive set of options.

    Did Microsoft make a mistake having #Azure do PaaS before IaaS? Satya Nadella says no, but IaaS should drive PaaS awareness. #structureconf
    Richard Seroter (@rseroter) June 21, 2012

    One reason that I joined Tier 3 was because I liked their relatively unique story of having an extremely high quality IaaS offering, while also offering a polyglot PaaS service. Need to migrate legacy apps, scale quickly, or shrink your on-premises data center footprint? Use our Enterprise Cloud Platform (IaaS). Want to deploy a .NET/Ruby/Node/Java application that uses database and messaging services? Fire up a Web Fabric (PaaS) instance. Need to securely connect those two environments together using a private network? We can do that too.

    @rseroter @wendywhite @vambenepe Either way, I agree that @tier3 let’s you “blend” IaaS & PaaS and think that is great…—
    Dave McCrory (@mccrory) June 29, 2012

    It seems that we all keep talking about AWS and whether they have a PaaS or not, but maybe they’ve made the right short-term move by staying closer to the IaaS space (for whatever these cloud category names mean anymore). What do you think? Did Microsoft and Google make smart moves getting into the IaaS space? Are the IaaS and PaaS workloads fundamentally different, or will there be a slow, steady move to PaaS platforms in the coming years?

    I believe IaaS users will migrate to PaaS platforms as they become aware of the overhead required to keep Virtual Machines updated and upgraded over the years.


    • James Urquhart (@jamesurquhart) explained Why performance will help Google steal cloud customers from Amazon in a 7/1/2012 post to GigaOm’s Structure blog:

    imageThis week’s announcement by Google of its new Google Compute Engine cloud offering is a big deal, and GigaOM’s coverage to date has been pretty spot on. However, having read the excellent coverage by Om Malik and Derrick Harris, as well as some interesting analysis on other sites (like here and here), I’m stuck with the feeling that most are missing the real reason Google will get some stalwart Amazon Web Services customers to give Compute Engine a try. Google’s quest to win over users will be all about performance.

    The Google Developers Blog post announcing the service broke down three key “offers” of GCE, which I interpret as the three key differentiators from Google’s perspective of its service over the competition (not necessarily just AWS):

    • Scale. At Google we tackle huge computing tasks all the time, like indexing the web, or handling billions of search queries a day. Using Google’s data centers, Google Compute Engine reduces the time to scale up for tasks that require large amounts of computing power. You can launch enormous compute clusters – tens of thousands of cores or more.
    • Performance. Many of you have learned to live with erratic performance in the cloud. We have built our systems to offer strong and consistent performance even at massive scale. For example, we have sophisticated network connections that ensure consistency. Even in a shared cloud you don’t see interruptions; you can tune your app and rely on it not degrading.
    • Value. Computing in the cloud is getting even more appealing from a cost perspective. The economy of scale and efficiency of our data centers allows Google Compute Engine to give you 50% more compute for your money than with other leading cloud providers. You can see pricing details here.
    Scale and price matter, but …

    imageAll of the coverage I’ve read to date has focused on the scale and value elements of Google’s story. And these are critically important. When it comes to scale, few can match a launch that includes roughly 100,000 servers and 770,000 cores of available capacity (though I doubt you’ll be able to grab half that for yourself in a few weeks). Google does scale for a living, and with a reported 1 million servers in operation across the company, nobody comes close — except maybe Amazon.

    When it comes to value, Google fired a shot across AWS’s bow with roughly equivalent pricing, though Google argues that app-for-app, their service will be cheaper—or, as it says, “50% more compute for your money than with other leading cloud providers.” Other analysis questions this, and certainly any advantage Google has today will be challenged quickly by Amazon, given its own history of reducing prices.

    Performance is Google’s ace in the hole

    image_thumb[8][6]However, I think the key potential differentiator for Google, if it wants to take market share from AWS, is the performance of the cloud infrastructure itself. If Google can deliver a service that eliminates most of the I/O and network performance inconsistencies that AWS customers currently experience, I can guarantee you there are many major compute customers of AWS that will want to give Compute Engine a test run.

    The I/O experience alone has been a real thorn in the side of many technologists, who — despite having designed applications to account for performance inconsistency — have real concerns about whether their applications can run as efficiently as possible in such an environment. If Google’s performance claims are confirmed, you will see one or two large-scale AWS customers begin to spread their compute loads between the two services by the middle of 2013. Heck, at least one may actually move off of EC2 altogether.

    Still, if performance turns out to be not significantly better than AWS, or if there are other major limitations to the Compute Engine service, those customers will quietly put to rest their experiments and return to the “tried and true” AWS service that they know. And others will no doubt use Compute Engine, even if it’s not the best thing since sliced bread, turning it into a real contender in the cloud computing space but nothing near an AWS killer. The scale and value stories are legitimate, they’re just not compelling enough by themselves to drive too many customers to change how they do cloud computing.

    Feature image courtesy of Shutterstock user David Castillo Dominici;

    Full disclosure: I’m a registered GigaOm analyst.


    • Judah Johns posted Your Cloud Instance Just Died. We're Sorry to the Jelastic blog on 6/30/2012:

    Why Does AWS Keep Failing?

    imageIt seems like in the last few months, Amazon Web Services has suffered a number of massive outages–outages that have affected millions upon millions of people. When you knock Netflix, Pinterest and Instagram offline, you are going to make a lot people unhappy. But not only that, last night, AWS went down taking Heroku and DotCloud, two of our competitors offline. This time, it was due to a massive thunderstorm in Northern Virginia. But, one has to wonder, how did this happen? This outage makes Amazon look like an amateur in the game: it’s been over 10 years since we’ve heard of hosting service provider losing power to the raised floor in the datacenter. When you are that big, and you are the primary service provider for so many services, when you go down, people notice–especially those that are doing it right and wondering how you let this happen to you.

    Amazon was the only DC provider to go down in Ashburn, one of the biggest datacenter hubs in the US.

    Datacenterknowledge.com has this to say:

    The Washington area was hit by powerful storms late Friday that left two people dead and more than 1.5 million residents without power. Dominion Power’s outage map showed that sporadic outages continued to affect the Ashburn area. Although the storm was intense, there were no immediate reports of other data centers in the region losing power. Ashburn is one of the busiest data center hubs in the country, and home to key infrastructure for dozens of providers and hundreds of Internet services.

    I am not one to kick someone while they’re down, but I do want to take second to point out a few things. First, it seems that Amazon isn’t the most reliable infrastructure out there. Secondly, it’s never smart to put all of your mission critical stuff in one place, as it seems that Heroku and DotCloud have done. And lastly, when you are looking at providers, it’s a good idea to check their reputation–something we make it a point to do here at Jelastic. In fact, from March of 2006 up until now, our US service provider, ServInt, has had 99.99% uptime! That’s over 2,200 days straight! In this industry, that’s unheard of: even the biggest name in the game, Amazon, doesn’t even come close.

    Reliability. It really does matter.

    Not even 15 miles from the AWS US-East datacenter that had the outages is ServInt’s Reston datacenter that houses Jelastic-US. Even ServInt’s COO, Christian Dawson, was without power at his home for 15 hours, but his datacenter was up and running, making sure Jelastic was available through the storm. If that doesn’t sum it up, nothing does.

    This is the second major outage that Amazon has had in very recent memory. In fact, not two weeks ago, our COO, Dmitry Sotnikov, wrote about the June 14th AWS outage and how it’s not smart to put all your eggs into one basket, especially if that basket is prone to crashing to the ground.

    Uptime.

    Although this is outage specific to the US, it’s worth noting that a number of services have been affected elsewhere. TechCrunch was one of the first to notice this:

    Worth pointing out that these outages seemed to also affect services in other markets like Europe — meaning that, despite Amazon having more local hubs in Europe, Asia Pacific and South America, these services appear to be routed through only one of them, in North America. We’ll keep checking and updating.

    So, if you were trying to post photos to Instragram yesterday… yeah.

    Have a great weekend. Sorry if you can’t stream movies right now.

    Related articles

    Simon Munro (@simonmunro) asserted Fingers should be pointed at AWS in a 7/2/2012 post:

    imageThe recent outage suffered at Amazon Web Services due to the failure of something-or-other caused by storms in Virginia has created yet another round of discussions about availability in the public cloud.

    While there has been some of the usual commentary about how this outage reminds us of the risks of public cloud computing, there have been many articles and posts on how AWS customers are simply doing it wrong. The general consensus is that those applications that were down were architected incorrectly and should have been built with geographic redundancy in mind. I fully agree with that as a principle of cloud based architectures and posted as much last year when there was another outage (and also when it was less fashionable to blame the customers).

    imageYes, you should build for better geographic redundancy if you need higher availability, but the availability of AWS is, quite frankly not acceptable. The AWS SLA promises 99.95% uptime on EC2 and although they may technically be reaching that or giving measly 10% credits, anecdotally I don’t believe that AWS is getting near that in US-East. 99.95% translates to 4.38 hours a year or 22 minutes a month and I don’t believe that they are matching those targets. (If someone from AWS can provide a link with actual figures, I’ll gladly update this post to reflect as much). Using the x-nines measure of availability is all that we have, even if it is a bit meaningless, and by business measures of availability (application must be available when needed) AWS availability falls far short of expectations.

    I am all for using geographic replication/redundancy/resilience when you want to build an architecture that pushes 100% on lower availability infrastructure, but it should not be required to overcome infrastructure that has outages for a couple of hours every few weeks or months. While individual AWS fans are defending AWS and pointing fingers at architectures that are not geographically distributed is going to happen, an article on ZDNet calling AWS customers ‘cheapskates’ is a bit unfair to customers. If AWS can’t keep a data centre running when there is a power failure in an area, and can’t remember to keep the generator filled with diesel (or whatever), blaming customers for single building single zone architectures isn’t the answer.

    Yes, I know that there are availability zones and applications that spanned availability zones may not have been affected, but building an application where data is distributed across multiple AZs is not trivial either. Also, it seems that quite frequently an outage in one AZ has an impact on the other (overloads the EBS control plane, insufficient capacity on healthy AZ etc), so the multiple AZ approach is a little bit risky too.

    Us application developers and architects get that running a highly available data centre is hard, but so is building a geographically distributed application. So we are expected to build these complicated architectures because the infrastructure is less stable than expected? Why should we (and the customers paying us) take on the extra effort and cost just because AWS is unreliable? How about this for an idea — fix AWS? Tear down US East and start again… or something. How is AWS making it easier to build geographically distributed applications? No, white papers aren’t good enough. If you want your customers to wallpaper over AWS cracks, make services available that make geographic distribution easier (data synchronisation services, cross-region health monitoring and autoscaling, pub-sub messaging services, lower data egress costs to AWS data centres).

    Regardless of how customers may feel, if you Google ‘AWS outage’ you get way, way to many results in the search. This isn’t good for anybody. It isn’t good for people like me who are fans of the public cloud, it isn’t good for AWS obviously, and it isn’t even good for AWS competitors (who are seen as inferior to AWS). If I see another AWS outage in the next few months, in any region, for any reason I will be seriously f-----g pissed off.


    Jeff Barr (@jeffbarr) reported AWS Elastic Beanstalk - Simplified Command Line Access with EB on 6/27/2012 (missed when published):

    imageI would like to welcome eb (pronounced ee-bee) to the family of Elastic Beanstalk command line tools! Eb simplifies the development and deployment tasks from the terminal on Linux, Mac OS, and Microsoft Windows. Getting started using Elastic Beanstalk from the command line is now as simple as:

    • eb init to set up credentials, choose the AWS Region, and the Elastic Beanstalk solution stack (operating system + application server + language environment).
    • eb start to create the Elastic Beanstalk application and launch an environment within it.
    • git aws.push to deploy code.

    You can give eb a try by downloading the latest Elastic Beanstalk Command Line Tools. To learn more about eb, visit the AWS Elastic Beanstalk Developer Guide.

    Here is how I use it to manage my Elastic Beanstalk applications...

    Get Started
    imageFirst, download the updated Elastic Beanstalk Command Line Tools and unzip it to a directory on disk. For quick access to the eb command, I recommend that you add this directory to your PATH. You are all set up and ready to go!

    Create Your Application
    In your application’s directory, initialize your Git repository and run the following commands to create an Elastic Beanstalk application:

    <devserver>: git init
    Initialized empty Git repository in /Users/jeff/blog/.git
    <devserver>: eb init
    To get your AWS Access Key ID and Secret Access Key, visit "https://aws-portal.amazon.com/gp/aws/securityCredentials".
    Enter your AWS Access Key ID: AB...78
    Enter your AWS Secret Access Key: abcd...1234
    Select an AWS Elastic Beanstalk service region.
    Available service regions are:
    1) "US East (Virginia)"
    2) "EU West (Ireland)"
    3) "Asia Pacific (Tokyo)"
    Select (1 to 3): 1
    Enter an AWS Elastic Beanstalk application name (auto-generated value is "jeffblog"):
    Enter an AWS Elastic Beanstalk environment name (auto-generated value is "jeffblog-env"):
    Select a solution stack.
    Available solution stacks are:
    1) "32bit Amazon Linux running Tomcat 7"
    2) "64bit Amazon Linux running Tomcat 7"
    3) "32bit Amazon Linux running Tomcat 6"
    4) "64bit Amazon Linux running Tomcat 6"
    5) "32bit Amazon Linux running PHP 5.3"
    6) "64bit Amazon Linux running PHP 5.3"
    7) "64bit Windows Server 2008 R2 running IIS 7.5"
    Select (1 to 7): 6
    Successfully updated AWS Credential file at "C:\Users\jeff\.elasticbeanstalk\aws_credential_file".
    <devserver>: eb start
    Now creating application "jeffblog".
    Waiting for environment "jeffblog-env" to launch.
    2012-06-26 21:23:05 INFO createEnvironment is starting.
    2012-06-26 21:23:14 INFO Using elasticbeanstalk-eu-west-1-123456789012 as Amazon S3 storage bucket for environment data.
    2012-06-26 21:23:15 INFO Created Auto Scaling launch configuration named: awseb-jeffblog-env-65rxDnIDWV.
    2012-06-26 21:23:16 INFO Created load balancer named: awseb-jeffblog-env.
    2012-06-26 21:23:16 INFO Created Auto Scaling group named: awseb-jeffblog-env-Bub8kxJmPP.
    2012-06-26 21:23:17 INFO Created Auto Scaling trigger named: awseb-jeffblog-env-Bub8kxJmPP.
    2012-06-26 21:23:19 INFO Waiting for an EC2 instance to launch.
    2012-06-26 21:24:05 INFO Adding EC2 instances to the load balancer. This may take a few minutes.
    2012-06-26 21:27:00 INFO Application available at jeffblog-env-3tqewduwvb.elasticbeanstalk.com.
    2012-06-26 21:27:04 INFO Successfully launched environment: jeffblog-env
    Application is available at "jeffblog-env-3tqewduwvb.elasticbeanstalk.com".

    In the example above, ‘eb init’ walks you through a few questions and configures your settings so you can easily create and manage your application. It also configures your Git repository so you can directly push to Elastic Beanstalk. The command ‘eb start’ creates the resources and launches a sample application on Elastic Beanstalk. The application is accessible at the URL shown above.

    Deploy Your Code
    To deploy your code to Elastic Beanstalk, you simply use git aws.push like this:

    <devserver>: echo "<html><body><h1><?='Hello eb!'?></h1></body></html>" > index.php
    <devserver>: git add index.php
    <devserver>: git commit –m “v1”
    [master (root-commit) 23159c7] v1
    1 files changed, 1 insertions(+), 0 deletions(-)
    create mode 100644 index.php
    <devserver>: git aws.push
    Counting objects: 3, done.
    Delta compression using up to 2 threads.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 249 bytes, done.
    Total 3 (delta 0), reused 0 (delta 0)
    remote:
    To https://abcd:1234@git.elasticbeanstalk.us-east-1.amazonaws.com/repos/6a656666626c6f67/jeffblog-env
    * [new branch] HEAD -> master

    To test your uploaded application, browse to the application’s URL:

    Update your Configuration Settings
    Eb stores configuration settings in a file called .optionsettings inside the .elasticbeanstalk directory. To update your configuration settings, simply open the .optionsettings file, make a change, and then run eb update.

    For example, to update my instance type from t1.micro to m1.small, I simply change the value of ‘instancetype’ to ‘m1.small’ and then run the following commands:

    <devserver>: eb update
    Updating environment "jeffblog-env". This may take a few minutes.
    2012-06-26 21:31:41 INFO Switched configuration attached to environment.
    Environment "jeffblog-env" has been successfully updated.

    Get Information about your Application
    To get information about your Elastic Beanstalk application, you can use the eb status command:

    <devserver>: eb status
    URL : jeffblog-env-3tqewduwvb.elasticbeanstalk.com
    Status : Ready
    Health : Green

    Cleaning Up
    Eb
    provides 2 mechanisms to clean up: eb stop and eb delete.

    The eb stop command deletes the AWS resources that are running your application (such as the ELB and the EC2 instances). It however leaves behind all of the application versions and configuration settings that you had deployed, so you can quickly get started again. Eb stop is ideal when you are developing and testing your application and don’t need the AWS resources running over night. You can get going again by simply running eb start.

    The eb delete command deletes the AWS resources as well as all application versions and configuration settings associated with your application. Eb delete is ideal when you’re cleaning up a test application and want to start working on a new application from scratch.

    <devserver>: eb stop
    Are you sure? [y/n]:y
    Stopping environment "jeffblog-env". This may take a few minutes.
    $ 2012-06-26 21:36:48 INFO terminateEnvironment is starting.
    2012-06-26 21:36:53 INFO Deleted Auto Scaling trigger named: awseb-jeffblog-env-Bub8kxJmPP.
    2012-06-26 21:36:55 INFO Set Auto Scaling group named: awseb-jeffblog-env-Bub8kxJmPP to zero ec2 instances.
    2012-06-26 21:36:58 INFO Deleted load balancer named: awseb-jeffblog-env.
    2012-06-26 21:37:02 INFO Terminating Environment jeffblog-env.
    2012-06-26 21:37:05 INFO Waiting for Auto Scaling groups to terminate ec2 instances.
    2012-06-26 21:38:12 INFO Waiting for Auto Scaling groups to terminate ec2 instances.
    2012-06-26 21:39:04 INFO Waiting for Auto Scaling groups to terminate ec2 instances.
    2012-06-26 21:39:04 INFO Auto Scaling groups terminated all ec2 instances
    Environment "jeffblog-env" has been successfully stopped.

    As you can see, eb gives you the power to set up, manage, and update your Elastic Beanstalk applications from the command line. Give it a try and let me know what you think.


    <Return to section navigation list>

    0 comments: