历史上的今天
今天是:2024年12月10日(星期二)
2019年12月10日 | Azure ARM (7) ARM Template - 使用Visual Studio编辑
2019-12-10 来源:eefocus
之前介绍的ARM Template,都是使用文本编辑器来编辑JSON文件的。
文本讲介绍如何使用Visual Studio,编辑JSON Template。
本文使用Visual Studio 2015 with Update 3进行编辑,安装了Azure SDK 2.9。
如果读者使用的是Visual Studio 2013和Azure SDK 2.9,大部门的界面是和笔者的截图类似。笔者强烈建议安装最新的Visual Studio和Azure SDK。
前提:
1.安装Visual Studio 2015 with Update 3
2.安装Azure SDK 2.9
1.运行Visual Studio 2015 with Update 3
2.创建一个Azure Resource Group项目。如下图:

3.模板选择Blank Template

4.项目创建完毕后,不包含任何项目,我们选择Templates,双击 azuredeploy.json

5.显示如下图的JSON Outline,我们可以添加新的资源,点击resources,邮件,Add New Resource。如下图:
6.在弹出的界面中,输入Storage Account,然后色织storage account name (必须为小写英文),如下图:

7.修改Visual Studio项目中的azuredeploy.json文件,内容如下:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"leinewstorageType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_ZRS",
"Standard_GRS",
"Standard_RAGRS",
"Premium_LRS"
]
},
"storageAccounts_leistorageaccount_name": {
"defaultValue": "leistorageaccount",
"type": "String"
}
},
"variables": {
},
"resources": [
{
"name": "[parameters('storageAccounts_leistorageaccount_name')]",
"type": "Microsoft.Storage/storageAccounts",
"location": "[resourceGroup().location]",
"apiVersion": "2015-06-15",
"dependsOn": [],
"tags": {
"displayName": "leinewstorage"
},
"properties": {
"accountType": "[parameters('leinewstorageType')]"
}
}
],
"outputs": {
}
}
8.修改azuredeploy.parameters.json文件,内容如下:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccounts_leistorageaccount_name": {
"value": "leinewstorageaccount"
}
}
}
最后通过Azure PowerShell进行发布,命令如下:
# sign in
Write-Host "Logging in...";
Add-AzureRmAccount -EnvironmentName AzureChinaCloud;
# select subscription
Write-Host "Selecting subscription '$subscriptionId'";
Select-AzureRmSubscription -SubscriptionID $subscriptionId;
#创建Resource Group
New-AzureRmResourceGroup -Name $resourceGroupName -Location $resourceGroupLocation
#部署Template
New-AzureRmResourceGroupDeployment -ResourceGroupName "[ResourceGroupName]" -TemplateFile "[FilePath]" -TemplateParameterFile ["ParameterFilePath"];
复制代码
史海拾趣
|
TMIGS系统是由北京交通大学、北京市市政工程研究院、北京索通紫蜂通讯工程技术有限公司联合研制。该系统具有卓越的性能,配套专业化软件,适用于各种地下工程的施工监测与管理。它集多元信息(钢弦式频率类、电流电压类、开关量、数字信号类、声音 ...… 查看全部问答> |
|
一个网络编程方面的问题,connect()老是报错,请高手帮忙! 客户端程序每次都提示下面的错误,不知道是什么原因: -> socket_client addr: 192.168.10.34 create socket OK!!!!!!! : OK connect error: S_errno_EHOSTUNREACH value = -1 = 0xffffffff 下面是客户端的代码: #include #include #i ...… 查看全部问答> |
|
我专门做fpga的芯片驱动代码,但是我代码写好了,但是芯片fpga还没有写完。 是否有什么方法可以验证我写的代码 写reg是否正确? 大家一般是如何测试的?… 查看全部问答> |
|
1、请问第二级运放的两个15K电阻在此图中起的是什么作用,是否是为第二级运放提供偏置? 2、第二级运放是否为反向比列运算? 2.图中标号3都接地,若要使量输入端电阻对称,第二级运放的同相输入端应加多大的电阻后接地,这个电阻是否是R1||R2||R3 ...… 查看全部问答> |
|
关于使用8-bits D/A(DAC0808.digital-to-analog).数字和模拟信号转换接口编程 我现在有一个问题.如果eeworld的前辈能指教的话.我很感激.数字和模拟信号转换接口编程: 就是如何设计数字和模拟信号转换机器的.使用8-bits D/A(DAC0808.digital-to-analog). 信号发生器有三种波形.是正弦波.矩形波,三角波.使用switch来输入0001,0 ...… 查看全部问答> |
|
我在线调试C51的外部中断时,外部中断1怎么就是跳不出去呢?当INT1发生时,就一直循环着INT1,不再回到主程序了。下面是整个儿程序的代码(谢谢啦) #include #define LED P0 void delay(int); main() { unsigned char i; ...… 查看全部问答> |
|
mini2440 官方5.0bsp 移植dm9000 驱动的问题 现在移植dm9000到mini2440 发现能够识别到id 但是我从台式机上ping开发板ping不通。用的驱动是mini2440 自带的dm9000驱动 各位觉得是什么原因呢,是中断没弄好吗 我发现在5.0的bsp包中关于中断的enable.done disa ...… 查看全部问答> |
|
WINCE5.0,三星2440 CPU,已安装了Macromedia Flash Player 7 for Pocket PC,安装成功,但不能在IE播放FLASH动画网页,浏览动画网页FLASH处空白,请高手帮助,万分感谢!… 查看全部问答> |




