Override Jenkins default executor configuration for more control over cloud infrastructure

The Spot Jenkins plugin allows Jenkins to manage Elastigroups, enabling users to run servers with spot instances and take advantage of the other Elastigroup features. It’s a powerful integration that Spot is continuously improving in order to give our users even more control over their application infrastructure. 

When a pending job is detected by the Spot Jenkins plugin, VMs are automatically provisioned. Multiple VMs types can be spun up, and by default, each node has an executor count equal to the number of vCPUs in the instance. For example, an instance with four vCPUs can have up to four Jenkins jobs running on it in parallel. This approach can provide the best utilization of instances but in some situations, the user will want to redefine the number of executors and override this default. This can be the case when an instance with multiple vCPUs is needed to run a large job.

The latest addition to the Spot Jenkins plugin allows users the option to change the default value to a desired executor count for a specific instance type, or for all instance types. Users can configure this setting once, and it is applied automatically to nodes in Jenkins. When new node types are introduced by a cloud provider, the defined executor count is also automatically applied instead of the Jenkins default.  With this new capability, users no longer need to manually reconfigure these settings for each instance type. 

Override the default Jenkins executor count

Setting this configuration is simple and straightforward, and can be done easily in your Jenkins. 

Go to the cloud configuration in your Jenkins and check “override default number of executors” and insert your “default executor count” value. A valid, positive number is required in this field. 

Every new node will have the number of executors configured, and users can also specify nodes that will have a different weight than the new default.

Select the node type from the list  under “Instance type weight” and assign it the desired number of executors. The override will now take effect with any newly provisioned node. 

The override will now take effect with any newly provisioned node, giving users even more control over their cloud infrastructure.

To learn more about Elastigroup, and start using Elastigroup with your Jenkins, visit our documentation guides.