The Build Manager is a tool that can be used to improve performance on IBM Z Systems Development and Test Environment (ZD&T), or whenever Java startup time needs to be reduced. It works by maintaining multiple Java processes to avoid JVM startup when running builds.
For information about installing and configuring the Build Manager, see “Build Manager files” in Installing and configuring.
The Build Manager has the following two components:
The socket server (server), which manages and maintains processes. It manages a queue of requests and a list of JVM and their availability.
The socket client (client), from which you can issue build commands.
It takes you two mandatary and one optional step to use Build Manager:
Image of how to use Build Manager and its workflow
The following examples for using the Build Manager assume that you are using host 127.0.0.1 and port 8080. The actual host and port you use depends on your setup.
You can run the Build Manager server by using any of the following methods:
/usr/lpp/IBM/dbb/lib/server -h
.DBBS.jcl
provided by DBB.startdaemon.sh
script configured earlier in Build Manager files.To issue a command to the server, you must use the client. The client can be accessed by using groovyz
or calling the client directly (/usr/lpp/IBM/dbb/lib/client -h
).
Examples
groovyz -DBB_DAEMON_HOST 127.0.0.1 -DBB_DAEMON_PORT 8080 /u/example/build.groovy
client 127.0.0.1 groovyz /u/example/build.groovy
Note:
DBB_DAEMON_HOST
and DBB_DAEMON_PORT
are both required.-DBB_DAEMON_HOST {your server host} and -DBB_DAEMON_PORT {your daemon port}
under the additional parameters section.The Build Manager is a process coordinator that allows you to use commands to start and stop processes.
For example, if more build slots are needed, you can launch another process with client 127.0.0.1 8080 groovyz start
.
Alternatively, if that process is no longer needed, it can be killed using client 127.0.0.1 8080 groovyz kill
.
If the BuildManager receives an exception from the script it is executing, that process will be restarted.
The Build Manager can have multiple processes, which supports multiple builds. For example, you can build two applications at the same time, or multiple people can run their own builds at the same time.
Only the return codes from System.exit()
calls in the Groovy build script are captured by the Build Manager. In other words, values returned by the Groovy build script using return
are not captured by the Build Manager.