Created
May 14, 2013 02:21
-
-
Save kkurahar/5573190 to your computer and use it in GitHub Desktop.
chef recipe for `Jenkins` platforms are supported: `Amazon Linux` [Jenkinsをインストールして 、http 8080で接続確認するところまでのレシピです。]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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