What's on this page

Configure LMCTL Jenkins slave

Configuring an Lmctl Jenkins slave

Pre-requisites

This guide assumes the following:

Configure Slave

Choose LMCTL Jnlp Image

Select a version of the lmctl-jnlp-slave image from Dockerhub.

Create LMCTL Config Map

  1. Create a new configmap in Kubernetes with kubectl, providing the the LMCTL configuration file as data:

    kubectl create configmap lmctl-slave-config -n lm --from-file <your-lmctl-config-file>
    

Add Template to Jenkins

  1. Navigate to the cloud settings in the Jenkins UI (Manage Jenkins->Configure System->Kubernetes->Images)

  2. Add a new Jnlp slave by selecting the Add Pod Template button

  3. Configure the template as follows, changing the image name to match the lmctl-jnlp-slave you have selected: LMCTL Jnlp Slave config

  4. Save the template

The template is now configured to create a new pod for any Jenkins job which requests an agent with the lmctl label.

Changing configuration of an existing Lmctl Jenkins slave

To update the LMCTL configuration used on any slave pods you need to re-create the configmap with the updated LMCTL config file:

kubectl create configmap lmctl-slave-config -n lm --from-file <your-updated-lmctl-config-file> -n lm

Configure Additional Slaves

There are very few use cases for configuring additional LMCTL slave templates to Jenkins as the existing template will be used any time a slave with LMCTL is required.

If you need to use different Stratoss™ Lifecycle Manager environments in each Jenkins job, you can update the configmap with an updated LMCTL config file featuring all of the potential environments.

It may be reasonable to configure an additional slave if you need an alternative version of LMCTL (or want to try out a new version without losing your old slave template). If this is the case, follow the Configure Slave instructions for the additional template, changing the names of the configmap and Jnlp template name to a unique value.