Skip to content

Instantly share code, notes, and snippets.

@kuinak
Created June 19, 2012 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuinak/2955566 to your computer and use it in GitHub Desktop.
Save kuinak/2955566 to your computer and use it in GitHub Desktop.
chef_server
#!/bin/bash
# curl -L https://raw.github.com/gist/2955566 | bash
echo "deb http://apt.opscode.com/ `lsb_release -cs`-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 -y install opscode-keyring
apt-get -y upgrade
apt-get -y install chef chef-server
useradd -m -U chefuser -s /bin/bash
mkdir ~chefuser/.chef
cp /etc/chef/validation.pem /etc/chef/webui.pem ~chefuser/.chef
chown -R chefuser ~chefuser/.chef
echo 'Please run:\
su - chefuser -c "knife configure -i"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment