04 Aug 2014
Puppet is done and I'm moving to Ansible
Last time, when I wrote about my status, I was a little disappointed with Puppet and Ruby. I just couldn’t get them to do what I wanted from them. Two new languages, two new challanges. But time was on my side, and step by step I managed to finish my project :-)
The development of my Puppet module reached its target, and it’s ready for use. There will be some modifications (simplifying the configuration syntax), but they will be backward compatible.
You can generate syslog-ng sources, destinations, templates, etc. with this module. After I solved a relative require issue, the Travis builds are in nice green colors. The problem was, I couldn’t use my own Ruby library placed next to a Puppet custom function below 1.9.2 Ruby version. The require ’./mylib’ syntax didn’t work at all, so I had to use a bit uglier, but working solution [1].
I gave up a separate develop branch and changed to a master branch with pull requests. On my machine it was simple to just commit to the develop branch, then rebase master onto it, but it had some drawbacks. First of all, I cannot run spec tests and build module packages on the same machine. This caused a lot of small commits (the spec tests succeded, but IRL the module didn’t work) and an ugly git history. Then I created a local git repo (git clone –bare) and rebased my changes into one commit. That sounds good, but GitHub offers a nicer model. The syslog-ng project uses a master branch, and the contributors can make pull requests against that. The cool thing is, with each pull request Travis runs the tests against the merged code and evaluates the results. No more “build failed” on the master branch and the git history is clean, that’s enough for me.
I got used to Ruby, I might even say I’ve grown like it. It’s a great language and its block thing is awesome. But there are some weird stuff I can’t get used to with my Python history.
I also created a Dockerfile, which prepares a development environment which can be used with my module. I hope it will help people get in touch more easily with this project. It’s possible to run the spec tests and build a package, too :)
Last, but not least the documentation is also ready to be read and used. You can find the source code here [2]. The next challenge is Ansible, on which I have already started to work.
Till next time,
Tibor Benke
at 00:00