Javaのインストール
knife cookbook site vendor java
Jenkinのインストール
yum_key "RPM-GPG-KEY-jenkins" do
url "http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key"
action :add
end
remote_file "/etc/yum.repos.d/jenkins.repo" do
source "http://pkg.jenkins-ci.org/redhat/jenkins.repo"
mode 0644
action :create_if_missing
end
yum_package "jenkins" do
action :install
end
service "jenkins" do
action [:start]
end
chefの実行
node.rb
{
"run_list":[
"java",
"jenkins"
]
}
knife solo cook [対象サーバ]