| 164 | | |
| | 165 | = Getting the slave to do periodic builds = |
| | 166 | |
| | 167 | To zeroth order only a few steps are needed to convert a |
| | 168 | standard update-build bitten slave into a periodic (daily/weekly) builder. |
| | 169 | |
| | 170 | == Develop/Debug the cron commandline == |
| | 171 | |
| | 172 | Starting point ... interactive trials with : |
| | 173 | {{{ |
| | 174 | SLAVE_OPTS="--single --dry-run" ./dybinst -b singleshot_\\\${revision} -l /dev/stdout trunk slave |
| | 175 | }}} |
| | 176 | |
| | 177 | || '''dybinst''' options || || |
| | 178 | || '''-l /dev/stdout''' || send logging to stdout, for debugging || |
| | 179 | || '''-b singleshot_\\\${revision}''' || option propagated to bitten-slave '''--build-dir''' || |
| | 180 | || || (variables evaluated in build context supplied by the master) || |
| | 181 | |
| | 182 | The '''SLAVE_OPTS''' are incorporated into the bitten-slave commandline, |
| | 183 | * '''--dry-run''' is for debugging only : builds are performed but not reported to the master. |
| | 184 | * '''--single''' perform a single build before exiting |
| | 185 | |
| | 186 | === Issues Forseen === |
| | 187 | |
| | 188 | * may need more escaping '''\\\${revision}''' of the '''build-dir''' |
| | 189 | * the cron command might not get a build to perform within the period (if no qualifying commits), |
| | 190 | * process pile-up will occur ... |
| | 191 | * maybe avoid by exiting if existing slave process ? |
| | 192 | * perhaps add a first '''step''' that checks |
| | 193 | |
| | 194 | * will need some purging to avoid filling the disk with builds |
| | 195 | * could add a build step to do this cleanup |
| | 196 | |
| | 197 | === Understanding how {{{./dybinst trunk slave}}} works === |
| | 198 | |
| | 199 | '''dybinst''' invokes the below which construct and evaluate the bitten-slave commandline to talk to the master and perform builds |
| | 200 | * source:installation/trunk/dybinst/scripts/dybinst-slave |
| | 201 | * source:installation/trunk/dybinst/scripts/slave.sh |
| | 202 | |
| | 203 | === bitten-slave options === |
| | 204 | |
| | 205 | {{{ |
| | 206 | [blyth@belle7 dyb]$ bitten-slave --help |
| | 207 | Usage: bitten-slave [options] url |
| | 208 | |
| | 209 | Options: |
| | 210 | --version show program's version number and exit |
| | 211 | -h, --help show this help message and exit |
| | 212 | --name=NAME name of this slave (defaults to host name) |
| | 213 | -f FILE, --config=FILE |
| | 214 | path to configuration file |
| | 215 | -u USERNAME, --user=USERNAME |
| | 216 | the username to use for authentication |
| | 217 | -p PASSWORD, --password=PASSWORD |
| | 218 | the password to use when authenticating |
| | 219 | |
| | 220 | building: |
| | 221 | -d DIR, --work-dir=DIR |
| | 222 | working directory for builds |
| | 223 | --build-dir=BUILD_DIR |
| | 224 | name pattern for the build dir to use inside the |
| | 225 | working dir ["build_${config}_${build}"] |
| | 226 | -k, --keep-files don't delete files after builds |
| | 227 | -s, --single exit after completing a single build |
| | 228 | -n, --dry-run don't report results back to master |
| | 229 | -i SECONDS, --interval=SECONDS |
| | 230 | time to wait between requesting builds |
| | 231 | |
| | 232 | logging: |
| | 233 | -l FILENAME, --log=FILENAME |
| | 234 | write log messages to FILENAME |
| | 235 | -v, --verbose print as much as possible |
| | 236 | -q, --quiet print as little as possible |
| | 237 | --dump-reports whether report data should be printed |
| | 238 | |
| | 239 | }}} |
| | 240 | |
| | 241 | |