如何配置云服务How to Configure Cloud Services

可以在 Azure 门户中配置最常使用的云服务设置。You can configure the most commonly used settings for a cloud service in the Azure portal. 或者,如果希望直接更新配置文件,可下载要更新的服务配置文件,并上传更新文件并通过配置更改更新云服务。Or, if you like to update your configuration files directly, download a service configuration file to update, and then upload the updated file and update the cloud service with the configuration changes. 无论使用哪种方法,配置更新都会应用于所有角色实例。Either way, the configuration updates are pushed out to all role instances.

还可以管理云服务角色的实例,或者通过远程桌面进入这些角色中。You can also manage the instances of your cloud service roles, or remote desktop into them.

如果每个角色至少具有两个角色实例,那么 Azure 在配置更新期间只能确保 99.95% 的服务可用性。Azure can only ensure 99.95 percent service availability during the configuration updates if you have at least two role instances for every role. 这使得一台虚拟机可以在另一台虚拟机更新时处理客户端请求。That enables one virtual machine to process client requests while the other is being updated. 有关详细信息,请参阅服务级别协议For more information, see Service Level Agreements.

更改云服务Change a cloud service

打开 Azure 门户后,导航到云服务。After opening the Azure portal, navigate to your cloud service. 在这里,可以对云服务的许多方面进行管理。From here, you manage many aspects of it.

“设置”页

可以通过“设置”或“所有设置”链接打开“设置”,在该选项卡中,可以更改“属性”、更改“配置”、管理“证书”、设置“警报规则”,以及管理有权访问该云服务的“用户” 。The Settings or All settings links will open up Settings where you can change the Properties, change the Configuration, manage the Certificates, set up Alert rules, and manage the Users who have access to this cloud service.

Azure 云服务设置

管理来宾 OS 版本Manage Guest OS version

默认情况下,Azure 会定期将来宾 OS 更新为 OS 系列(在服务配置 (.cscfg) 中指定)中支持的最新映像,例如 Windows Server 2016。By default, Azure periodically updates your guest OS to the latest supported image within the OS family that you've specified in your service configuration (.cscfg), such as Windows Server 2016.

如果需要设定某一特定 OS 版本,可在“配置” 中进行设置。If you need to target a specific OS version, you can set it in Configuration.

设置 OS 版本

Important

选择特定 OS 版本会禁用自动 OS 更新,用户需要自行负责修补工作。Choosing a specific OS version disables automatic OS updates and makes patching your responsibility. 务必确保角色实例可以接收更新,否则应用程序可能存在安全漏洞。You must ensure that your role instances are receiving updates or you may expose your application to security vulnerabilities.

监视Monitoring

可将警报添加到云服务。You can add alerts to your cloud service. 单击“设置” > “警报规则” > “添加警报” 。Click Settings > Alert Rules > Add alert.

可以在此处设置警报。From here, you can set up an alert. 使用“指标” 下拉框,可以针对以下类型的数据设置警报。With the Metric drop-down box, you can set up an alert for the following types of data.

  • 磁盘读取Disk read
  • 磁盘写入Disk write
  • 进网络Network in
  • 出网络Network out
  • CPU 百分比CPU percentage

配置从度量值磁贴进行的监视Configure monitoring from a metric tile

可以单击“云服务”边栏选项卡的“监视”部分中的某个度量值磁贴,而不必使用“设置” > “警报规则” 。Instead of using Settings > Alert Rules, you can click on one of the metric tiles in the Monitoring section of the cloud service.

云服务监视

可以在此处自定义用于磁贴的图表,也可以添加警报规则。From here you can customize the chart used with the tile, or add an alert rule.

重新启动、重置映像或远程桌面Reboot, reimage, or remote desktop

可以通过 Azure 门户(设置远程桌面)PowerShell 或通过 Visual Studio 设置远程桌面。You can set up remote desktop through the Azure portal (set up remote desktop), PowerShell, or through Visual Studio.

要重新启动、重置映像或远程登录到云服务,请选择云服务实例。To reboot, reimage, or remote into a Cloud Service, select the cloud service instance.

云服务实例

可以启动远程桌面连接、以远程方式重新启动实例,或者以远程方式重置实例的映像(开始使用全新的映像)。You can then initiate a remote desktop connection, remotely reboot the instance, or remotely reimage (start with a fresh image) the instance.

云服务实例按钮

重新配置 .cscfgReconfigure your .cscfg

建议通过 service config (cscfg) 文件来重新配置云服务。You may need to reconfigure your cloud service through the service config (cscfg) file. 首先,用户需要下载 .cscfg 文件,对其进行修改,再上传该文件。First you need to download your .cscfg file, modify it, then upload it.

  1. 单击“设置”图标或“所有设置”链接以打开“设置” 。Click on the Settings icon or the All settings link to open up Settings.

    “设置”页

  2. 单击“配置” 项。Click on the Configuration item.

    “配置”边栏选项卡

  3. 单击“下载” 按钮。Click on the Download button.

    下载

  4. 更新服务配置文件后,上传并应用配置更新:After you update the service configuration file, upload and apply the configuration updates:

    上传

  5. 选择 .cscfg 文件,并单击“确定” 。Select the .cscfg file and click OK.

后续步骤Next steps