Monday, August 9, 2010

The Joys of MeidaWiki and VMware

Wikis are a useful tool. At my current position, I added a lot of technical documentation to the Wiki included in Trac. I wanted a wiki for my personal use.

I program in a variety of languages including C# and Java. Most of my recent work is in C#. I looked for a Wiki in C#. I found two.

  1. FlexWiki
  2. MiniWiki

I know there are others. Unfortunately, FlexWiki is abandoned. The source code is available. MiniWiki is just that a minimal Wiki. MiniWiki is interesting because it uses the ASP.Net MVC (version 1).

Both include unit tests. I am a bit of a fanatic about unit tests. In Working Effectively with Legacy Code Michael Feathers wrote, "Code without tests is bad code. It doesn't matter how well written it is; it doesn't matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don't know if our code is getting better or worse."

MiniWiki uses Moq. FlexWiki uses NUnit. Interesting neither include any logging framework.

What I would like to do, if I ever find the time, is take the Wiki engine from FlexWiki and marry it with the MVC framework using MiniWiki as a start. That is a good long-term project.

In the short term, I need a personal wiki. The solution is MediaWiki and VMware. rPath created a MediaWiki appliance

With the appliance I was up and running in minutes.

Last thing to do was to modify the .vmx file in the appliance to use a static MAC address. Comment out the following lines.

ethernet0.addressType = "generated"
ethernet0.generatedAddress = "00:0c:29:43:85:c8"
ethernet0.generatedAddressOffset = "0"

Then add something like the following.

ethernet0.addressType = "static"
ethernet0.address = "00:50:56:00:00:04"

The MAC address you select depends on your network. I want a static MAC address to allow my Netgear router to assign the IP address. This gives the VM a fixed IP address inside my firewall.

No comments: