Forge Home

jenkins_windows_agent

Module for deploying a Jenkins Agent for Windows via the swarm jar

10,688 downloads

942 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.3.0 (latest)
  • 1.2.3
  • 1.2.2
  • 1.2.1
  • 1.2.0
  • 1.1.0
  • 1.0.6
  • 1.0.5
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1 (deleted)
  • 1.0.0 (deleted)
released May 10th 2021
This version is compatible with:
  • Puppet Enterprise >= 3.8.0
  • Puppet >= 4.0.0
  • Windows

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'ktreese-jenkins_windows_agent', '1.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add ktreese-jenkins_windows_agent
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install ktreese-jenkins_windows_agent --version 1.3.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

ktreese/jenkins_windows_agent — version 1.3.0 May 10th 2021

jenkins_windows_agent

Table of Contents

  1. Overview
  2. Module Dependencies - What are the dependencies
  3. Module Description - What the module does and why it is useful
  4. Classifcation Setup - The basics of getting started with jenkins_windows_agent

Overview

This module will deploy the Jenkins Agent on Windows systems via the swarm jar and run it as a windows service using NSSM.

Module Dependencies

Please review the Dependencies to ensure you have all that is required in order for this module to function properly.

Module Description

The Windows Jenkins Agent will be deployed with the following defaults:

  • swarm-client-3.3.jar (JENKINS-42138 indicates this jar contains the dependencies)
  • mode: exclusive
  • executors: 8
  • labels: windows
  • Agent Home: C:\opt\ci\jenkins
  • Agent Workspace: C:\opt\ci\jenkins\workspace
  • Jenkins Master: http://myjenkinsmaster.localhost:8080
  • java: latest choco jdk8 package
  • disableSslVerification swarm option enabled (override via hiera to undef if not needed)
  • service account: LocalSystem

Puppet will create a windows service Jenkins_Agent and set it to run as the LocalSystem account

Any of the above defaults can be overridden via hiera as described in Setup Requirements.

If overriding the service account, the credentials for that user may be stored in an encrypted format in hiera via eyaml.

Classification Setup

This module includes a single class:

include jenkins_windows_agent

At a minimum, the jenkins_master_url, jenkins_master_user, and jenkins_master_pass variables should be overridden via hiera, Puppet Console, or inside of a resource like declaration:

class { 'jenkins_windows_agent':
  jenkins_master_url  => 'http://your_jenkins_master_url:8080',
  jenkins_master_user => 'your_jenkins_master_user',
  jenkins_master_pass => 'your_jenkins_master_pass',
}

What the jenkins_agent module affects

List of things that the module will alter:

 - Installs jdk8
 - Installs NSSM - the Non-Sucking Service Manager
 - Creates C:/tmp; C:/opt/ci/jenkins; C:/opt/ci/jenkins/workspace
 - Creates Jenkins_Agent service to run as LocalSystem via NSSM
 - Sets arguments / parameters for Jenkins_Agent service via NSSM
 - Manages Jenkins_Agent service

Setup Requirements

Please review the Module Dependencies section.

Override default values in the Puppet Console, or namespace the key/value pairs appropriately in the desired yaml hieradata file. At minimum, you'll need to override the jenkins_master_url, jenkins_master_user, and jenkins_master_pass variables to your environments specifications.

For example, to override these variables via hiera:

jenkins_windows_agent::jenkins_master_url: http://your_jenkins_master_url:8080
jenkins_windows_agent::jenkins_master_user: jenkins
jenkins_windows_agent::jenkins_master_pass: mypassword