The Windows Azure Management Portal provides two ways for you to create and deploy a cloud service: Quick Create and Custom Create.

This topic explains how to use the Quick Create method to create a new cloud service and then use Upload to upload and deploy a cloud service package in Windows Azure. When you use this method, the Windows Azure Management Portal makes available convenient links for completing all requirements as you go. If you're ready to deploy your cloud service when you create it, you can do both at the same time using Custom Create.

Note If you plan to publish your cloud service from Windows Team Foundation Services (TFS), use Quick Create, and then set up TFS publishing from Quick Start or the dashboard. For more information, see Continuous Delivery to Windows Azure by Using Team Foundation Service Preview, or see help for the Quick Start page.

Table of Contents

Concepts

Three components are required in order to deploy an application as a cloud service in Windows Azure:

  • service definition file The cloud service definition file (.csdef) defines the service model, including the number of roles.

  • service configuration file The cloud service configuration file (.cscfg) provides configuration settings for the cloud service and individual roles, including the number of role instances.

  • service package The service package (.cspkg) contains the application code and the service definition file.

Prepare your app

Before you can deploy a cloud service, you must create the cloud service package (.cspkg) from your application code and a cloud service configuration file (.cscfg). Each cloud service package contains application files and configurations. The service configuration file provides the configuration settings.

The Windows Azure SDK provides tools for preparing these required deployment files. You can install the SDK from the Windows Azure Downloads page, in the language in which you prefer to develop your application code.

If you're new to cloud services, you can download a sample cloud service package (.cspkg) and service configuration file (.cscfg) to work with from the Windows Azure Code Samples.

Three cloud service features require special configurations before you export a service package:

  • If you want to deploy a cloud service that uses Secure Sockets Layer (SSL) for data encryption, configure your application for SSL. For more information, see How to Configure an SSL Certificate on an HTTPS Endpoint.

  • If you want to configure Remote Desktop connections to role instances, configure the roles for Remote Desktop. For more information about preparing the service definition file for remote access, see Overview of Setting Up a Remote Desktop Connection for a Role.

  • If you want to configure verbose monitoring for your cloud service, enable Windows Azure Diagnostics for the cloud service. Minimal monitoring (the default monitoring level) uses performance counters gathered from the host operating systems for role instances (virtual machines). "Verbose monitoring* gathers additional metrics based on performance data within the role instances to enable closer analysis of issues that occur during application processing. To find out how to enable Windows Azure Diagnostics, see Enabling Diagnostics in Windows Azure.

Before you begin

  • If you haven’t installed the Windows Azure SDK, click Install Azure SDK to open the Windows Azure Downloads page, and then download the SDK for the language in which you prefer to develop your code. (You'll have an opportunity to do this later.)

  • If any role instances require a certificate, create the certificates. Cloud services require a .pfx file with a private key. You can upload the certificates to Windows Azure as you create and deploy the cloud service. For information about creating certificates, see How to Configure an SSL Certificate on an HTTPS Endpoint.

  • If you plan to deploy the cloud service to an affinity group, create the affinity group. You can use an affinity group to deploy your cloud service and other Windows Azure services to the same location in a region. You can create the affinity group in the Networks area of the Management Portal, on the Affinity Groups page. For more information, see help for the Affinity Groups page.

How to: Create a cloud service using Quick Create

  1. In the Management Portal, click New, click Cloud Service, and then click Quick Create.

  2. In URL, enter a subdomain name to use in the public URL for accessing your cloud service in production deployments. The URL format for production deployments is: http://myURL.cloudapp.net.

  3. In Region/Affinity Group, select the geographic region or affinity group to deploy the cloud service to. Select an affinity group if you want to deploy your cloud service to the same location as other Windows Azure services within a region.

    Note To create an affinity group, open the Networks area of the Management Portal, click Affinity Groups, and then click either Create a new affinity group or Create. You can use affinity groups that you created in the earlier Windows Azure Management Portal. And you can create and manage affinity groups using the Windows Azure Service Management API. For more information, see Operations on Affinity Groups.

  4. Click Create Cloud Service.

You can monitor the status of the process in the message area at the bottom of the window.

The Cloud Services area opens, with the new cloud service displayed. When the status changes to Created, cloud service creation has completed successfully.

If any roles in the cloud service require a certificate for Secure Sockets Layer (SSL) data encryption, and the certificate has not been uploaded to Windows Azure, you must upload the certificate before you deploy the cloud service. After you upload a certificate, any Windows applications that are running in the role instances can access the certificate.

How to: Upload a certificate for a cloud service

  1. In the Management Portal, click Cloud Services. Then click the name of the cloud service to open the dashboard.

  2. Click Certificates to open the Certificates page, shown below.

  3. Click either Add new certificate or Upload. Add a Certificate opens.

  4. In Certificate file, use Browse to select the certificate (.pfx file) to use.

  5. In Password, enter the private key for the certificate.

  6. Click OK (checkmark).

You can watch the progress of the upload in the message area, shown below. When the upload completes, the certificate is added to the table. In the message area, click the down arrow to close the message, or click X to remove the message.

You can deploy your cloud service from the dashboard or from Quick Start.

How to: Deploy a cloud service

  1. In the Management Portal, click Cloud Services. Then click the name of the cloud service to open the dashboard.

  2. Click Quick Start (the icon to the left of Dashboard) to open the Quick Start page, shown below. (You can also deploy your cloud service by using Upload on the dashboard.)

  3. If you haven't installed the Windows Azure SDK, click Install Azure SDK to open the Windows Azure Downloads page, and then download the SDK for the language in which you prefer to develop your code.

    On the downloads page, you can also install client libraries and source code for developing web apps in Node.js, Java, PHP, and other languages, which you can deploy as scalable Windows Azure cloud services.

    Note For cloud services created earlier (known earlier as hosted services), you'll need to make sure the guest operating systems on the virtual machines (role instances) are compatible with the Windows Azure SDK version you install. For more information, see the Windows Azure SDK release notes.

  4. Click either New Production Deployment or New Staging Deployment.

    If you'd like to test your cloud service in Windows Azure before deploying it to production, you can deploy to staging. In the staging environment, the cloud service's globally unique identifier (GUID) identifies the cloud service in URLs (GUID.cloudapp.net). In the production environment, the friendlier DNS prefix that you assign is used (for example, myservice.cloudapp.net). When you're ready to promote your staged cloud service to production, use Swap to redirect client requests to that deployment.

    When you select a deployment environment, Upload a Package opens.

  5. In Deployment name, enter a name for the new deployment - for example, MyCloudServicev1.

  6. In Package, use Browse to select the service package file (.cspkg) to use.

  7. In Configuration, use Browse to select the service configure file (.cscfg) to use.

  8. If the cloud service will include any roles with only one instance, select the Deploy even if one or more roles contain a single instance check box to enable the deployment to proceed.

    Windows Azure can only guarantee 99.95 percent access to the cloud service during maintenance and service updates if every role has at least two instances. If needed, you can add additional role instances on the Scale page after you deploy the cloud service. For more information, see Service Level Agreements.

  9. Click OK (checkmark) to begin the cloud service deployment.

    You can monitor the status of the deployment in the message area. Click the down arrow to hide the message.

To verify that your deployment completed successfully

  1. Click Dashboard.

  2. Under quick glance, click the site URL to open your cloud service in a web browser.

[Windows Azure] How to Create and Deploy a Cloud Service?的更多相关文章

  1. Use Windows Azure AD to create SSO projects

    Keywords Windows Azure AD, SSO Summary Use Windows Azure AD to create SSO projects Detailed Scenario ...

  2. [Windows Azure] How to Create and Configure SQL Database

    How to Create and Configure SQL Database In this topic, you'll step through logical server creation ...

  3. [Windows Azure] Virtual Machine and Cloud Service Sizes for Windows Azure

    Virtual machine size CPU cores Memory OS disk space–cloud services OS disk space–virtual machines Ma ...

  4. Windows Azure Cloud Service (37) 浅谈Cloud Service

    <Windows Azure Platform 系列文章目录> 最近在和一些客户聊天,常常被遇到这样的问题: 1.问题一:我在创建一个新的Windows Azure Virtual Mac ...

  5. Configuring a Windows Azure Project

    A Windows Azure project includes two configuration files: ServiceDefinition.csdef and ServiceConfigu ...

  6. Running a Remote Desktop on a Windows Azure Linux VM (远程桌面到Windows Azure Linux )-摘自网络(试了,没成功 - -!)

                              A complete click-by-click, step-by-step video of this article is available ...

  7. [Windows Azure] Adding Sign-On to Your Web Application Using Windows Azure AD

    Adding Sign-On to Your Web Application Using Windows Azure AD 14 out of 19 rated this helpful - Rate ...

  8. [Windows Azure] Learn SQL Reporting on Windows Azure (9-Step Tutorial)

    Learn SQL Reporting on Windows Azure (9-Step Tutorial) 4 out of 4 rated this helpful - Rate this top ...

  9. [Windows Azure] Building the web role for the Windows Azure Email Service application - 3 of 5

    Building the web role for the Windows Azure Email Service application - 3 of 5. This is the third tu ...

随机推荐

  1. Easyui实用视频教程系列---Tree点击打开tab页面

    Easyui实用视频教程系列---Tree点击打开tab页面 首先 我们 要搭建环境 easyui 环境 然后 把tree 给创建出来 在某个位置 粘贴 下面代码 <ul id="tt ...

  2. MATLAB 的 cell 大法(单元格数组)

    MATLAB 的 cell,称单元格数组 or 元胞数组:使用频率特别高,甚至比 struct 结构体还高. MATLAB文档给出的 cell 官方定义: A cell array is a coll ...

  3. MATLAB 的循环语句

    1.MATLAB while循环语法 在MATLAB 中 while循环的语法如下: while <expression> <statements> end while 循环反 ...

  4. iOS绘图UIBezierPath 和 Core Graphics框架

    前言 iOS系统本身提供了两套绘图的框架,即UIBezierPath 和 Core Graphics.而前者所属UIKit,其实是对Core Graphics框架关于path的进一步封装,所以使用起来 ...

  5. memcached内存管理机制[未整理]

    memcached默认采用的是Slab Allocator的机制分配管理内存的,在此之前,内存的分配是通过对所有的记录简单地进行malloc和free来进行的,但这种方式容易造成很多内存碎片,加重操作 ...

  6. JAVA项目如何通过Docker实现Jenkins持续部署

    原文地址:http://blog.51cto.com/dadonggg/1957691 本篇实操性的案例讲解——JAVA项目如何通过Docker实现持续部署(只需简单四步), 即:开发通过git pu ...

  7. perl进程管理一例

    #!/usr/bin/perl -w use strict; use warnings; use DBI; #### # 这里进行服务器任务管理 ## #字符串映射函数 our %actions = ...

  8. mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1'

    源码安装的mysql数据库,在执行mysqldump的时候报错: # mysqldump -u root -p --all-databases > dbdump.db Enter passwor ...

  9. Kafka不只是个消息系统

    作者丨 Jay Kreps Confluent 联合创始人兼 CEO Jay Kreps 发表了一篇博文,给出了 Kafka 的真正定位——它不只是个消息系统,它还是个存储系统,而它的终极目标是要让流 ...

  10. 【转】不要去SeaWorld

    不要去SeaWorld 很多人喜欢海洋动物,比如海豚和“杀人鲸”(orca),但是我建议不要去海洋世界看它们.海豚和杀人鲸都是有灵性的,跟人类的智慧很接近,而且对人极其友好的动物.“杀人鲸”名字吓人, ...