Skip to content

Instantly share code, notes, and snippets.

@john-g-g
Last active August 29, 2015 13:57
Show Gist options
  • Save john-g-g/9923148 to your computer and use it in GitHub Desktop.
Save john-g-g/9923148 to your computer and use it in GitHub Desktop.
AWS Chef Bootstrap
#!/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
@john-g-g
Copy link
Author

john-g-g commented Apr 1, 2014

@sneak
Copy link

sneak commented Apr 3, 2014

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.

@sneak
Copy link

sneak commented Apr 3, 2014

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.

@sneak
Copy link

sneak commented Apr 3, 2014

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