- From: "Leinartas, Michael" <
- To: "
- Subject: [chef] Re: Re: Default roles for new chef clients?
- Date: Sat, 24 Jul 2010 20:20:45 -0500
- Accept-language: en-US
- Acceptlanguage: en-US
Title: Re: [chef] Re: Default roles for new chef clients?
This is about what I was looking for, thanks
From: Joshua Miller <
Date: Fri, 23 Jul 2010 23:29:07 -0500
Subject: [chef] Re: Default roles for new chef clients?
So this a post install script that I run in my pxe boots, I know there are other ways but hey it works for me.
### chef pxe with BASE_ROLE
echo "chef chef/chef_server_url string http://chef.int.rdio:4000" | debconf-set-selections
apt-get install -y chef
#Add to correct roles in chef based on Kickstart Meta Data
cat <<EOF > /root/client.json
"run_list": [ "role[BASE_ROLE]" ]
cat <<EOF > /etc/chef/validation.pem
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
# register with the server
chef-client -j /root/client.json
# We run one more time to make sure its all good
### end chef pxe with BASE_ROLE
On Jul 23, 2010, at 9:17 PM, Leinartas, Michael wrote:
I'm just getting started with chef and trying to figure out how it will fit into our infrastructure. Currently I have things set up so that when a new box is created, chef is installed and the client is started with the master server configured. I'd like to use chef to do some further bootstrapping of the server (e.g. set default firewall rules, add users and copy their keys, install some packages). My question is, is there a way for me to specify a default role for new clients that would have the recipes for these tasks configured?
Is this reasonable? Appropriate? Any solutions, ideas, or other comments appreciated.
Archive powered by MHonArc 2.6.16.