deis/jenkins-node

Name: jenkins-node

Owner: Deis

Description: Tooling for bringing up a Jenkins Worker Node for Deis CI.

Created: 2016-10-14 17:34:04.0

Updated: 2018-04-02 02:09:39.0

Pushed: 2017-08-31 15:32:18.0

Homepage: null

Size: 38

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Jenkins Node

Build Status

This component comprises of a Docker image used to run a worker node for CI jobs specifically for the Deis Workflow project on https://ci.deis.io.

Essentially, it bundles all the dependencies specific to running CI for Deis Workflow with the stock Jenkins JNLP connection logic as used by the jenkinsci/docker-jnlp-slave image.

This component does not support building Deis v1 end-to-end jobs due to lack of virtualization support in containers.

Usage

The agent needs three values at minimum to run. They can be passed as arguments or exposed via environment variables. Here we illustrate usage via the latter approach:

Optionally, JENKINS_TUNNEL (of host:port format) can be specified if the JNLP service port is not handled by the host represented in JENKINS_URL

As Static Agent

If a static agent is desired, an administrator will need to create a new node at https://ci.deis.io/computer/new. Once it has been created with the agent's launch method set to “Launch agent via Java Web Start”, the resulting name and secret can be passed to the container, either via docker run or via the helm chart install.

To run directly:

ke build
cker run \
 JENKINS_URL=https://my.jenkins.master \
 JENKINS_NAME=my-node-name \
 JENKINS_SECRET=mynodesecret \
 /var/run/docker.sock:/var/run/docker.sock \
 /home/jenkins/workspace:/home/jenkins/workspace quay.io/deis/jenkins-node:canary

To run via the helm chart:

 install charts/jenkins-node --name my-node-name --namespace jenkins \
set jenkins.url=https://my.jenkins.master \
set agent.name=my-node-name \
set agent.secret=mynodesecret
As Dynamic Agent

The container may also be run via the Kubernetes Plugin, which provisions agents on-demand.

First, configure the plugin itself, i.e., set Jenkins URL and other values as needed. This can be done at https://${JENKINS_URL}/configure

Next, the only configuration necessary for this agent to run is to add the volume mounts, as seen in the docker command above and in the helm chart, to the pod template configuration under the general settings set above.

The plugin will handle passing the provisioned name and secret to the container each time it spins up a new node.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.