Created
November 4, 2013 00:57
-
-
Save rafaelfelini/7296609 to your computer and use it in GitHub Desktop.
Test install nginx with chef
This file contains hidden or 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
sudo su | |
cd | |
curl -L https://www.opscode.com/chef/install.sh | bash | |
chef-solo -v | |
cd | |
rm -rf * | |
rm -rf .chef/ | |
mkdir .chef | |
echo 'cookbook_path [ "/root/chef-repo/cookbooks" ]' > .chef/knife.rb | |
echo 'file_cache_path "/root/chef-solo"' >> solo.rb | |
echo 'cookbook_path "/root/chef-repo/cookbooks"' >> solo.rb | |
echo ' | |
{ | |
"run_list": [ | |
"recipe[nginx]" | |
] | |
}' > web.json | |
mkdir -p /root/chef-repo/cookbooks | |
cd !$ | |
knife cookbook site download yum | |
knife cookbook site download apt | |
knife cookbook site download ohai | |
knife cookbook site download build-essential | |
knife cookbook site download runit | |
knife cookbook site download nginx | |
for file in *.gz; do tar zxf $file; done; | |
rm -f *.gz | |
cd | |
chef-solo -c solo.rb -j web.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment