User:Arthurzam/tattoo 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ː
- Host (main OS) is systemd based
- 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
(armv7a_hardfp) | |
arm64
|
arm64-stable
| ||
jiji.arm.dev.gentoo.org | arm
|
arm32-stable
(armv7a_hardfp) | |
arm64
|
arm64-stable
| ||
timberdoodle.ppc64.dev.gentoo.org | ppc
|
ppc32-stable
| |
ppc64
|
ppc64-stable
| ||
hokumpoke.ppc64.dev.gentoo.org | ppc
|
ppc32-stable
| |
bogsucker.ppc64.dev.gentoo.org | ppc64le
|
ppc64-stable
| |
catbus.sparc.dev.gentoo.org | sparc
|
arthurzam-sparc64-stable
| |
muta.hppa.dev.gentoo.org | hppa
|
hppa-stable
| |
lgentoo3.s390.dev.gentoo.org | s390
|
s390-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 themanager
and socket - The containers have
tattoo.service
which starts the configuredtester
- 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
Sadly the setup on openrc is quite bad (since I'm bad at openrc). It uses a weird combination of openrc service, bubblewrap container, and logs. This is relevant only for devbox.amd64.dev.gentoo.org
I've setup a nice command called tattoo-connect
. To get it, please change your user to mine (permission granted from me) using sudo -u arthurzam -s
.
To connect to a container named arch-stable
, use the commandː tattoo-connect arch-stable
.
The active containers on this devbox are: amd64-stable
, x86-stable
, and x86-testing
.