-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
29 lines (29 loc) · 1 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
rpm -Uvh http://rbel.frameos.org/rbel6
yum -y install ruby ruby-devel ruby-ri ruby-rdoc ruby-shadow gcc gcc-c++ automake autoconf make curl dmidecode
cd /usr/local/src
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar zxf rubygems-1.8.10.tgz
cd rubygems-1.8.10
ruby setup.rb --no-format-executable
gem install chef
mkdir /etc/chef/
cat << EOF > /etc/chef/solo.rb
file_cache_path "/tmp/chef-solo"
cookbook_path "/tmp/chef-solo/cookbooks/"
EOF
cat << EOF > ~/chef.json
{
"chef_server": {
"server_url": "http://localhost:4000",
"webui_enabled": true
},
"run_list": [ "recipe[chef-server::rubygems-install]" ]
}
EOF
wget -O - https://github.com/jtgiri/amazon-ami-chef-server/archive/master.tar.gz | tar -xzv
mkdir -p /tmp/chef-solo
mv amazon-ami-chef-server-master/cookbooks /tmp/chef-solo/cookbooks
/usr/bin/chef-solo -j ~/chef.json
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
for service in chef-server server-webui chef-solr chef-expander couchdb ; do service $service restart ; done