Last active
August 29, 2015 13:57
-
-
Save john-g-g/9923148 to your computer and use it in GitHub Desktop.
AWS Chef Bootstrap
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
#!/bin/bash -xe | |
#update packages | |
sudo apt-get update | |
sudo apt-get install tmux | |
sudo apt-get install ruby1.9.1-full ruby1.9.1-dev rubygems1.9.1 | |
sudo apt-get install git | |
cd ~ | |
wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.11-1.ubuntu.12.04_amd64.deb | |
sudo dpkg -i chef-server* | |
sudo chef-server-ctl reconfigure | |
# Create .chef dir | |
mkdir -p /home/ubuntu/.chef | |
sudo cp /etc/chef/validation.pem /etc/chef/webui.pem /home/ubuntu/.chef | |
chown -R ubuntu /home/ubuntu/.chef | |
# Install berkshelf | |
#gem install berkshelf |
There is a "chef server omnibus installer" bootstrap script from opscode that you should use to install chef server on the base image, your bootstrap script should not be installing ruby or anything itself - the opscode omnibus installer handles 100% of that for you.
Also: you never install berkshelf or any of that on the server. That's all clientside stuff to be used with knife.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Re: line 7 and line 11 (tmux and git), please don't install anything other than the chef-server. Install 100% of the other packages via chef itself.