Skip to content

Instantly share code, notes, and snippets.

@john-g-g
Forked from cmaitchison/chef_server_bootstrap.sh
Last active August 29, 2015 13:57
Show Gist options
  • Save john-g-g/9922194 to your computer and use it in GitHub Desktop.
Save john-g-g/9922194 to your computer and use it in GitHub Desktop.
#!/bin/bash -xe
#THIS SCRIPT MUST BE RUN AS ROOT
#update packages
echo "deb http://apt.opscode.com/ precise-0.10 main" | tee /etc/apt/sources.list.d/opscode.list
mkdir -p /etc/apt/trusted.gpg.d
gpg --keyserver keys.gnupg.net --recv-keys 83EF826A
gpg --export packages@opscode.com | tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null
apt-get update
apt-get install opscode-keyring -y
apt-get upgrade -y
#synchronise time
ntpdate ntp.ubuntu.com
#install chef
apt-get install chef chef-server -y
mkdir -p /home/ubuntu/.chef
cp /etc/chef/validation.pem /etc/chef/webui.pem /home/ubuntu/.chef
chown -R ubuntu /home/ubuntu/.chef
apt-get install git-core -y
#exit root console and
#knife configure -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment