Oliver
2011-May-10 19:50 UTC
[Puppet Users] Continuous Integration, Puppet, dynamic VMs etc
Hi there, Have any of you Puppet users/abusers out there worked on or even succeeded at some sort of Continuous Integration of your Puppet-language codebase? I''m very interested to hear about the experiences of other people in the community on some of this stuff. If you were in Amsterdam for Puppet Camp you might have seen my talk on these kinds of things and I''m sure there are more of you who are crazy enough to try similar ideas. Last week I finally got around to coding up the rake tasks to support dynamic VM creation with Vagrant to run our "Faces" compile tests on modules that had already passed syntax checks and been packaged. There were a few sticky points (and still are some). In particular: * Information flow is a little bit awkward when you run jobs from Jenkins on Vagrant VMs. It looks a bit like this: Jenkins master -> Jenkins slave (in my case, the Virtualbox machine) -> Vagrant VM. - since the slave checks out the repository, you need to copy it to the vagrant shared folder root before running any of your build tasks inside the VM - VM RPC is slightly awkward in general (basically all via SSH, as explained in the next step) * Vagrant libraries wrap around Net::SSH::Connection::Session.exec! which means all output is saved up until the end of the command. Not great when you want to watch the output in realtime in the Jenkins console view - operating on the session object directly means you can use the exec call, but need to handle output and exit codes yourself with callbacks, which I''ve done but output is still being sent slightly out of order... weird. * I set out to have tests complete as fast as possible, so I pre-create my VMs and use the next available one for the test runs. Asynchronously they are destroyed and returned to the pool, but it''s not pretty. I guess this is a common problem (startup time of new instances) so I''m sure there are some good solutions. * Passing information between Jenkins jobs is always slightly painful. I was briefly tempted by Go for its pipelining but ultimately put off by its insistence on XML for all config. Right now I''m looking to store information about the module that just passed a certain stage of testing in a file (perhaps YAML format) and archiving it as an artifact, then copying that artifact in the next stage job... but again this seems a bit clunky (and a pain to duplicate to the 20-odd jobs for each stage I currently have). I''m sure there were a few other things that bugged me but I''d mostly like to start up a discussion on any of this stuff with community members who might have dabbled in this kind of stuff (or alternatively, are utter mavens at it). Alternatively I''m happy to share some of what I''ve been doing if it interests anyone who wants to do more testing. Best Regards, Oliver -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.