Configure Service Package
Set up the connection string and deployment parameters
Before you deploy the web role with the service package, you should configure it specifying the connection string, providing names for the deployment and setting up other parameters. If you are going to use certificates other than the default one, you should configure the corresponding parameters, too.
Configuration Settings
The following is the boilerplate configuration where you should replace the placeholders ({...}
) with your own values.
<ConfigurationSettings> <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName={ACCOUNT_NAME};AccountKey={KEY}" /> <Setting name="WebRole.DisplayName" value="CMS Cloud Service" /> <Setting name="WebRole.Blob.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName={ACCOUNT_NAME};AccountKey={KEY}" /> <Setting name="WebRole.Blob.ContainerName" value="deployment" /> <Setting name="WebRole.Blob.ConnectionStringEncrypted" value="false" /> <Setting name="WebRole.Blob.UpdateCheckSleepInMilliSeconds" value="5000" /> <Setting name="WebRole.Blob.MaximumDownloadConcurrency" value="50" /> <Setting name="Webrole.Blob.StatusFilesTouchRateInMinutes" value="10" /> <Setting name="WebRole.Iis.AppPoolIdleTimeoutMinutes" value="60" /> <Setting name="WebRole.Iis.ManageIisConfiguration" value="true" /> <Setting name="WebRole.Iis.DeleteDefaultSites" value="true" /> <Setting name="WebRole.SmtpServer.Install" value="false" /> </ConfigurationSettings>
To configure the CMS Azure service package:
- Edit service configuration file that comes with the package (for example,
ServiceConfiguration.Composite.WindowsAzure.Package.cscfg
). - Set the following parameters replacing the corresponding placeholders:
- {ACCOUNT_NAME}: The name of the blob storage account to be used for the deployment.
- {KEY}: The primary access key for the blob storage account to be used for the deployment.
- Save the changes.
You may also consider changing these parameters, too:
WebRole.Blob.ContainerName
: The name of your deployment normally used as the deployment container name.WebRole.DisplayName
: The name to be used when referring to the web role being deployed.
For information about these and other parameters in this configuration please see "Service Configuration".
Account Name and Key
The account name and key are used in the connection strings for the deployment and diagnostics. (Please see "Prepare on Azure".)
It is a good practice to specify the same {ACCOUNT_NAME} and {KEY} for both WebRole.Storage.ConnectionString
and Diagnostics.ConnectionString
.
If you, however, choose to use different sets of account names/keys, make sure they refer to the storages in the same data center to avoid unwanted traffic expenses and / or connection issues.
Container Name
The container name uniquely identifies the deployment and is used as the name for the deployment container when the latter being created in the blob storage by the service package.
When scaled out, the container name must remain the same.
Webrole Display Name
The web role's display name makes sense when you scale out your website and multiple roles must be running within the same deployment.
It helps distinguish between the roles in the GUI, for example, in Azure Publisher where you can see the status of all web roles in the deployment when publishing changes to the website instances in the cloud from the staging site.
Certificates
Normally, you don't need to change anything in the <Certificates/>
section of the service configuration that comes with the pre-built package. The certificate slot parameters are already set to the thumbprint of the default certificate that comes with the service package.
<Certificates> <Certificate name="CertificateSlot0" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> <Certificate name="CertificateSlot1" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> <Certificate name="CertificateSlot2" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> <Certificate name="CertificateSlot3" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> <Certificate name="CertificateSlot4" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> <Certificate name="CertificateSlot5" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> <Certificate name="CertificateSlot6" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> <Certificate name="CertificateSlot7" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> <Certificate name="CertificateSlot8" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> <Certificate name="CertificateSlot9" thumbprint="8057987CA86216898EE2E06A93DAC725D8F00FE3" thumbprintAlgorithm="sha1" /> </Certificates>
(Please note that you are supposed to upload the certificate to the cloud service in use.)
You are however free to replace:
- all the default thumbprint values to that of your own certificate you choose to use as the default one
- any thumbprint value set to that of the default certificate (0 to 9) with a thumbprint of the certificate you are going to use for other purposes (normally for secure connection setups).
Please make sure that you have uploaded to the cloud service in use all the certificates whose thumbprints are specified in the service configuration.