From b70d85377ff8321e54d0e60337db454b4b04fdfd Mon Sep 17 00:00:00 2001 From: Yun Mao Date: Tue, 7 May 2013 17:52:52 -0400 Subject: [PATCH] Add the script to install chef server 0.10 --- bin/install_chefserver.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 bin/install_chefserver.sh diff --git a/bin/install_chefserver.sh b/bin/install_chefserver.sh new file mode 100755 index 0000000..7697848 --- /dev/null +++ b/bin/install_chefserver.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# install chef server from opscode repo via apt + +CHEF_SERVER=$(hostname) +CHEF_PASSWORD=${CHEF_PASSWORD:-ChefServer} + +echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list + +sudo mkdir -p /etc/apt/trusted.gpg.d +gpg --keyserver keys.gnupg.net --recv-keys 83EF826A +gpg --export packages@opscode.com | sudo tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null + +sudo apt-get update + +sudo apt-get install -y opscode-keyring # permanent upgradeable keyring +sudo apt-get install -y debconf-utils +sudo apt-get -y upgrade + +cat | sudo debconf-set-selections << EOF +# New password for the 'admin' user in the Chef Server WebUI: +chef-server-webui chef-server-webui/admin_password password ${CHEF_PASSWORD} +# New password for the 'chef' AMQP user in the RabbitMQ vhost "/chef": +chef-solr chef-solr/amqp_password password ${CHEF_PASSWORD} +# URL of Chef Server (e.g., http://chef.example.com:4000): +chef chef/chef_server_url string http://${CHEF_SERVER}:4000 +EOF + +sudo apt-get -y install chef chef-server chef-server-api chef-expander +