Maestro has been re-scoped

The Maestro project has been re-scoped as a data set for demonstrating and testing ERP and ERP-like applications. The current implementation target for Maestro is OpenERP, and development of a Maestro standalone application based on the Yii PHP framework has been temporarily suspended.

This decision was based on the amount of work still needed to achieve a minimum viable feature set developing from scratch, and  the opportunities that become possible by building on OpenERP. I want to sincerely thank Maestro contributors Serge and Mark for their excellent work, and for helping me better understand the challenges of developing a Maestro application from scratch.

When I come up for air, I’ll post more on my experiences sp far with OpenERP, but I can tell you now I’m excited!

Installing OpenERP 7.0 using BitNami OpenERP 7.0 Stack

Fred Blauer recommended I take a look at OpenERP based on my described use case of PLM, Manufacturing, and Inventory Management.

I have been casually following OpenERP since v4.x (it was called TinyERP then), but had never configured a server – primarily because OpenERP used separate server and client, and I wanted a pure server system. However, I was pleasantly surprised when I took a look at the current OpenERP 7.0. OpenERP is now a pure web application, and BitNami has a free OpenERP Stack, including an Ubuntu-based virtual machine (in VMware format but also supported by VirtualBox). I’ll get the vm running first on my Win7 laptop with VirtualBox, and describe my experiences using OpenERP in a future post.

Create server

  • Download BitNami OpenERP Stack virtual machine (vm) to a Windows machine on my local network.
  • Using VirtualBox, create a new vm with characteristics: Linux/Ubuntu 64b OS with 1.5GB RAM, but do not configure a boot drive. I originally tried the suggested 512MB RAM, but the system was thrashing (as seen by memory use in ‘top’), with very poor performance.
  • Extract the files from the downloaded vm zip file into the directory VirtualBox created for the new vm.
  • Configure the new vm using VirtualBox Manager.
    • Network: Bridged (to have access from other machines in my network).
    • Storage: bitnami-openerp-7.0-3-ubuntu-12.04.vmdk (included in the BitNami vm download and copied to the vm directory).
  • Boot the new vm.

After booting, the console will display the server IP address and other helpful information (the IP address shown will likely differ in your environment):

*** Welcome to the BitNami OpenERP Stack ***
*** Built using Ubuntu 12.04 - Kernel 3.2.0-31-virtual (tty1). ***
*** You can access the application at ***
*** The default username and password is 'user' and 'bitnami'. ***
*** Please refer to for details. ***

*  To access the console, please use user 'bitnami' and password 'bitnami'.  *
*                                                                            *
*                                 WARNING                                    *
*  For security reasons, upon your first login, you will be prompted to      *
*  change the default password.                                              *

linux login:

If you copied the system drive for the vm from one host computer to another, the vm may report “The machine could not configure the network interface” after booting. This will occur if VIrtualBox provides a different Ethernet MAC ID on the second computer than on the first, and Ubunto creates a new Ethernet interface for a new interface MAC ID but is still configured for the interface on the first computer. Got it? “ifconfig -a” shows the Ethernet devices identified during boot, and “dmesg | grep eth” will show the network interface renaming. In this case, edit /etc/network/interfaces to specify the appropriate network interface (e.g. eth1 instead of eth0). See: and

Login to the VirtualBox terminal using the provided username/password (bitnami/bitnami), and set a new password when prompted e.g. appleton (i.e. bitnami/appleton).

Enable ssh login

  • Configure sshd for remote login and scp file transfer.
$ sudo cp /etc/init/ssh.conf.back /etc/init/ssh.conf
$ sudo start ssh


My initial goal was to use pgadmin3 for viewing and managing PostgreSQL databases on the vm from my laptop.

  • Edit postgresql.conf so PostgreSQL will listen on all IP addresses.
$ sudo vi /opt/bitnami/postgresql/data/postgresql.conf
listen_addresses = '*'                  # what IP address(es) to listen on;
  • Restart PostgreSQL. I tried using pg_ctl but it wouldn’t initially run because of missing libraries. I solved this by adding the BitNami common libraries and the PostgreSQL libraries to LD_LIBRARY_PATH in ~/.bashrc (and logged out and back in again).
$ vi ~/.bashrc
# for BitNami Stack PostgreSQL

However, this just led to other problems – the user to run pg_ctl as, whether the unset environment variable PGDATA is an issue, etc. I’m sure this isn’t how BitNami intends this to work (fwiw, /opt/bitnami/ seems to be the intended control point for everything), but

Finally I just rebooted the vm, but pgadmin3 still wouldn’t connect. Perhaps it’s a firewall problem…

However, the PostgreSQL psql cli utility can be used (the password for the bitnami_openerp database is ‘bitnami’):

bitnami@linux:~$ psql bitnami_openerp
psql.bin (9.2.4)
Type "help" for help.

bitnami_openerp=# help
You are using psql, the command-line interface to PostgreSQL.
Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

For more information on psql, see the PostgreSQL psql documentation.

Configure OpenERP

The BitNami OpenERP stack vm includes a database called bitnami_openerp (Administrator username/password: user/bitnami). I’m going to create a new database from scratch and install the basic modules needed to support Maestro workflows.

Access the vm from a workstation browser. The IP address for the vm is shown in the vm terminal window after booting (or after logging out).

  • Create a new database (company). The PostgreSQL master (super-administrator) password is “bitnami”, and I’ll use “appleton” for the new database password. OpenERP will create a new database with an administrative user (username/password: admin/appleton) and a demo user (username/password: demo/demo), and will login to the database as the administrator.

You will likely see a “timezone mismatch” warning in the top bar of the window. This is because the timezone set in your user preferences (which was configured by BitNami when they created the OpenERP stack) is different from the timezone your browser believes you are in (which comes from your workstation). You can access your user preferences by clicking the drop-down menu beside your username in the top bar of the window.

Install the following OpenERP applications using the Modules > Apps menu:

        • MRP (Manufacturing Orders, Bill of Materials, Routing)
        • Project Management (Projects, Tasks)
        • Issue Tracker (Support, Bug Tracker, Helpdesk)
        • Warehouse Management (Inventory, Logistic, Storage)

You will be prompted for your OpenERP user id and password (free to register) to start, and for any required configurations as each application is installed. Applications often have dependency applications, which will be automatically installed.

If you want to experiment with pre-defined demo data, select Manage Databases in the login screen and create a new database selecting “Install Demo Data”. The new database will be configured with a basic set of applications and demo data.

Still to do

Now that I’ve got OpenERP installed, the top items on my To Do list are:

  • Learn how OpenERP works! Create a couple users, import Maestro bills of materials, manufacture some serialized items using un-controlled, batch controlled and serialized raw material, etc.
  • Learn more about host OpenERP and Python web applications in general using WSGI by examining the BitNami OpenERP Stack (/opt/bitnami/apache2/conf/httpd.conf includes a WSGI reference).
  • Install OpenERP on FreeBSD. As of 2014-03-20, there is a binary package available for OpenERP 7.0, but it will still take time to understand how to make it usable.

Related information

For more information on OpenERP, a great reference is the OpenERP Book.


Updated since first posting 2013-07-22.

Northwind on MySQL

The Northwind sample database provided with Microsoft Access is an excellent tutorial schema for managing small business customers, orders, inventory, purchasing, suppliers, shipping, and employees. My problem was that I wanted to experiment with it using MySQL and the Yii Framework.

I found a number of MySQL ports of Northwind on the internet, but none with all 20 tables in the current version, or that included foreign key constraints. The only solution was to make my own.

I’ve put the results on GitHub should anyone else be in similar need:


Fish Creek Provincial Park Videography

Following up on my New Years Day 2014 Bicycling Ride post, my friend Ian reported he was able to find my winter biking video on YouTube directly by searching for “fish creek park calgary”, and then filtering for the most recent upload (at the time, it was at the bottom of the first page – with 14 views!).

Trying the search myself, I was amazed at the variety of fish creek videography being produced – and how many local videographers there are!

Here’s an “Ice Cave” exploration, reminiscent of Gerry Anderson’s Supermarionation.


Watch these snow boats fly east along a frozen Fish Creek towards the Ranch. Amazing that a propeller works in snow!


I don’t think I’ve ever encountered an RC plane flying in FCPP before.


This last one seems inspired by Wayne’s World and Home Improvement.

New Year’s Day 2014 Bicycle Ride

I’ve gone for a bike ride on New Year’s Day for about 5 years now, and this year was no different – except this time I’ve got video to show, my first YouTube video!

Video in 720p format was captured by a Contour Roam2, a really nice HD-quality video Action Camera. Editing and rendering was done using Microsoft’s free Movie Maker 2012, a very satisfactory experience. The transitions and most of the titles were added automatically using a Smart Theme, and the Add music button conveniently linked to free content (legally free!). The edited project was rendered and uploaded to YouTube using the Movie Maker YouTube plugin. After uploading, YouTube suggested video stabilization – which I agreed to.

FWIW, Contour has an interesting back story. They unfortunately closed doors August 2013, and remind me a lot of IVL Technologies, a similar sized tech company I had the pleasure of working  for 1993 to 1997. BloombergBusinessWeek had an interesting post mortem article on Contour , with a few tips for all tech entrepreneurs.

Column Types in Yii Migrations

I can never remember the abstract column types Yii supports, and never seem to get the right search string for google, but I’ll remember my own blog post.

Yii Database Abstract Column Types

Physical types are given in brackets using MySQL syntax.

  • pk: auto-incremental primary key type (“int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY”).
  • string: string type (“varchar(255)”).
  • text: a long string type (“text”).
  • integer: integer type (“int(11)”).
  • boolean: boolean type (“tinyint(1)”).
  • float: float number type (“float”).
  • decimal: decimal number type (“decimal”).
  • datetime: datetime type (“datetime”).
  • timestamp: timestamp type (“timestamp”).
  • time: time type (“time”).
  • date: date type (“date”).
  • binary: binary data type (“blob”).

If the abstract type contains two or more parts separated by spaces (e.g. “string NOT NULL”), then only the first part will be converted, and the rest of the parts will be appended to the conversion result. For example, ‘string NOT NULL’ is converted to ‘varchar(255) NOT NULL’.

I have shamelessly plagiarized this list from the Yii manual. Also see the Yii manual’s excellent article on migrations, and has a nice list of tips.


Calgary Tech Groups

I wrote up a list of tech groups I’m following for a colleague and thought it might be worth sharing.

The local ‘nix groups are CUUG (Calgary Unix Users Group, and Calgary LUG (Linux Users Group, CUUG tends to focus more on server-side topics such as networking and security, whereas CLUG (at least from meeting topics and mailing list conversation) tends to focus more on distros, desktop apps and device interconnectivity.

CAMUG (Calgary Agile Method’s Users Group, They cover a broad spectrum of software topics in their meetings and workshops, with a small-a-agile hook (e.g. developing software in an agile way using Git and GitHub, developing software in an agile way using Ruby…). CAMUG can draw 50-100 people for a popular topic, and their session last night on Appsec with Jim Bird was great!

The ASQ (American Society of Quality). The Calgary chapter ( seems mostly interested in manufacturing quality systems (i.e. enterprise stuff) and meets at night monthly in the NE. The topics have been hit and miss for my interests, but they’ve had excellent topics/speakers when I’ve attended.

The SQDG (Software Quality Discussion Group, meets monthly downtown during lunch, and focuses on software testing practices. They’ve had some good topics, but I haven’t been to a session in over a year now. Again, the topics are hit and miss for my interests but the ones I’ve attended have been excellent with good networking opportunities.

Calgary Protospace ( seem most interested in low-level hardware and firmware hacking, but the system drive failed in a NAS array a few years ago and all the family photos were temporarily unavailable (my wife said I lost them). A unix networking specialist I met through protospace helped me reconstruct the array and save my marriage.

Mobile Mondays ( host a mobile-related hackathon the first Monday night of every month.

Startup Calgary ( is a government/industry coalition I like to follow not only for their own events, but also because they aggregate what everyone else is doing into a nice regular email they send me.

Calgary democamp ( organize DemoCamps periodically for tech entrepreneurs to demo shiny new apps that will change the world <wink>. I’ve only been to one, but it was a packed house and very interesting set of presentations.

There are also a number of Calgary-area tech MeetUp groups, such as the Calgary WordPress MeetUp Group, the Calgary PHP AND NOT PHP Meetup Group, Pixels and Pints, PyYYC (Python) and more. Do some poking around for your interests, and contribute to the success of a community.

Maestro project now on GitHub

Maestro is now on GitHub. See the for an overview of the project (and Getting Started instructions), and the wiki for project documentation. Unfortunately, there’s not much else yet other than the migration file for the schema, which should be stable (at least for a while).

In order, the immediate goals are to:

  • Complete the demo data set and load scripts
  • Auto-generate CRUD MVC code
  • Host a demo system on
  • Complete a basic read-only Part module

After a number of abortive attempts trying to adapt existing projects, this time it feels right – not too hot and not too cold. If you need to know what’s going on in, ask the Maestro!

Installing FreeDOS 1.1 on a T-23 Thinkpad

I recently had need to install DataScope on my T-23 Thinkpad (1.1GHz Pentium Mobile with 1G RAM and a 40G hard drive). DataScope is a serial data protocol analyzer that runs on DOS (and really does need DOS because it’s interacting directly with the PC’s serial ports). I had heard about FreeDOS, but never had a need to check it out before and this seemed a good opportunity (instead of finding my equally old set of MS-DOS 6.22 disks, or even worse, a Win98SE CD).

Although installation went smoothly, I simply could not get the T-23 to boot FreeDOS. I scoured the wiki and web for information, repeated the install over and over looking for a step I’d missed, went through the BIOS setup screen by screen, and googled for why the bootloader might fail.

Almost ready to give up, I recalled having to fully wipe a drive a few years back to remove both primary and backup boot records before FreeBSD would boot from the drive.

I booted the T-23 with LinuxMint 13 XFCE (more recent releases had display issues with the old Savage graphics chipset), and wrote 0’s to the entire drive:

> sudo dd if=/dev/zero of=/dev/sda bs=1M

To see the progress, I peridically sent a kill notice to dd from a second terminal session:

> ps -aux
> sudo kill -USR1 dd-pid

Twenty minutes later, the drive was clean. One more FreeDOS install and success. It’s alive! (or at least boots).

The next step is enabling USB support so I can install DataScope from a USB stick (the floppy drive for the T-23 is long gone, and so are any disks I once had).


P.S. Bill, why, oh why, did you decide MS-DOS file paths should have backslashes? Was it really better for it?

Removing ports no longer needed using portmaster

I replaced Postfix with ssmtp recently, and wanted to check my FreeBSD server for any installed ports that are no longer needed. Thanks to Chris on the FreeBSD mail list, I have added some new portmaster flags to my tookit.

First, you may want verify your ports index by rebuilding it:

# cd /usr/ports
# make index

Next, list the ports installed, grouped by:

  • Root ports (No dependencies, not depended on)
  • Trunk ports (No dependencies, are depended on)
  • Branch ports (Have dependencies, are depended on)
  • Leaf ports (Have dependencies, not depended on)
# portmaster -l

Finally, delete the leaf ports that you know you don’t need on their own:

# portmaster -e portname

Thanks, Chris.