Giter Site home page Giter Site logo

jenkins-node's Introduction

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:

  • JENKINS_URL pointed to the Jenkins master host, e.g. https://ci.deis.io
  • JENKINS_NAME representing the name of the agent itself
  • JENKINS_SECRET representing the secret associated with JENKINS_NAME for connecting via the Jenkins Remoting module.

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:

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

To run via the helm chart:

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.