Porting Puppet to Windows

In the course of the PuppetCamp Europe, I met with many people I only knew from IRC and email and it was a great time with interesting and inspiring discussions. Today I want to write about the work I’m currently commisioned for by puppetlabs, porting puppet to Microsoft Windows.

Current Status

After disabling some minor pieces (color, conf file watching) and fixing a few bugs (see the tree on github) and a little bit hacking various parts to pass through paths with a drive letter, I was able to create the first file on windows with puppet. On the downside a few technical problems with the code surfaced, the most daunting were approximately 600 spec failures (out of 8.500 examples).

The Plan

Markus Roberts and myself used some of the breaks and sessions to hash out solutions for the various hurdles that I identified. After fixing those, we can move on to pushing the actual basic Microsoft Windows support to master without breaking hell loose and start implementing providers on a larger scale, while people have something in hand to start playing with.

Unit Testing

This one was easy. Most of the test failures are caused by examples that use Puppet::Type.type(:file) when they need a type to test the “other” functionality they’re testing. This legacy is a result of bad experiences with examples that did not fail after removing the “tested” code, because they were stubbing away too much. As a next step in the evolution of such examples, puppetlabs will create an simple, instrumentable type specifically to be used in tests. That way it’ll be a “real” type for the examples, without any of the complex functionality needs of “real” types.

File is lacking providers

In my git tree is already a start of a POSIX and a Microsoft Windows provider for file handling. This is currently only a spike implementation and will have to be seriously expanded once the unit tests don’t blow up when touching this area.

Moving to multi-valued titles

I’ve started a discussion about the design of multi-valued titles on the puppet-dev mailing list. This should make implementing the various path syntaxes much more convenient and easier to handle in the file type. Markus promised me a prototype to play with.

Providing actual functionality

There was discussion at the puppetcamp whether or not to use the command line tools from the resource kit to manipulate users, groups, services and what-not. While I have not looked deeply into this, as my focus until now was getting puppet to run at all, I believe those tools will be a good source of what should be possible, but no good for implementing the providers. One, the tools are another external dependency, they have localized output which will make parsing them very hard, and the output can differ from one release to the next. On the other hand, MRI has quite flexible ways to access the underlying C APIs of Microsoft Windows and those functions are documented and should be quite stable.

dasZ.at

dasZ.at - the people behind ZBox.
dasZ.at Logo

Downloads

The lateset download will be available here - soon

Lastet blog

In our blog we talk about the latest developments around our tool ZBox.
>> Blog

Latest blog entries
>> Reference project: Implementing WordPress-based Website

Based on the reference design provided by Sabine herself, we implemented the zartbitter Website. The site is powered by the PHP-based WordPress blog and CMS engine, some additional plugins and a bit of yarn to hold it all together.


>> Setting a permanent search_path, the Right Way

Others recommend setting the search_path in the postgresql.conf. Current versions of PostgreSQL can set the search_path permanently on a per-database basis without having to touch system configuration files


>> Porting Puppet to Windows

In the course of the PuppetCamp Europe, I met with many people I only knew from IRC and email and it was a great time with interesting and inspiring discussions.

Today I want to write about the work I’m currently commisioned for by puppetlabs, porting puppet to Microsoft Windows.


>> Puppetcamp Europe 2010

I’m going to Puppetcamp Europe 2010!


>> Using gendarme with Code Contracts from .NET 4.0

When using gendarme on post-processed assemblies with code contracts and /throwonfailure set, a few things have to be ignored. Put the following lines into your ignore file (for example gendarmeignore.txt) and use it with –ignore on the command line.


>> Microsoft cannot decode Base64: News at 11!

Arthur has found a really nasty bug in Microsoft’s streaming Base64 decoder as used in the WCF: Connect Bug#541494


>> Kolab Connector binaries uploaded

Arthur moved on with programming and testing. Now we uploaded the first packages, which now contain the basic calendar and contacts synchronisation. The plugins already are able to synchronize our personal data.


>> Kolab Sync for Android and Outlook: Developer Preview

We are proud to announce the first developer preview for Kolab sync clients for both Android and Outlook. Both are licensed under the GPLv3.


>> Visual Studio 2008 Debugger

I didn’t know that: the VS2008 debugger has many bugs. Specifically, if you have a solution with multiple websites, debugging doesn’t work!

Symptom: Upon reaching a breakpoint, StepOver/Into do not work, but resume execution. This makes the debugger pretty pointless.


>> Building a simple MSBuild Task

On the “Using Studio’s “Custom Tool” in MSBuild” question, I was prompted to share the code. Here is a stripped down skeleton where I removed the actual calls to the custom tool. Since it is open source I didn’t really need to access the Visual Studio’s registry keys.