-
-
Save mingderwang/38efa10e39b830a63852 to your computer and use it in GitHub Desktop.
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
mkdir /etc/chef | |
cat << EOF > /etc/chef/solo.rb | |
file_cache_path "/tmp/chef-solo" | |
cookbook_path "/tmp/chef-solo/cookbooks" | |
node_name "app_server6" | |
EOF | |
cat << EOF > /etc/chef/chef.json | |
{ | |
"chef_client": { | |
"server_url": "http://ec2-23-20-173-176.compute-1.amazonaws.com:4000", | |
"interval": "20" | |
}, | |
"run_list": ["recipe[chef-client::config]", "recipe[chef-client]"] | |
} | |
EOF | |
echo "-----BEGIN RSA PRIVATE KEY----- | |
MyValidationKeyHere | |
-----END RSA PRIVATE KEY----- | |
" > /etc/chef/validation.pem | |
#Bootstrap chef-client | |
chef-solo -c /etc/chef/solo.rb -j /etc/chef/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment