Skip to content

Instantly share code, notes, and snippets.

@stigkj
Forked from nstielau/default.rb
Created August 16, 2011 07:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stigkj/1148607 to your computer and use it in GitHub Desktop.
Save stigkj/1148607 to your computer and use it in GitHub Desktop.
A simple Chef recipe to install Jenkins
#
# Cookbook Name:: jenkins
# Recipe:: default
#
# https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
# This is super-simple, compared to the other Chef cookbook I found
# for Jenkins (https://github.com/fnichol/chef-jenkins).
#
# This doesn't include Chef libraries for adding Jenkin's jobs via
# the command line, but it does get Jenkins up and running.
#
# I'd rather build up a Chef cookbook than strip it down, so here's
# a good starting point.
include_recipe "apt"
include_recipe "java"
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key"
components ["binary/"]
action :add
end
package "jenkins"
service "jenkins" do
supports [:stop, :start, :restart]
action [:start, :enable]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment