Uploaded image for project: 'GPII - Global Public Inclusive Infrastructure'
  1. GPII - Global Public Inclusive Infrastructure
  2. GPII-1562

Ansible role for managing Jenkins nodes

    XMLWordPrintable

    Details

      Description

      The GPII Jenkins server delegates project jobs to multiple Linux and Windows hosts. The ansible-jenkins role can be used to deploy a Jenkins server but work needs to be done (maybe in a separate ansible-jenkins-node role?) to automate the deployment of nodes where the jobs are run.

      The work should ideally be tested using Vagrant to set up a Jenkins VM and a node that it can communicate with.

      Preference should be given to using the Jenkins API with Groovy scripts instead of relying on configuration templates as the latter might not be future proof.

      Jenkins node port security needs to be configured:

      Enable security
      TCP port for JNLP slave agents (Fixed, and then specify port number)

      A few node settings should be configurable:

      Name:
      Description:
      No. of executors:
      Remote root directory:
      Labels: (so far only one label per node has been assigned in practice)
      Usage: (both options are used depending on the type of node being added)
      Launch method: (at least the SSH and Java Web Start methods)

      When using the Java Web Start method, a node secret is provided. That secret should be captured and stored on the Jenkins node:

      First file:

      $ cat /etc/jenkins/win10_node_secret.conf
      JENKINS_WIN10_NODE_SECRET="secret-string"

      Second file:

      $ cat /home/jenkins/bin/set-jenkins-win10-node-secret.sh
      #!/bin/bash

      source /etc/jenkins/win10_node_secret.conf
      vagrant winrm -e -c "setx JENKINS_WIN10_NODE_SECRET $JENKINS_WIN10_NODE_SECRET"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              amatas Alfredo Matas
              Reporter:
              avtar Avtar Gill
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: