Forked from cmaitchison/chef_server_bootstrap.sh
Last active
August 29, 2015 13:57
-
-
Save john-g-g/9922194 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
#!/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