Next Generation Build System

Desired Features

The aim of the new world order build system is to separate the functionality of the build system frame work and the component related build scripts. This is achieved by having a clear semantics on how the component related scripts will be invoked.

It should have following features –

  1. Easy of use.
  2. Easy of adding new components without modifying the build system code.
  3. Easy of adding new platforms preferable without modifying the build system code.
  4. Building multiple components at the same time if they are independent and follow the dependencies when required.
  5. Log reporting in xml format.
  6. Log the build related information in the database.
  7. Should transfer the required externals for a particular component to the remote build machine. This can even include externals like Java. Flexibility on this feature is debatable.
  8. Build system should be smart enough to handle the operating system signals and should report failure if any of the scripts is killed.
  9. Web interface for component builders to build over the web.

Semantics

The build system functionality is divided into two

  1. Tasks done at the submit machine
  2. Task done at the remote machine

These semantics are shown below. Lines written in "blue" are the functionalities provided by the build system. Lines written in "black" are the "Glue-Scripts" provided by the component builder (user). Glue-Scripts bind the two entities (build system scripts and component related scripts) together. Build system framework expects specific code of conduct from the Glue-Scripts but is not concerned with how they achieve their tasks. Lines in "green" are remarks or more information available to the user.

Submit-side Semantics

Submit side of the build system is mainly concerned with doing the preliminary tasks done before the component build is actually dispatched to remote machines and doing the post build tasks after the component build results arrive back from the remote machine.

User initiates the build by passing the component description file to the build system. This component description file has all the information that the build system requires to successfully build the component. A sample component description file is shown below. It contains the information about the component and where the glue scripts are and what glue script to invoke at a given time. Once this information is parsed by the build system it creates an initial database record for this run and gets a runid. It also creates a buildspace/runspace where the build related information is stored. It creates the required sub-directories based on the platform list. Once the stage is set build system fetches component sources as instructed in the component description file and places them in a known location. It then invokes the pre_all script for the component if declared. Once the general tasks are done build system creates condor submit file for the requested platforms and submits a condor job that runs on the remote machine. Build system also invokes the platform_pre and platform_post scripts if declared at appropriate time to complete tasks related to the component build.

Once the condor job completes (successfully or unsuccessfully) build system invokes the post_all script. It then updates the database with the result status of each task.

Read the component description file
Create an initial database record and get a BuildID
Fetch sources                            ..............

pre_all                                  ..............
for each platform {
    cp common/* <arch>/
    cd <arch>
    platform_pre                         ..............
    submit vanilla job
    update database
    platform_post                        ..............
    update_db
}

post_all                                 ..............
update database
display html


Fetches sources in $Workspace/$BuildID/common
Wakes up in $Workspace/$BuildID/



Wakes up in $Workspace/$BuildID/$platform


Wakes up in $Workspace/$BuildID/$platform


Wakes up in
$Workspace/$BuildID/

 

Note: database updates and retrieval not implemented yet.

Execute-side Semantics (per platform)

Once the condor job (job to build the component on a targeted platform) comes to the execute machine, the very first script to be invoked is the build system wrapper script. After this the user is given a chance to split the build into several tasks of his/her choice in the remote_declare. If the user needs to take any action before declaring the remote tasklist he/she can do it in remote_pre_declare. Similarly if there are any tasks to be executed before the first build task but after the remote_declare, this can be done in remote_pre.

Then for every task declared by the user the build system runs them saves the statistics and results for the task and updates the database. When the component is built and all the tasks are completed user can declare a remote_post script. This essentially serves for the tasks like packaging the component in a particular way which is not a part of the build but is required for component distribution. the build system framework expects that the glue scripts create a single tar file called "results.tar.gz" that contains everything that is to be transferred back to the submit side. Stdout and Stderr are transferred back by default an other user log files created should be included in results.tar.gz by the user.

Component build wrapper
remote_pre_declare                       ..............
remote_declare                           ..............
remote_pre                               ..............
if declare_list is empty {
    insert a special noop task in the tasklist
}
for each task in declare_list {
    remote_task                          ..............
    record task runtime
    save error and output
    save return status
    update_db
}

remote_post                              ..............
send back all results



 












 

Note: database updates and retrieval not implemented yet.

Description of parameters used in the component description file

Parameters Description
description Component description string
project Name of the project
project_release Version of the Project
component Name of the component
component_version Version of the Component
sources List of sources to be fetched
platforms List of platforms to build on
notify Email notification list
priority Priority of the users own jobs relative to each other
... ...

Component Description File Examples

Examples below show the command description files for GsiOpenssh and condor. The scripts used to build the products are also linked from the description file.

Assuming that your description is in componenet.desc file to build the component run -

[$prompt] create_dag.pl --file=component.desc

1. GsiOpenssh

Component description file - GsiOpenssh

description = Gsissh test run for nmi

project = nmi
project_release = 6, 0

component = gsi_openssh
component_version = 3.3

sources = gsissh-builder.nmi, gsissh-compat.ftp, gsissh-setup.ftp, gsissh-src.ftp

remote_declare = remote_declare
remote_task = remote_task
remote_post = remote_post

platforms = i386_rh9

notify = parag@cs.wisc.edu

priority = 1

2. Condor

Component description file - condor

[parag@vger build]$ cat condor.desc
description = nightly condor 6.6.7 test run

project = condor
project_release = 6, 6, 7

component = condor
component_version = 6, 6, 7

sources = condor_V6_6-branch.cvs, condor-builder-R5.cvs

pre_all = pre_all
pre_all_args = foo bar
remote_declare = remote_declare
remote_declare_args = quick
remote_pre = remote_pre
remote_task = remote_task
remote_post = remote_post
post_all = post_all

platforms = i386_rh9, sun4x_58

notify = condor-staff@cs.wisc.edu

priority = 1