Skip to content

Instantly share code, notes, and snippets.

@kkurahar
Created May 14, 2013 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkurahar/5573190 to your computer and use it in GitHub Desktop.
Save kkurahar/5573190 to your computer and use it in GitHub Desktop.
chef recipe for `Jenkins` platforms are supported: `Amazon Linux` [Jenkinsをインストールして 、http 8080で接続確認するところまでのレシピです。]
#
# Cookbook Name:: jenkins
# Recipe:: default
#
# Copyright 2013, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
repo_url = 'http://pkg.jenkins-ci.org/redhat/jenkins.repo'
key_url = 'http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key'
execute 'register-yumrepos.d ' do
command "wget -O /etc/yum.repos.d/jenkins.repo #{ repo_url }"
not_if { ::File.exists?("/etc/yum.repos.d/jenkins.repo") }
notifies :run, "execute[register-rpm]", :immediately
end
execute 'register-rpm' do
command "rpm --import #{ key_url }"
action :nothing
end
package 'jenkins' do
action :install
end
service 'jenkins' do
supports :status => true, :restart => true, :reload => true
action [ :enable, :start ]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment