Part 6: Getting Loaded

In my role here at TAF, I lack the authority to dictate how the developers should work. Of course, it wouldn’t be effective anyway. Instead, I chose to make it easier for them to work the way I wanted them to by providing freshly built images daily with all current code and the various tools they needed to do their work. In addition, I wanted to package daily to provide them with quick feedback on problems, and the opportunity to perform integration testing as soon as possible. This didn’t mean they would actually take advantage of any of this, but I felt it was important to remove barriers to desired behavior.

Today, let’s start looking at how you can take advange of the ‘abt.cnf’ that we introduced the other day, along with the map ‘Abt Startup Support’ to do these things as well. I’ll warn you in advance that I’m a command line fanatic. It’s up to you to try to figure out how you might adapt this information to Windows shortcuts – don’t even ask me about it!

My initial approach to build automation was to create Smalltalk scripts that would do the necessary work. This led to the ‘-e’, or execute, command line option:

abt -e

I think everyone who’s undertaken an automation project has implemented a variant of this. While the approach is fine up to a point, it doesn’t scale well, since, from a DRY perspective, it’s more of a swamp. I was faced with producing a number of images, and they had to be produced on different platforms. I really wanted to minimize the amount of code I needed to manage but using this approach would require a script for every image. There’s also some interesting coding challenges because the script is executed as part of the image start up procedure.

Tackling the simplest problem first, I decided to automate creation of development images. This gave rise to the ‘-c’ config map option:

abt -c "z.VA Base"

which will load the latest version or edition of the named config map, and save the resulting image as ‘abtDev.icx’. The image owner is reset, so anyone using the image will immediately be prompted to set the owner.

Of course, one might want a little more control over what is loaded, so I added the -t parameter to specify whether the latest edition, version or any available version or edition should be loaded ( -t {e|v|a} ). For example, the equivalent of the initial load in abt.cnf, which loads the latest version, would be:

abt -c "Abt Image Startup" -t v

I also wanted to control the name of the resulting image file, so I added the ‘-n’ parameter, where the argument is the name to be used to save the image. So, you might end up with:

abt -c "Abt Image Startup" -t v -n abtDev.icx

I added the ‘-f’ parameter to provide a file that would hold the information that would normally be logged to the transcript:

abt -c "Abt Image Startup" -t v -n abtDev.icx -f loading.log

Creating packaged images turns out to be a fairly complicated process, especially where 😄 images are concerned. Stay tuned…


3 Responses to “Part 6: Getting Loaded”

  1. 1 Marten Feldtmann 2011-09-28 at 06:43

    Just some remarks and typos (just in case someone tries this out):

    It must be: abt -c “z.VA: Base” and not: abt -c ‘z.VA: Base’ (Windows will otherwise create two parameters)

    abt -c ‘Abt Image Startup’ -t v -n abtDev.icx -f loading.log

    always results in an error, due to two problems:

    via -f a file logger instance is created and due to this instance “Abt Image Startup” can not be removed.

    -n creates an error – it should be: -n (no space !).


    • 2 Tom Koschate 2011-09-28 at 08:12

      Thanks for pointing these out. I’ll check them and make the necessary corrections.


    • 3 Tom Koschate 2011-09-29 at 12:44

      Marten, I’ve updated the post to use double quotes in the examples. The single quotes were actually fine in Unix or in Cygwin running on Windows, but I’m willing to accommodate those running weaker environments. :{)

      I have a fix for the unloading problem which I’ll make available tonight. I’m not seeing the problem with -n, but I may have fixed that in a local release.

      If you have other changes, I’d love to see about incorporating them.


      Freundliche Gruesse aus Kanada!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: