Back to documentaton overview

Using the buildmanager application build coordinator

Introduction

The buildmanager application build coordinator is a flexible, configurable, tool which lets you build software on multiple systems simultaneouosly, in an organized and consistent fashion. It allows you to set up standardized build sequences and actions which will be performed automatically, stop if/when things go wrong, and allows interaction with various build systems to correct problems. It is implemented in expectk, which combines the expect package for working with interactive programs with the Tk windowing toolkit and the Tcl scripting langauge. Any system you can telnet to and run commands on can be used as a build system with buildmanager.

Starting buildmanager

At Fermilab, buildmanager is provided as a ups product, so before you can use it, you need to issue the command setup buildmanager to set the appropriate environment variables, etc. Since buildmanager uses the X Window system for displays, you need to be sitting at an X window terminal when you start it. Once these prerequisites are set, you can invoke buildmanager simply by saying buildmanager at your shell prompt.

Initial screens

Two buildmanager windows should appear on your X Window display; a login window:
partial screen image
and an interaction window:
partial screen image

The login window has an entry area for your login and password on the build systems, and a button labeled Dismiss. If you were to press return in the password entry field, or the Dismiss button, buildmanager will proceed to log into systems marked as selected in the interaction window. For now, let's examine the interaction window first.

The interaction window initially has three sections. From top to bottom they are:

The pressed-in buttons in the selected-system area show the operating system names of the various systems that buildmanger currently knows about, and each has a checkbutton to the left of the name that shows whether we are currently selecting that system to be included. You can click these buttons to toggle the selection on and off.

Logging in

After filling in a login and password in the login window, if you press the Dismiss button, (or the Return key in the password entry box), buildmanager will remove the login window and proceed to telnet to and log into each of the currently selected systems.

A text area will appear for each system, with some status labels and a window-sizing button to the left of each one.
partial screen image
In these text areas, you can watch buildmanager log into each system. If your login or password is incorrect for some system, buildmanager will re-prompt you for that system's login information with the login window.

Buildmanger will make a few passes over each login session, running a few startup commands and setting a few shell functions so that it can interact with the windows in a consistent fashion.

During the login procedure, most of the buttons and windows on the buildmanager screen will grey-out and become inactive, untill the login has completed.

Running Commands

You can run commands via several methods, this section will cover them.
  • Entering commands in the text box next to the Command: label and pressing Enter or Return on your keyboard will make buildmanager "take turns" running the command on each host, waiting for a prompt to appear on each host before running the command on the next one.
  • Entering commands in the text box next to the Command: label and pressing Enter on your keyboards numeric keypad will make buildmanager run the command on each host all at the same time.
  • Selecting a command from the Commands menu will execute the command on each host; whether it takes turns or not depends on the configuration.
  • Selecting the terminal window for a given host and typing a command in that window will also run commands, or let you answer questions from programs, etc.

    Adding and Removing systems

    You can then add and delete listed build machines by clicking on their platform buttons in the main window, or clicking again to delete, and then pressing the [Update] button to have them actually logged in  and/or logged out as needed.  You can add or delete systems from the list of buttons by pulling down the Edit menu, choosing Host List,  and editing the text list in the pop up window shown below:

    You can also destroy a host's window by exiting from that login session when typing in the terminal window.

    Building Software

    See Integrating build_manager, cvs, and upd for examples of using buildmanager to build products.

    Sending commands to some windows and not others

    You can send commands to individual windows by clicking on the terminal window for that host to select it, and then typing. You can control which windows get sent commands from the Command menu and the Command: entry box by selecting (green) and unselecting (background) the checkbox labeled Cmd. Only windows whose Cmd checkbox is green get sent commands from those sources.

    Logging sessions to a file

    While you can cut and paste large amounts of text from the buildmanager windows into an editor, etc. you can also check the Log checkbutton next to a given terminal window, which will start writing a log file named hostname.log for the terminal window for hostname until you un-check the box. This file will be created in whatever directory you were in when you started buildmanager.