250 likes | 406 Views
雲端計算 Cloud Computing. Lab–Windows Azure Deploy your service. Agenda. Prepare work Deployment Configuration. Prepare work. Before deploying your service to Azure, you need An Azure account. A service well designed and developed using SDK tool on local environment. Storage Account.
E N D
雲端計算Cloud Computing Lab–Windows AzureDeploy your service
Agenda • Prepare work • Deployment • Configuration
Prepare work • Before deploying your service to Azure, you need • An Azure account. • A service well designed and developed using SDK tool on local environment.
Account • Sign in to http://msdn.microsoft.com/zh-tw/windowsazure/default.aspx and press the “Log into Portal”
Add new service • Add new service
Storage Account • First, create storage account • Enter the service label and description, and submit
Storage Account (cont.) • Choose the unique name for your storage service. • Select the region for your service.
Storage Account (cont.) • You would get your storage account key.
Hosted Service • First, create hosted service • Enter the service label and description, and submit
Hosted Service (cont.) • Choose the unique name for your hosted service. • Select the region for your service. Note
Publish • Open your service by Admin. • Right click your service and choice publish. • Choice Create Service Package Only.
Upload GuestBook.cspkg ServiceConfiguration.cscfg Label
Set Configure (cont.) • Replace the configure file as below • Replace the AccountName to your storage account name • Replace the AccountKey to your storage account key <?xml version="1.0"?> <ServiceConfigurationserviceName="GuestBook" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"> <Role name="GuestBook_WebRole"> <Instances count="1" /> <ConfigurationSettings> <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=[YOUR_ACCOUNT_NAME];AccountKey=[YOUR_ACCOUNT_KEY]" /> <Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=[YOUR_ACCOUNT_NAME];AccountKey=[YOUR_ACCOUNT_KEY]" /> </ConfigurationSettings> </Role> <Role name="GuestBook_WorkerRole"> <Instances count="1" /> <ConfigurationSettings> <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=[YOUR_ACCOUNT_NAME];AccountKey=[YOUR_ACCOUNT_KEY]" /> <Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=[YOUR_ACCOUNT_NAME];AccountKey=[YOUR_ACCOUNT_KEY]" /> </ConfigurationSettings> </Role> </ServiceConfiguration>
Note • While your deployment is suspended, it continues to accrue charges. Please delete the suspended deployment if you no longer wish to be charged for it. For more details visit Windows Azure Pricing FAQs.
Reference • Hand-On lab • IntroductionToWindowsAzureVS2010