Pregunta

Is there a tool which would take my current non-chef server and "convert" it to Chef instructions? Or maybe suggest which cookbooks I should use?

Can that be done using other provisioners such as Puppet?

¿Fue útil?

Solución

There is Blueprint which tries exactly that.

Blueprint reverse-engineers servers.

  • Easy configuration management.
  • Detect relevant packages, files, and source installs.
  • Generate reusable server configs.
  • Convert blueprints to Puppet or Chef or CFEngine 3.
  • No DSLs, no extra servers, no workflow changes.

Blueprint looks inside popular package managers, finds changes you made to configuration files, and archives software you built from source. It runs on Debian- and RPM-based Linux distros with Python >= 2.6 and Git >= 1.7. See http://devstructure.github.com/blueprint/ for comprehensive documentation and examples.

Note though that the conversion will often be incomplete or contain extra stuff you don't need. To actually use the output, you'll probably want to to clean it up manually, using your knowledge of the services you need to configure.

Also, it will not use existing community cookbooks, so you'll need to convert the generated cookbook code to use these existing resources manually.

Generally, you should try to setup your services using Chef or Puppet, not setting it up manually and then try to generate a Chef/Puppet config from it. That way, your config code will be much cleaner, you'll be able to re-use stuff form other people

Otros consejos

In the Puppet universe, you would use puppet resource to extract the appropriate entities from the running system.

Note that the result will be a Puppet manifest that is overly strict. You usually would not manage configuration items (e.g. system users) that are introduced through provisioning. In short, the limitations that Holger mentioned do apply.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top