Sha256: 57e9fd2164aaddff6aa1629a04d9019c0fb303da5b7533762f08c7bd694b4f6f

Contents?: true

Size: 1.68 KB

Versions: 16

Compression:

Stored size: 1.68 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

	CHEF_GEM_DIR=$(gem contents chef 2>/dev/null | sed -e "s|\(.*chef-0.9.8\).*|\1|" | head -n 1)
	cp $CHEF_GEM_DIR/distro/redhat/etc/init.d/chef-client /etc/init.d/
	cp $CHEF_GEM_DIR/distro/redhat/etc/logrotate.d/chef-client /etc/logrotate.d/
	chmod 755 /etc/init.d/chef-client

}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
chef-vpc-toolkit-2.8.2 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.8.1 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.8.0 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.7.2 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.7.1 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.7.0 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.6.1 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.6.0 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.5.2 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.5.1 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.5.0 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.4.0 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.3.2 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.3.1 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.3.0 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash
chef-vpc-toolkit-2.2.0 lib/chef-vpc-toolkit/chef_bootstrap/fedora.bash