Skip to content

Commit

Permalink
Merge pull request #19 from galstrom21/master
Browse files Browse the repository at this point in the history
Updating chef-client firstboot script
  • Loading branch information
galstrom21 committed May 18, 2012
2 parents e11c143 + 508a172 commit 6f977a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion templates/firstboot/chef-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ EOF

wget -O /etc/chef/validation.pem http://{{site.webservice_host}}:{{site.webservice_port}}/media/chef_validators/{{site.chef_validation_pem}}

/usr/bin/chef-client
# Configure chef-client upstart
mkdir /var/log/chef
cp /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/distro/debian/etc/init/chef-client.conf /etc/init/
ln -s /lib/init/upstart-job /etc/init.d/chef-client
/etc/init.d/chef-client start
2 changes: 2 additions & 0 deletions templates/post_script/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if [ -s /root/install.sh ]; then
sed -i /etc/rc.local -e 's_exit 0_/root/install.sh_'
fi

ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa

echo "{{host.hostname}}" > /etc/hostname
curl http://{{site.webservice_host}}:{{site.webservice_port}}/api/host/{{host.id}} -H "Content-type: application/json" -d '{"local_boot": 1}' -X "PUT"
curl http://{{site.webservice_host}}:{{site.webservice_port}}/api/host/{{host.id}}/puppet_sig -X "DELETE"

0 comments on commit 6f977a7

Please sign in to comment.