使用 Visual Studio 在 Azure Stack Hub 中部署模板Deploy templates in Azure Stack Hub using Visual Studio
可以使用 Visual Studio 将 Azure 资源管理器模板部署到 Azure Stack Hub。You can use Visual Studio to deploy Azure Resource Manager templates to Azure Stack Hub.
部署模板To deploy a template
- 使用 Visual Studio 安装并连接到 Azure Stack Hub。Install and connect to Azure Stack Hub with Visual Studio.
- 打开 Visual Studio。Open Visual Studio.
- 选择“文件” ,然后选择“新建” 。Select File, and then select New. 在“新建项目” 中,选择“Azure 资源组” 。In New Project, select Azure Resource Group.
- 输入新项目的名称,并选择“确定”。 Enter a Name for the new project, and then select OK.
- 在“选择 Azure 模板” 中,从下拉列表中选取“Azure Stack Hub 快速入门” 。In Select Azure Template, pick Azure Stack Hub Quickstart from the drop-down list.
- 选择 101-create-storage-account,然后选择“确定” 。Select 101-create-storage-account, and then select OK.
- 在新项目中,展开解决方案资源管理器中的“模板”节点以查看可用模板。In your new project, expand the Templates node in Solution Explorer to see the available templates.
- 在解决方案资源管理器中,选择你的项目名称,然后选择“部署” 。In Solution Explorer, pick the name of your project, and then select Deploy. 选择“新建部署” 。Select New Deployment.
- 在“部署到资源组” 中,使用“订阅” 下拉列表选择 Azure Stack Hub 订阅。In Deploy to Resource Group, use the Subscription drop-down list to select your Azure Stack Hub subscription.
- 从“资源组” 列表中选择现有资源组,或创建新资源组。From the Resource Group list, choose an existing resource group or create a new one.
- 从“资源组位置”列表中选择一个位置,并选择“部署”。 From the Resource group location list, choose a location, and then select Deploy.
- 在“编辑参数” 中,为参数提供值(因模板而异),然后选择“保存” 。In Edit Parameters, provide values for the parameters (which vary by template), and then select Save.