Managing user dotfiles under chef -- as files?

We’re developing a chef repo, one component of which is managing a
small set of users (admins and engineers) from within chef.

Our current method of deploying various dotfiles and config files
(.vimrc, .screenrc, etc.) serialized within a json file. Which works.

But it’s not particularly amenable to editing those files (we could
unpack and repack them of course).

I’ve done some searching but don’t see an established M.O. for
handling user files as files within Chef.

Is this advisable?
If not, is there a better method for doing so?
Am I barking up the wrong giraffe?


Dr. Ed Morbius
Chief Scientist / Philologist / Robot Wrangler / Powerplant Operator
Krell Power Systems Unlimited

It's not clear whether each person has their own distinct configurations, or if they are all a common configuration. If it's the former, perhaps try putting each person's configuration in a separate Git repo and pulling it in in a cookbook. If it's the latter, I have typically just had a recipe that lays down these files using cookbook_file.

--
Larry Wright

On Thursday, July 12, 2012 at 7:48 PM, Edward Morbius wrote:

We're developing a chef repo, one component of which is managing a
small set of users (admins and engineers) from within chef.

Our current method of deploying various dotfiles and config files
(.vimrc, .screenrc, etc.) serialized within a json file. Which works.

But it's not particularly amenable to editing those files (we could
unpack and repack them of course).

I've done some searching but don't see an established M.O. for
handling user files as files within Chef.

Is this advisable?
If not, is there a better method for doing so?
Am I barking up the wrong giraffe?

--
Dr. Ed Morbius
Chief Scientist / Philologist / Robot Wrangler / Powerplant Operator
Krell Power Systems Unlimited

Separate, per-user config files. We may seed them from a skeleton
template initially, but they'll be allowed to differ from one another
over time.

On Thu, Jul 12, 2012 at 8:39 PM, Larry Wright larrywright@gmail.com wrote:

It's not clear whether each person has their own distinct configurations, or
if they are all a common configuration. If it's the former, perhaps try
putting each person's configuration in a separate Git repo and pulling it in
in a cookbook. If it's the latter, I have typically just had a recipe that
lays down these files using cookbook_file.

--
Larry Wright

On Thursday, July 12, 2012 at 7:48 PM, Edward Morbius wrote:

We're developing a chef repo, one component of which is managing a
small set of users (admins and engineers) from within chef.

Our current method of deploying various dotfiles and config files
(.vimrc, .screenrc, etc.) serialized within a json file. Which works.

But it's not particularly amenable to editing those files (we could
unpack and repack them of course).

I've done some searching but don't see an established M.O. for
handling user files as files within Chef.

Is this advisable?
If not, is there a better method for doing so?
Am I barking up the wrong giraffe?

--
Dr. Ed Morbius
Chief Scientist / Philologist / Robot Wrangler / Powerplant Operator
Krell Power Systems Unlimited

--
Dr. Ed Morbius
Chief Scientist / Philologist / Robot Wrangler / Powerplant Operator
Krell Power Systems Unlimited

On Fri, Jul 13, 2012 at 1:51 PM, Edward Morbius dredmorbius@gmail.com wrote:

Separate, per-user config files. We may seed them from a skeleton
template initially, but they'll be allowed to differ from one another
over time.

There are a number of people out there storing their dotfiles in git
repositories. Check out the Git dot-files page:
http://dotfiles.github.com/

There is a chef-dotfiles cookbook on github:

This cookbook will check out a repo and do the symlinks for you. It
allows you to have two repositories, one for defaults and a custom
repository too. I would enhance it to use only one repository but have
a tree of users inside the repository, one directory for each user and
a typical 'skel' directory as the default. Have the recipe checkout
the repository to a read shared location like /home/skel.

Then walk through the list of users and provide links to custom
dotfiles if they exist in the corresponding users directory in the
skel repository

/home/skel # git repository checkout
/home/skel/bob # bob's custom dot-files
/home/skel/frank # frank's custom dot-files
/home/skel/skel # default dot-files
/home/bob # bob's home directory
/home/bob/.bashrc -> /home/skel/bob/bashrc # bob has a custom bashrc
/home/frank # frank's home directory
/home/frank/.bashrc -> /home/skel/skel/bashrc # frank does not so the
default is used.

Whenever Chef is run, the skel git repository will update and changes
to dot files will be pulled down. You could let everyone push to this
git repository, updating their own dot-files. A malicious user could
modify another users dot-files, so if you're worried about that you
could have a human go-between here if you wanted, using an internal
process or Github pull requests.

Bryan