User:Arthurzam/tattoo setup

From Gentoo Wiki
Jump to:navigation Jump to:search

Full shared systemd setup

This is a setup which is the easiest to use and maintain, as most of things are compressed to simple commands and sockets.

This setup requiresː

  1. Host (main OS) is systemd based
  2. Containers for testing are systemd based

Ready devboxes wih this setup

Reminderː to connect to a container named arch-stable, use the commandː

user $sudo machinectl shell arch-stable
Devbox Hostname Periodic auto scan Arch Container names
kamaji.arm.dev.gentoo.org arm arm32-stable

arm32-testing

(armv7a_hardfp)

arm64 arm64-stable

arm64-testing

timberdoodle.ppc64.dev.gentoo.org ppc ppc32-stable

ppc32-testing

ppc64 ppc64-stable

ppc64-testing

muta.hppa.dev.gentoo.org hppa hppa-stable

hppa-testing

Summary of setup

  • Containers are located inside /var/lib/machines (can contain symbolic links to other directory in case not enough space is given there).
  • Configuration for each container is located at /etc/systemd/nspawn/
  • tattoo's source (git repo) is cloned at /srv/tattoo
  • The host has tattoo.service which starts the manager and socket
  • The containers have tattoo.service which starts the configured tester
  • Helper script /usr/local/bin/tattoo-start is created for easy "booting" of tattoo

For a longer version of setup, with explanation of how to set it up, read at tattoo's systemd readme

Usage for an Arch Tester

Give access to new arch-tester, so he can use this easily with socket from his homedirː

user $ln -s /srv/tattoo ~/tattoo

Starting

Start the whole tattoo system using single command. You can run it as non-root, it uses sudo internally. Also, in case it already runs, it won't create a new instance.

user $tattoo-start

Start only the manager (without testers)ː

user $sudo systemctl start tattoo.service

Start single tester (after a running manager) on container named arch-stableː

user $sudo systemctl -M arch-stable start tattoo.service

Restart single tester on container named arch-stable (for example in case a lot of zombie processes haven't been cleaned, or some jobs were stuck)ː

user $sudo systemctl -M arch-stable restart tattoo.service

Stopping

Stop single tester on on container named arch-stableː

user $sudo systemctl -M arch-stable stop tattoo.service

Stop manager, which will also stop all connected testers (as their manager died)ː

user $sudo systemctl stop tattoo.service

Viewing logs

There are multiple types of logs, which are located at different placesː

  • manager's logs, located at host's journal, view usingː
user $sudo journalctl -f -u tattoo.service
  • tester called arch-stable logs, located at container's journal, view using
user $sudo journalctl -M arch-stable -f -u tattoo.service