Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I customize azure service fabric vm nodes?

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/..

like image 418
Rudra Avatar asked Jun 25 '16 22:06

Rudra


People also ask

How many nodes can be maintained on a service Fabric cluster?

A single Service Fabric node type/scale set can not contain more than 100 nodes/VMs. To scale a cluster beyond 100 nodes, add additional node types.

What is node type in Azure service Fabric?

Each node type that you define in an Azure Service Fabric cluster sets up exactly one scale set: multiple node types cannot be backed by the same scale set and one node type should not be backed by multiple scale sets. The Service Fabric runtime is installed on each virtual machine in the scale set by the Microsoft.

How do you add a node to a service Fabric cluster?

In order to add a new node type, modify your configuration to include the new node type in "NodeTypes" section under "Properties" and begin a configuration upgrade using Start-ServiceFabricClusterConfigurationUpgrade. Once the upgrade completes, you can add new nodes to your cluster with this node type.

Is Azure service Fabric deprecated?

Azure Service Fabric versions - Azure Service Fabric | Microsoft Learn. This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.


1 Answers

You have multiple options:

Install the software manually on each server

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.

Run it as a separate service in 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.

Use Virtual Machine Extensions

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.

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.

Use an automation tool like PowerShell DSC, Puppet, Chef

If the program you want to install is not available directly as a Virtual Machine Extension and can not be installed with a "Custom Script Extension", you could use Azure Automation DSC (Desired State Configuration) to automate the installation of additional software on your nodes. DSC needs an agent on your virtual machines, which is available as a Virtual Machine Extension. There is an ARM-based template that shows how you can integrate the extension into a Virtual Machine Scale Set. You can include this extension in your Service Fabric ARM template and re-deploy it to have the extension installed on each of your nodes.

After this, you could use the Package feature of DSC to install your software.

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.

Use your own VM image

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.

like image 136
Christian Weiss Avatar answered Sep 28 '22 02:09

Christian Weiss