1. Trang chủ
  2. » Công Nghệ Thông Tin

Introducing Windows Azure- P61 ppt

5 181 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 341,32 KB

Nội dung

CHAPTER 9 ■ DEPLOY APPLICATIONS AND PRODUCTION MAINTENANCE 298 Figure 9-1. Generate the application package and configuration package from Visual Studio The packages will be generated by Visual Studio, and a new folder called Publish will be created to hold the package files. The path of the folder is under the project node of the specific compiler setting. For example, if the compiler setting is Debug, the folder is located under the Debug folder as Figure 9-2 shows. Figure 9-2. The generated package can be found in the folder Publish under the project tree in Windows Explorer CHAPTER 9 ■ DEPLOY APPLICATIONS AND PRODUCTION MAINTENANCE 299 Deploying Table Storage We are going to use the table storage we created in Exercise 2-2 as an example to illustrate how to deploy table storage to the cloud. 1. From Internet Explorer, enter the Azure portal address and sign in with your Live ID. Select New Project ➤ Storage Account as Figure 9-3 shows. Figure 9-3. Create a new storage account from the Azure portal page CHAPTER 9 ■ DEPLOY APPLICATIONS AND PRODUCTION MAINTENANCE 300 2. Check the availability of the account as Figure 9-4 shows. The name must be in lowercase. Figure 9-4. Create a new storage account from Azure portal page CHAPTER 9 ■ DEPLOY APPLICATIONS AND PRODUCTION MAINTENANCE 301 3. When the storage account is created from the cloud, the endpoint for blob, table, and queue storage will be displayed, and a new account shared key will be assigned to that account as Figure 9-5 shows. Figure 9-5. Account shared key and the endpoint will be assigned to this newly created account 4. Modify the configuration using the assigned secretary key as Listing 9-1 shows. Listing 9-1. Updated Configurations for Exercise 2-2 <?xml version="1.0"?> <ServiceConfiguration serviceName="CloudTableStorageService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"> <Role name="WebRole"> <Instances count="1"/> <ConfigurationSettings> <! Local Development > <! Setting name="AccountName" value="devstoreaccount1"/> <Setting name="AccountSharedKey" value="<SHARED KEY"/> <Setting name="TableStorageEndpoint" value="http://127.0.0.1:10002/"/ > <! Production Environment > <Setting name="AccountName" value="softnetsolutionstorage"/> CHAPTER 9 ■ DEPLOY APPLICATIONS AND PRODUCTION MAINTENANCE 302 <Setting name="AccountSharedKey" value="<ACCOUNT SHARED KEY>"/> <Setting name="TableStorageEndpoint" value="http://table.core.windows.net/"/> </ConfigurationSettings> </Role> </ServiceConfiguration> Host an Application from the Cloud Follow the steps illustrated in the next section to deploy the application that contains the table storage access web role. The results of a successful deployment are shown in Figure 9-6. Test the application after deployment and you can have the same results as in Exercise 2-2. Figure 9-6. Both the table storage and the application used to access the table storage need to be deployed to the cloud . Figure 9-2. The generated package can be found in the folder Publish under the project tree in Windows Explorer CHAPTER 9 ■ DEPLOY APPLICATIONS AND PRODUCTION MAINTENANCE 299 Deploying. KEY>"/> <Setting name="TableStorageEndpoint" value="http://table.core .windows. net/"/> </ConfigurationSettings> </Role> </ServiceConfiguration>

Ngày đăng: 05/07/2014, 01:20