In my previous post I have discussed about creating the service accounts which required to create to deploy the windows azure application. This post discusses the second step which is deploying the application management portal. Windows Azure tools for visual studio allows you to create and deploy the service package to Windows Azure using Visual Studio. |
Before deploying the application to the staging environment using management portal, generate the service package using the visual studio
1. Open the ServiceConfiguration.cscfg file in windows azure service project
replace the placeholders [YOUR_ACCOUNT_NAME] with the storage account name which you created in the step1 and [YOUR_ACCOUNT_KEY] with the primary key access value.
1: <?xml version="1.0"?>
2: <ServiceConfiguration serviceName="GuestBook"
3: xmlns="http://schemas.microsoft.com/ServiceHosting/
2008/10/ServiceConfiguration">
4: <Role name="GuestBook_WebRole">
5: <Instances count="1" />
6: <ConfigurationSettings>
7: <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.
ConnectionString"
8: value="DefaultEndpointsProtocol=https;
AccountName=[YOUR_ACCOUNT_NAME];
9: AccountKey=[YOUR_ACCOUNT_KEY]" />
10: <Setting name="DataConnectionString"
value="DefaultEndpointsProtocol=https;
11: AccountName=[YOUR_ACCOUNT_NAME];
AccountKey=[YOUR_ACCOUNT_KEY]" />
12: </ConfigurationSettings>
13: </Role>
14: <Role name="GuestBook_WorkerRole">
15: <Instances count="1" />
16: <ConfigurationSettings>
17: <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.
ConnectionString"
18: value="DefaultEndpointsProtocol=https;
AccountName=[YOUR_ACCOUNT_NAME];
19: AccountKey=[YOUR_ACCOUNT_KEY]" />
20: <Setting name="DataConnectionString"
21: value="DefaultEndpointsProtocol=https;
AccountName=[YOUR_ACCOUNT_NAME];
22: AccountKey=[YOUR_ACCOUNT_KEY]" />
23: </ConfigurationSettings>
24: </Role>
25: </ServiceConfiguration>
Select the option Create Service Package Only and say ok.
After successful generation of service package Visual Studio opens the files in windows explorer
3. Now open the windows azure management portal in browser. Select the Hosted Services that created and click on New Staging Deployment option from the ribbon
4. In create new deployment dialogue, select the package location which we have created in the step2. Supply the package file and service configuration file as shown below
5. Click Ok to start the deployment. The portal shows you the status of the deployment
6. Once the deployment finish, portal assigns a DNS name to the deployment that includes a unique identifier. Once you access the URL you can test the application and determine whether it is working fine or not.
7. Before testing your url , configure your service as shown below select your service from the hosted services and click the configure on the ribbon.
8. To increase the instances in configuration select the Edit Configuration option in deployment wizard
Click ok to update the configuration
Share this post : |