4 ms·
Is there any way to automatically generate a provisioning script based on what was installed on the guest machine? For example, I do "vagrant ssh" and then inst
by xmonkee 13y ago
Is there any way to automatically generate a provisioning script based on what was installed on the guest machine? For example, I do "vagrant ssh" and then install my whole development environment and it creates a script to do it every time based on what changed?
- mitchellh 13y agoNot within Vagrant itself. This is really the realm of configuration management tools. As far as I know, no tools do this reverse engineering because it is a fundamentally very difficult problem, but many of the config mgmt tools make it very easy to translate shell commands to rudimentary scripts for their systems.
- jsmeaton 13y agoVagrant doesn't, but blueprint[0] seems to be a decent tool for generating puppet manifests. I haven't used it personally, but an Ops guy at work has had some success with it. [0]http://devstructure.com/blueprint/ http://devstructure.com/blueprint/
- mryan 13y agoPuppet has some limited support for generating manifests based on the state of an existing system: http://docs.puppetlabs.com/man/resource.html http://docs.puppetlabs.com/man/resource.html
- candeira 13y agoLook at blueprint: https://github.com/devstructure/blueprint/ https://github.com/devstructure/blueprint/ Right now it has frontends for bcfg2, cfengine, chef, puppet and shell scripts. It's not perfect, but it does a pretty good job of giving you a base set of provisioning rules you can then refine by hand.