Naming origin
Well, naming things is very hard. Thankfully we have an excellent team at Gentoo capable of naming things - The Infra team. Alec Warner (antarus) was kind enough to decide on the name "tattoo", which came from combining "tatt" (package testing tool used here) and "Gentoo".
Setup
Developer's own machine
- Install the following dependencies:
app-portage/nattkanet-misc/openssh
- Select the directory from which we will work. Always run and set files inside this directory. It can be the source files directory.
- Create a
ssh_configfile using thessh_config.intemplate. Fill your username, select the wanted path for socket on every host, and define the various hosts and theirs hostname. - Add an environment variable (for example into
.bashrc) namedARCHTESTER_BUGZILLA_APIKEYwhich equals to an API key from bugzilla.
Remote machine - machine manager
- Install the following dependencies:
dev-lang/python[sqlite(+)](tested on >=3.9)app-portage/nattka
- Select the directory from which we will work. Always run and set files inside this directory. It can be the source files directory. It must be the same directory as set in the ssh_config directory (by default
~/tattoo)
Remote machine - testing container
- Install the following dependencies:
app-portage/nattkaapp-portage/tatt
- Make sure the working directory of the machine manager is mount bound into the container. The mount destination inside the container would be the working directory for the testing container.
- Create a corresponding
~/.tattfile inside container, for example (IMPORTANT: replace ARCH)arch=arm64 emergeopts="--autounmask --autounmask-continue --autounmask-write" repodir="/var/db/repos/gentoo/" ignoreprefix="elibc_","video_cards_","linguas_","python_targets_","python_single_target_","kdeenablefinal","test","debug","qemu_user_","qemu_softmmu_","libressl","static-libs","systemd","sdjournal","eloginid","doc","ruby_targets_" buildlogdir=/root/logs rdeps=0 usecombis=1
Running and using
Load all remote machines
- Run in selected directory (for example
~/tattoo) the command./manager.py.- Inside this directory a file named
tattoo.socketwill be created. Through this socket all communication will occur. - A SQLite DB named
tattoo.dbwill hold all successes and failures of test runs.
- Inside this directory a file named
- In every container on that machine, run the command
./tester.py -n [NAME] -a [ARCH] -j [JOBS]whereNAMEis just a nice textual name to know which container did what,ARCHis the arch to test, withamd64for stable bugs, and~armfor keyword bugs.JOBSis the maximal concurrent testing jobs.- This command must be ran in the mount bound dir from manager, where the
tattoo.socketis created (so it can communicate).
- This command must be ran in the mount bound dir from manager, where the
- Check that the
managerlogs all containers connecting to it.
Control from developer's own machine
- Connect to remote servers listed in
ssh_configusing./controller.py -c. Various sockets are created inside/tmp/tattoo/directory - Send specific bugs using
./controller.py -b {NUM} {NUM} ...or initiate full scan for open bugs per arch using./controller.py -s - You can use "follower" mode to get live logs from all machines and testers using
./controller.py follower - When bugs are ready, use
./controller.py fetch -nto view all done bugs, but in dry-run mode (no update for bugzilla, and no update last-seen bugs). Btw, the output corresponds to sam'sat-commitscript. - When ready to apply, run
./controller.py fetch -ar -d [REPO]whereREPOis the ::gentoo repo to apply on it the commits. This command also un-CC and closes bugs for what passed. After success, it saves in small file the last seen bugs, so you don't try to reapply them. - From
REPOpush the commits (if you are unlucky,git pull --rebasebefore) - Send, fetch, apply how much you want
- Disconnect from all using
./controller.py -d