puppet-jenkins

puppet-jenkins is a reusable puppet module for ubuntu servers that allows you to both install and uninstall the Jenkins Continuous Integration and Deployment Server.

Using puppet-jenkins is easy, and takes about 2 minutes to get up and running.

User’s Guide

Installation

Installing puppet-jenkins is easy. You have a few options:

Note

puppet-jenkins is only meant for use with ubuntu systems. If you are managing non-ubuntu systems via puppet, ensure that puppet-jenkins is not installed on those nodes.

1. Install From Git

To install via Git, all you need to do is clone a copy of the puppet-jenkins repository like so:

git clone git://github.com/rdegges/puppet-jenkins.git jenkins

That will clone puppet-jenkins into a folder named jenkins. Then you can simply copy that file over to your puppet module directory, usually:

cp -R jenkins /etc/puppet/modules/

2. Install as a Git Submodule

If your puppet server is managed via Git itself, you may want to install puppet-jenkins as a Git submodule, so that you can pull in future updates.

Assuming that your puppet Git repo is setup as follows:

puppet/.git
puppet/modules/...

You can simply run the following command from within the puppet directory:

git submodule add git://github.com/rdegges/puppet-jenkins.git modules/jenkins

Then, if you ever want to pull updates from puppet-jenkins (if there is ever a new release or whatever), you can simply run:

cd modules/jenkins
git fetch origin master:master
git checkout master
git pull
cd ../..
git add modules/jenkins
git commit -m "updating puppet-jenkins to latest version"

3. Install From Tarball

Lastly, if you want to avoid using Git at all, you can, of course, simply download the puppet-jenkins tarball, and unzip it into your puppet server’s module directory (typically /etc/puppet/modules).

You can download the latest version of puppet-jenkins on the official GitHub page (just click the big download button).

Usage

Install

Using puppet-jenkins is simple. Once it has been installed, you can add the following to a node definition to make use of the basic features:

node "somenode.somedomain.com" {
    ...
    include jenkins
    ...
}

Once your nodes have applied your new manifest, they’ll have jenkins installed and running. You can then visit your new jenkins server by visiting http://somenode.somedomain.com:8080/.

Note

By default, jenkins runs on port 8080. If you’d like your jenkins instance to be available on the standard HTTP port, take a look at the jenkins proxying guide.

Uninstall

If you want to uninstall jenkins, you can simply add the following do your node definition:

node "somenode.somedomain.com" {
    ...
    include jenkins::uninstall
    ...
}

FAQ

Below are some answers to frequently asked questions.

Is puppet-jenkins Tested?

Yep! There are puppet module smoke tests defined in the tests subdir. You can find them here. If you’d like to run the test suite, install puppet-jenkins, then run the following:

cd /etc/puppet/modules/jenkins/tests
for i in `find . -type f -name '*.pp'`; do puppet apply --noop $i; done

That will fake the various test cases.

I Found a Bug!

Cool! Please submit an issue on the official GitHub issue tracker.

What is puppet?

An awesome tool for managing loads of servers in a reusable fashion. Check out their website.