What is the Service Package? It is what contains the Service Definition for your Cloud Service along with the content and binaries for each of the roles.
It comes in 2 flavors. The first being a folder structure with the extension csx. For example if you look in the output folder of the Cloud Service project (bin\debug or bin\release) you will see the following:
Where the highlighted CloudService6.csx file is the folder structure version of the Service Package – the Service Definition file is located there.
The Service Configuration file is kept separate to the Service Package as it can be updated independently of the Service Package, for example to update setting values or increase/decrease the number of instance of each of your roles.
The folder version of the Service Package is the output of the Cloud Service project. This is what is used to run the Cloud Service on the Development Fabric.
If you look in the WebRole and WorkerRole directories, you will see the content and binaries that will be used to run your roles.
The second flavor of the Service Package is the single file version (cspkg file extension), which is created when you publish the Cloud Service by right-clicking on the Cloud Service project and selecting “Publish…”
This is the file that you upload (along with the Service Configuration file) to the Windows Azure cloud to run your service.
The single file package is found in the Publish folder of the output directory of the Cloud Service project along with the Service Configuration file:
This is the directory that VS automatically opens up when you publish from the Cloud Service.
It is interesting to know about these two flavors of Service Packages so that you can know where to look to see what files are being packaged up and executed by the Development Fabric locally and/or Fabric in the cloud.
The single file Service Package is zipped and encrypted so you won’t be able to browse through it unless you set an environment variable to package without encryption.
Note: The steps to create an unencrypted package are for diagnostic purposes only and should not be used for production packages. Additionally, the method is only intended for internal use, is not supported and may be changed at any time. (enough of a disclaimer? :) )
With Visual Studio closed, create a new environment variable called: _CSPACK_FORCE_NOENCRYPT_ set the value to true. This will look like this:
You can access the environment variables dialog from the advanced tab on the System Properties from the Advanced system settings task button on the left of: Control Panel\System and Maintenance\System.
Now startup Visual Studio, load a Cloud Service project and hit publish. When you publish, you will see the following message in the output window:
C:\Program Files\MSBuild\Microsoft\Cloud Service\v1.0\Microsoft.CloudService.targets(0,0): warning : CloudServices44 : Forcing creation of unencrypted package.
Now, you can unzip your way through the single file Service Package. Rename the service package to .zip and unzip.
Inside the first directory you can unzip the WebRole_*.cssx and WorkerRole_*.cssx files to reveal your worker and web role directories.
One thing to mention here is that you can deploy both unencrypted and encrypted versions of the Service Package to Windows Azure, although I'll reiterate that you should really only deploy the encrypted version of your package.
Hope this helps with diagnostic and debugging type activities – we are thinking about how we can make this easier in the tools.
Back at Mix ‘09, we announced that Windows Azure will have support for specifying which geographical region you want your Cloud Service to run.
If you now go to create a new Hosted Service on the Azure Services Developer Portal, you will be presented with an option to put the service in an Affinity Group and select the region for that Affinity Group.
You will then see the Affinity Group listed on the summary page for your Hosted Service Project.
When you go to create another project, be it a Hosted Service or Storage Account, you can choose to put that storage account in an existing Affinity Group, this will geographically co-locate your compute and/or storage projects.
From the announcement referenced above:
Accounts inside an affinity group will be dealt with as one unit and placed together for connectivity. For example, if you create an affinity group placed in North Western United States and place multiple storage accounts and hosted services in there, we’ll allocate these together in that geographical region, so that all of the accounts will be close together from a network perspective
Pretty cool stuff, especially when data centers in more locations come online.
(Update 9/24/2009 -- We're now included in the Web Platform Installer! See: http://blogs.msdn.com/jnak/archive/2009/09/24/installing-the-windows-azure-tools-using-the-web-platform-installer.aspx)
One of the first things I do when I get a new box is install the Windows Azure Tools and SDK. (don’t you?)
Quite often, I forget to install and configure IIS7 – and receive the following message:
The Windows Azure SDK requires Internet Information Service 7.0 with ASP.Net Application Development components installed.
So how do I install IIS and the required components?
You could follow the instructions buried on the download page… or you can use the Microsoft Platform installer which is a heck of a lot easier. Let’s see how that would work.
1. Navigate to http://microsoft.com/web and click on “Get the Microsoft Web Platform”
At the time of this writing, there is a v1.0 and v2.0 beta you can try. We’ll show the 2.0 beta although you could use either.
2. Click on the download button.
3. Click on the Web Platform tab and customize the Web Server option with: ASP.Net, Default Document and CGI (if you want to run fastCGI apps) and any other features you want to add.
4. You can also click to add a database (SQL Express) if you need it and tools – including the free Visual Web Developer Express which our Windows Azure Tools support.
5. Click “Install” when you are ready. You’ll get an opportunity to review your selection, then the download and install will commence.
6. Install a few hot fixes manually:
7. Finally, if you are using WCF, you will want to install WCF HTTP Activation. (this is a .Net feature)
On Vista: From the Start menu, choose Settings | Control Panel | Programs | Programs and Features, Click Turn “windows Features On or Off”, under Microsoft .Net Framework 3.0, select WCF HTTP Activation
On Windows Server 2008 – In Server Manager under Features Summary, choose Add Features – under .Net Framework 3.0 Features, select WCF Activation.
8. Install the Windows Azure Tools
This is the way I setup my new machines nowadays, just so much easier and I get all of the other web frameworks (like MVC and Silverlight) at the same time.
If you are trying a FastCGI application on Windows Azure and see the following message:
CCT: Error: FastCGI module at C:\Windows\system32\inetsrv\iisfcgi.dll with version 7.0.6001.22229 is not up-to-date.CCT: The system is missing a prerequisite to execute the service. Please see the release notes.
You are missing the following QFE: http://support.microsoft.com/kb/967131
We'll definitely improve the message -- just wanted to get some more help out there for any of you that run into this.