create a chef cookbook from current configuration

Im wondering if its possible with chef (or any other tool like puppet or ansible …) to create cookbooks from current server configurations.

For example i have a red hat server with an jboss 7 running on it.
Would it be possible to read that server configuration (users, groups, installed services) and the jboss configuration and create a cookbook from this configuration for further use and deployments of new server?

if its not possible with chef, does a 3rd party tool exists which can handle such a task?

thanks.

Answer

If you remember what you did to configure stuff, you can write a cookbook.

You can copy your configs, but be aware, that this is overkill for a good cookbook. In an installation you want to change as little as possible, dumping the whole state of a configuration adds much stuff you did not change. This is bad, when a newer version comes with a newer config and you copy the old config (with old default values) instead of just adding your keys.

I do not think there is a fully automated way.

Attribution
Source : Link , Question Author : user3341669 , Answer Author : allo

Leave a Comment