本文介绍了我可以自定义Azure Service Fabric虚拟机节点吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在天蓝色的服务架构中利用可靠的actor模型。我们的参与者模型计算需要在vm节点上安装特定的软件。我可以在vm节点中安装自定义软件(在azure Service Fabric软件之上​​),以便在actor模型计算中利用该软件吗?作为将角色模型部署到azure服务结构中的一部分,我可以在其中编写此自定义软件吗?这是应该怎么做?还是还有其他方法?还是有可能?

I would like to leverage reliable actor model in the azure service fabric. Our actor model computation requires specific software installed on the vm node. Can I have custom software installed (on top of the azure service fabric software) in the vm nodes so that I can leverage this software in the actor model computation? As part of the my actor model deployment into azure service fabric, can I author this custom software installation into it? Is this how it should be done? Or are there any other ways? Or is it even possible?

Raghu /..

推荐答案

您有多种选择:

在每台服务器上手动安装软件

如果您不必经常更改服务器的数量,如果您没有很多服务器,则只需将RDP插入每台服务器并手动安装软件即可。

If you don't change the number of servers often and if you don't have a lot of servers, you could just RDP into each server and manually install your software.

在Service Fabric中将其作为单独的服务运行

如JunRam所说,您可以在Service Fabric中运行来宾可执行文件。假设您的软件是没有安装程序的简单程序,则可以为其创建无状态服务包,并将InstanceCount设置为-1。这意味着服务将通过Service Fabric放置在每个节点上。然后,如果Service Fabric意外终止,则Service Fabric将自动重新启动该程序,并且在横向扩展时还将其放置在新节点上。

As JunRam said, you can run guest executables in Service Fabric. Assuming your software is a simple program without an installer, you could create a stateless service package for it and set the InstanceCount to -1. This means, the service will be placed on every node by Service Fabric. Service Fabric will then automatically re-start the program if it terminates unexpectedly and it will also place it on new nodes when you scale out.

使用虚拟机扩展

可以直接集成到虚拟机的ARM(Azure资源管理器)模板中。 Azure Service Fabric的默认ARM模板使用此机制在每台服务器上自动安装 Azure Diagnostics代理和Service Fabric代理。要获取Service Fabric的ARM模板,可以使用,使用Azure门户向导并将其导出,然后再创建群集或作为模板。

Some software can be integrated directly into the ARM (Azure Resource Manager) template of your virtual machine. The default ARM template of Azure Service Fabric uses this mechanism to automatically install the "Azure Diagnostics" agent and the Service Fabric agent on each server. To get an ARM template for Service Fabric, you can either use a quickstart sample, use the Azure Portal wizard and export it right before you would create the cluster or export an existing resource group as a template.

,您可以运行CMD或PowerShell脚本。在这样的脚本中,您可以例如使用,或手动安装程序。

There's also a Custom Script Extension that allows you to run a CMD or PowerShell script. Within such a script you could e.g. use Chocolatey, Boxstarter or manually install your program.

此方法的优势在于,它会在基础架构部署中安装软件,并且还会在以下位置自动安装软件:

The advantage of this method is that it installs the software as part of your infrastructure deployment and it also automatically installs the software on each new node when you scale out your cluster.

使用自动化工具,如PowerShell DSC,Puppet,Chef

如果要安装的程序不能直接作为虚拟机扩展使用,并且不能与自定义脚本扩展一起安装,则可以使用(所需状态配置)可自动在节点上安装其他软件。 DSC在您的虚拟机上需要一个代理,该代理可以作为虚拟机扩展使用。有一个。

请注意,创建此解决方案可能需要大量时间。但是,PowerShell DSC是一个非常强大的系统,安装后,将为您提供更多的服务器管理功能。

Be aware that creating this solution might require a considerable amount of time. However, PowerShell DSC is a very powerful system that, once installed, gives you many more possibilities in terms of server management.

使用您自己的VM映像

您可以和虚拟机映像并将其用作Service Fabric ARM模板的基础映像。如果您需要在服务器上执行无法轻松自动执行的步骤,这可能会很有用。

You can capture and upload a virtual machine image and use this as the base image for your Service Fabric ARM template. This might be useful if you need to execute steps on your server which can't be automated easily.

这篇关于我可以自定义Azure Service Fabric虚拟机节点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-26 19:52