Setting up server hosts
Each build server host can have a bldserver.control file, which controls its use for parallel builds. This text file, /var/adm/devops/config/bldserver.control, specifies when, how, and by whom the host can be used as a build server in a parallel build. This file can impose restrictions on who can use the host for parallel builds and when the host can be used for parallel builds. If a build server host has no such file, it accepts all parallel build requests.
During a parallel build, clearmake consults the build hosts file of a user to determine which hosts to use for executing build scripts. Before actually dispatching a build script, clearmake queries the albd_server process on the target build host asking if clearmake can send a build script.
If the build server control file of a host is missing or empty, no restrictions are placed on the use of the machine for parallel builds. The albd_server of the machine always sends a yes response to the clearmake process that controls a parallel build.
If the build server control file of a host is not empty, albd_server examines the load-balancing rules in order:
- If it finds a rule that matches the parameters of the current build, albd_server sends a yes response to the originating clearmake, which then uses a remote shell command to dispatch the build script.
- If no rule in the control file provides a match, albd_server sends a no response; the controlling clearmake proceeds to query another host.
For example, suppose this rule occurs in the control file:
-host jupiter -user *.dvt -time 21:00,07:30
This rule matches any build started on host jupiter between 9 P.M. and 7:30 A.M. by a user whose principal group is dvt.
To set up a build server host that is used for your daytime builds of the team and its overnight builds:
- Create a bldserver.control file. Each line of the
bldserver.control file defines a situation in which it accepts
parallel build requests.
% cat > /var/adm/devops/config/bldserver.control
-time 08:30,19:30 -idle 60
-time 19:30,05:30
-user bldmeister
<CTRL+D>
(1)
(2)
(3)
Line 1 specifies that during the interval between 8:30 A.M. and 7:30 P.M., this host accepts a parallel request when it is at least 60% idle. Line 2 specifies that during the interval between 7:30 P.M. and 5:30 A.M., this host accepts any parallel request, no matter how busy it is. Line 3 specifies that a parallel build request from a clearmake invoked by user bldmeister is always accepted.
- Protect the bldserver.control file to make sure that your access-control
settings cannot be deleted or altered:
% chmod 444 /var/adm/devops/config/bldserver.control
Each of the following specifications is optional. A missing specification implies no restriction. The specifications are logically ANDed to form a test against the parameters of the current build.
-host host-list
Specifies client hosts that are allowed or not allowed to use the current host for builds. host-list is a comma-separated list, and white space is allowed. Each item on the list is a host name, as listed by uname(1). The asterisk (*) is a wildcard that matches all host names. To exclude a host, use the logical NOT operator ( ! ) with any host argument except *.
For example:
- -host !sleepy,!crashy,neon
- (matches host neon, explicitly excludes hosts sleepy and crashy, and implicitly excludes all other hosts)
- -host !grumpy
- (matches any host except grumpy)
- -user user-list
- Specifies users who are allowed or not allowed to use this host for builds. user-list is a comma-separated list, and white space is allowed. Each item on the list specifies a user by name or by number, with a group qualifier or without. For example:
- jones
- A user whose login name is jones.
- jones.dvt
- A user jones, but only if logged in with principal group dvt.
- jones.*
- Equivalent to specifying jones without any group qualifier.
- 566
- A user with user ID 566.
To exclude a user, use the logical NOT operator ( ! ) with any user argument or with the asterisk ( * ). For example:
- -user !george
- (matches all users except george.)
- -user !darren,!jo,susan
- (matches user susan, excludes users darren and jo, and implicitly excludes all other users.)
- -user !*
- (excludes all users)
-idle percentage [ % ]
Allows use of this host only when its idleness is at least percentage, which must be an integer between 0 and 100, inclusive. Idleness is negatively correlated with the load factor of a host, as shown by uptime(1); the approximate correspondence in Load.