Sha256: 6811cf60ff900a460d74d2c60154736a9517efdf6225a5b488c94f230d0ea5e7

Contents?: true

Size: 1.64 KB

Versions: 2

Compression:

Stored size: 1.64 KB

Contents

function install_chef {

local INSTALL_TYPE=${1:-"CLIENT"} # CLIENT/SERVER

	[[ "$INSTALL_TYPE" == "CLIENT" ]] || { echo "Chef server installations are not yet supported on Fedora."; exit 1; }

	yum install -q -y ruby ruby-devel gcc gcc-c++ automake autoconf rubygems make &> /dev/null || { echo "Failed to install ruby, ruby-devel, etc."; exit 1; }
	gem update --system
	gem update
	gem install json -v 1.1.4 --no-rdoc --no-ri &> /dev/null || \
		{ echo "Failed to install JSON gem on $HOSTNAME."; exit 1; }
	gem install ohai -v 0.5.6 --no-rdoc --no-ri &> /dev/null || \
		{ echo "Failed to install ohai gem on $HOSTNAME."; exit 1; }
	gem install chef -v 0.9.8 --no-rdoc --no-ri &> /dev/null || \
		{ echo "Failed to install chef gem on $HOSTNAME."; exit 1; }

	for DIR in /etc/chef /var/log/chef /var/cache/chef /var/lib/chef /var/run/chef; do
		mkdir -p $DIR
	done

	cat > /etc/chef/client.rb <<-"EOF_CAT"
log_level          :info
log_location       STDOUT
ssl_verify_mode    :verify_none
chef_server_url "http://localhost:4000"
file_cache_path    "/var/cache/chef"
file_backup_path   "/var/lib/chef/backup"
pid_file           "/var/run/chef/client.pid"
cache_options({ :path => "/var/cache/chef/checksums", :skip_expires => true})
signing_ca_user "chef"
Mixlib::Log::Formatter.show_time = true
validation_client_name "chef-validator"
validation_key         "/etc/chef/validation.pem"
client_key             "/etc/chef/client.pem"
EOF_CAT

	cp /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/distro/redhat/etc/init.d/chef-client /etc/init.d/
	cp /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/distro/redhat/etc/logrotate.d/chef-client /etc/logrotate.d/
	chmod 755 /etc/init.d/chef-client

}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chef-vpc-toolkit-2.0.1 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.0.0 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash