Windows Azure Bootstrapper
The Windows Azure Bootstrapper is a command line tool meant to be used by your running Web and Worker roles in Windows Azure. This tool allows you to easily download resources (either public resources or ones in your blob storage), extract them if
necessary, and launch them. Since you don't want to always download and run during restarts, it will also help track those dependencies and only launch an installer one time! In addition, there are some very useful features that make it a great
tool to package with your roles.
Since the Bootstrapper was meant to run in Web and Worker roles, it has been optimized to run in this environment.
- Unique token syntax to refer to common Windows Azure settings and resources:
- Configuration settings: $config(somevalue)
- DIP Address values: $ip(endpointname)
- Port Values: $port(endpointname)
- Local Resources Root Paths: $lr(localresourcename)
- Optimized for running in Web and Worker: will by default only download, extract, or run a resource 1 time to prevent launching or installing resources multiple times on reboot in Windows Azure.
- Ability to run in blocking and non blocking mode allows you to script out bootstrapper in normal cmd files and control dependencies
- Can compensate for running as SYSTEM for installers that require a user profile by temporarily enabling the profile.
- Will optionally unzip resources if required
- Can download both public HTTP sources as well as private Windows Azure Blob resources
bootstrapper.exe -get bootstrap/Installer.zip -lr $lr(temp) -unzip $lr(temp)\extract -sc $config(ConnectionString) -run $lr(temp)\extract\installer.msi -args /qn -block
This example will download the 'Installer.zip' from a container called 'bootstrap' in the storage account defined in 'ConnectionString' setting. It will download it to the 'temp' local resource, unzip it to a folder called 'extract' and then run a
.msi file located there called 'installer.msi' and pass it the '/qn' parameters as arguments. Finally, it will block during the installation until the .msi exits.
bootstrapper.exe -get http://download.microsoft.com/download/F/3/1/F31EF055-3C46-4E35-AB7B-3261A303A3B6/AspNetMVC3ToolsUpdateSetup.exe -lr $lr(temp) -run $lr(temp)\AspNetMVC3ToolsUpdateSetup.exe -args /q
This sample will download the MVC3 installation from Microsoft to the 'temp' local resource and will execute it, passing the '/q' arguments. It is non-blocking in this case.