jenkins_windows_agent
Version information
This version is compatible with:
- Puppet Enterprise >= 3.8.0
- Puppet >= 4.0.0
- Windows
Start using this module
Add this module to your Puppetfile:
mod 'ktreese-jenkins_windows_agent', '1.3.0'
Learn more about managing modules with a PuppetfileDocumentation
jenkins_windows_agent
Table of Contents
- Overview
- Module Dependencies - What are the dependencies
- Module Description - What the module does and why it is useful
- 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
Dependencies
- puppetlabs/stdlib (>= 4.1.0)
- chocolatey/chocolatey (>= 1.2.5)
- lwf/remote_file (>= 1.0.1)
- counsyl/windows (>= 1.0.2)
- puppet/windows_env (>= 3.1.0)
- ktreese/nssm (>= 1.0.0)