- From: Hector Castro <
>
- To:
- Subject: [chef] Re: chef-solo and different server configs
- Date: Sat, 19 Nov 2011 11:58:54 -0500
Not using CloudInit yet. Currently deploying to an internal VMware setup
with standard 11.10 server images. My preseed file:
https://gist.github.com/1377459
In my setup all of the nodes actually serve the same purpose. I wrote a
little Capistrano task to make the remote chef-solo runs a little more
automated. It handles synchronizing the repository and executing Chef.
--
Hector
On Nov 19, 2011, at 11:45 AM, S Ahmed wrote:
>
With ubuntu, are you using cloudinit to preseed?
>
>
But with this setup, you have to run a different chef-solo command for each
>
node type correct?
>
>
I guess to automate this a little further, you could have some sort of
>
lookup system (maybe the hostname?) and look for a pattern, like if you
>
hosts are prefixed with 'db' then it is a database node type or 'www' for a
>
front end server.
>
>
On Sat, Nov 19, 2011 at 11:40 AM, Hector Castro
>
<
>
>
wrote:
>
I'd be interested to see other people's approaches to this as well. Right
>
now I have chef-solo 2-4 server setup as well.
>
>
First, I install Chef via APT at OS install time with preseeding. On
>
Ubuntu/Debian Chef looks for cookbooks and roles in /var/cache/chef by
>
default.
>
>
I have a Git repository housing everything that eventually gets sync'd to
>
/var/cache/chef. In config/ of that repository, I have one JSON file for
>
each node. In roles/ I have all of the shared role JSON files. Cookbooks
>
live in cookbooks/ and site-cookbooks/.
>
>
--
>
Hector
>
>
On Nov 18, 2011, at 4:14 PM, S Ahmed wrote:
>
>
> I'm planning on setting things up with the below setup. This is for a
>
> 2-4 server setup, looking for guidance/best practises for a chef-solo
>
> repo.
>
>
>
> When using chef-solo with a setup like:
>
>
>
> /var/chef-solo/
>
> /var/chef-solo/cookbooks
>
>
>
> If I have web servers, a db server, etc. to configure, I guess it is just
>
> a matter of having the necessary recipies in the cookbook and then
>
> creating a seperate .json file like web1.json and db1.json correct?
>
>
>
> I'll save this in a git repo, so that if I need to update anything I can
>
> then run a command than will update the repo's of all my servers, and
>
> then run the chef-solo command.
>
>
>
> Running chef with:
>
>
>
> chef-solo -c ~/solo.rb -j ~/web1.json
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Archive powered by MHonArc 2.6.16.