Last active
December 19, 2015 00:29
-
-
Save Twinuma/5869049 to your computer and use it in GitHub Desktop.
EC2へChef-Soloインストール/Cookbook作成/Chef-Solo設定2ファイル作成/Recipe作成&編集/Chef-Soloを実行しhttpdインストール
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
$ curl -L http://www.opscode.com/chef/install.sh | sudo bash | |
$ knife cookbook create apache -o cookbooks | |
$ vi solo.rb | |
file_cache_path "/tmp/chef-solo" | |
cookbook_path ["/home/ec2-user/cookbooks"] | |
$ vi localhost.json | |
{ | |
"run_list" : [ | |
"recipe[apache]" | |
] | |
} | |
$ vi ./cookbooks/apache/recipes/default.rb | |
# | |
# Cookbook Name:: apache | |
# Recipe:: default | |
# | |
# Copyright 2013, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
package "httpd" do | |
action :install | |
end | |
$ sudo chef-solo -c solo.rb -j ./localhost.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment