简体   繁体   English

云的应用程序部署

[英]Application deployment for cloud

I am new to cloud platform. 我是云平台的新手。

I know that various cloud vendor have a mechanism wherein if the VM crashes and cannot be brought up, it can spin a new VM In such a case, how is the code deployed on the new VM that the Cloud provider spins? 我知道各种云供应商都有一种机制,如果VM崩溃并且无法启动,则可以旋转新VM。在这种情况下,云提供商旋转的新VM上部署的代码如何?

In such a case does the application owner has to deal with the deployment or is it taken care of by the Provider 在这种情况下,应用程序所有者必须处理部署,还是由提供者来处理

For PaaS, you upload a package and configuration (cspkg and cscfg from your build) to the cloud service, this is deployed by Azure automatically, you can specify how many (and size) machines you want your application to be deployed over, and it's configurable via the Portal (and outside using PowerShell/REST) if you want to. 对于PaaS,您将程序包和配置(构建中的cspkg和cscfg)上传到云服务,由Azure自动部署,您可以指定要在其上部署应用程序的计算机的数量(和大小),并且如果需要,可以通过门户进行配置(以及在外部使用PowerShell / REST)。

In your solution you specify the size in the csdef: 在您的解决方案中,您可以在csdef中指定大小:

<ServiceDefinition name="MyWebRole.CloudService" <WebRole name="MyWebRole" vmsize="Small">

And the number of instances in the cscfg: 以及cscfg中的实例数:

<Role name="MyWebRole" vmName="WebRole"> <Instances count="2" />

You should make sure you have a minimum of 2 instances running for your app, if one goes down then your app won't fail straight away. 您应确保至少有2个实例正在为您的应用程序运行,如果一个实例出现故障,则您的应用程序不会立即失败。 Microsoft may need to tear it down or update it without telling you (and you shouldn't notice apart from any logs etc), if your app cannot cope on a single instance then make sure you have 3 (so in the event of a server going down you still have a minimum of 2). 如果您的应用程序无法在单个实例上处理,Microsoft 可能需要在不通知您的情况下将其拆除或更新(并且您应该注意其他日志等),然后确保您拥有3个(因此,如果是服务器)下降,您至少还有2)。

Via the Azure Portal you can both reboot and reimage (deploy your package/config to a completely new machine), the package/config are retained in Azure so you don't need to deploy them again, the same thing happens when you scale your service up/down, the package/config already exist in Azure so it "just does it" (expecting a busy day? Add some machines to your service, or set it to auto scale based on a metric). 通过Azure门户,您可以重新启动和重新映像(将程序包/配置部署到一台全新的计算机上),该程序包/配置保留在Azure中,因此您无需再次部署它们,扩展规模时也会发生相同的情况服务向上/向下,程序包/配置已经存在于Azure中,因此它“正好是”(希望是忙碌的一天?向您的服务中添加一些计算机,或将其设置为基于指标自动缩放)。

IaaS is very much the same as your usual VM scenario, you spin them up, remote onto them and do whatever is necessary! IaaS与通常的VM场景非常相似,您将它们旋转起来,远程部署到它们上,然后做任何必要的事情! You can turn them on and off via the portal. 您可以通过门户打开和关闭它们。 Installations, OS issues/config, patching, are your own problems (potentially joined to a domain so policies/DSC can be used if that's what your familiar with), so if you have something that needs to be installed via an exe etc or used with a GUI, then VM's work for this scenario. 安装,操作系统问题/配置,修补程序是您自己的问题(可能已加入域,因此如果您熟悉策略/ DSC,则可以使用策略/ DSC),因此,如果您需要通过exe等进行安装或使用使用GUI,然后在这种情况下VM的工作。 As a side note, I've only every once seen an issue in Azure with a VM getting knackered (blue screen -> insert cd error), if you think you have a problem with the platform you can do things like delete the VM (but keep the disks!) and create a new one with the same disks. 附带说明一下,我只曾经一次在Azure中遇到过VM被打碎的问题(蓝屏->插入cd错误),如果您认为平台有问题,则可以执行诸如删除VM(但保留磁盘!),然后使用相同的磁盘创建一个新磁盘。

Another thing to look into is WebApps/AppServices, they are kind of like Cloud Services, except they take away some of the issues such as having actual underlying VMs. 要研究的另一件事是WebApps / AppServices,它们类似于Cloud Services,但它们消除了一些问题,例如拥有实际的基础VM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM