This accelerator will allow you to deploy your worker roles faster by using blob storage instead of the portal.
- Add the
WorkerRoleAccelerator.Core
project to your Visual Studio Solution - Right click on the "Roles" folder on your Windows Azure project and select Add -> Worker Role Project in solution...
- Select the WorkerRoleAccelerator.Core projet and click OK
- Open the ServiceDefinition.csdef file and replace the node with this
- Open the ServiceConfiguration.cscfg file and replace the node with the following. NOTE: make sure to replace the connection strings with your Windows Azure Storage account.
- Publish, deploy and wait for the deployment to be ready. Hopefully you will do this only once :)
- Use your tool of choice and connect to your Windows Azure blob storagte (e.g.: CloudBerry, Azure Storage Explorer)
- Browse to the
worker-role-accelerator
container and drop your real worker role assembly and its dependencies in there - The accelerator will look at the
__entrypoint.txt
file to know what is the assembly that contains the RoleEntryPoint. So open that file and write down the file name of your dll (e.g.: SampleWorkerRole.dll). - The accelerator polls every 30 seconds the container looking for changes. So if you update the dll, it will pick it up, unload the AppDomain with the previous version and load the new one.
- You can add a configuration file that can be read by the worker role with the typical ConfigurationManager. The config file should be named the same as the entry point assembly + .config (usual .net convention).
- If anything wrong happens, the accelerator will write a file named
__an_error_occured.txt
in the container so you can see the exception