Azure   发布时间:2019-11-03  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Azure 基础:用 PowerShell 自动发布 CloudServices大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

services。

p.publish\xxx.cspkgp.publish\yyy.cscfg

Tings 文件

你的 Azure 账号登录下面的地址,就可以下载 publishsetTings 文件(国际版):

s.publishsetTings你的 subscription 名称。

Hell 命令 Get-AzurePublishSetTingsFile 下载 publishsetTings 文件,过程和上面差不多。

Hell的azure module

PowerSHell” 下面的 “Windows install” 下载安装包。

=p.publish\xxx.cspkg =p.publish\yyy.cscfg = service 名称 service = service name = = ymentLabel = “your demplyment label”

Tings

Tings 文件中记录了 subscription 信息以及用于登录的验证信息,所以先要把这些信息导入进来。TingsFile publishsetTings-file-path

先检查一下,看这个文件对应的 subscription 是不是已经被导入过了。

= false = Get-(.Count 0{ ( { (.SubscriptionName { =

(!{ Import-AzurePublishSetTingsFile Ting //-AzureSubscription -CurrentStorageAccount -SubscriptionName

SELEct-AzureSubscription -SubscriptionName $subscription –Current

yment 是否存在

yment 是否存在,这会影响到后面的部署方式。如果 deployment 不存在,执行 New-AzureDeployment 命令。如果 deployment 已经存在,执行 Set-AzureDeployment 命令。

yment = Get-AzureDeployment -servicename service -Slot -ErrorVariable a -Oraction silentlyconTinue (yment.Name { yment已经存在,使用Set-AzureDeployment命令进行更新。 { 使用New-AzureDeployment命令新建 deployment }

yment

New-AzureDeployment -Slot -Package -Configuration -label ymentLabel -servicename serviceyment = Get-AzureDeployment -servicename service -Slot //ymentID = yment.deploymentid;

Set-AzureDeployment -Upgrade -Slot -Package -Configuration -label ymentLabel -servicename service -yment = Get-AzureDeployment -servicename service -Slot //ymentID = yment.deploymentid;

title="Azure 基础:用 PowerSHell 自动发布 Cloudservices" alt="Azure 基础:用 PowerSHell 自动发布 Cloudservices" src="https://cn.js-code.com/res/2019/02-09/09/e318d09d70f0301ab449f461b66e0045.png" width="809" height="350">

yment label 是我们在发布脚本中设置的,一般会写入发布日期和版本号。yment ID 是标识本次部署的 GUID。

Hell 的 azure 模块已经提供了很完善的命令供我们进行自动化的发布使用,我们只要把这些命令组织成脚本就可以了。

大佬总结

以上是大佬教程为你收集整理的Azure 基础:用 PowerShell 自动发布 CloudServices全部内容,希望文章能够帮你解决Azure 基础:用 PowerShell 自动发布 CloudServices所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: