After a previous post where I discussed the benefits of using existing tools over creating your own build tasks I have been able to reproduce exactly the same deployment script working in Rake as I had previously shown in MSBuild using the Windows Azure Tools to control the deployment and initialization of instances in the public and local cloud environments.
When deploying to the public cloud the only thing that I have changed in the scenario is to add a line to use the CSPack tool rather than relying on the MSBuild tasks supplied with the Windows Azure SDK to create the cloud package for my application.
The full Rake build, deployment and initialization script is below, showing that we can use all the same tools and concepts independent of the build engine. This script relies heavily on calling out to the command line with the exec method that I have created to pass in the command line arguments.