Skip to content

Commit 9a7b0ff

Browse files
committed
Improve documentation
1 parent 3501076 commit 9a7b0ff

File tree

8 files changed

+167
-129
lines changed

8 files changed

+167
-129
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ in progress
1010
Now, it gets 4 VCPUs and 4096 MB RAM.
1111
- Improve platform guards and naming things
1212
- Improve central command invocation function
13+
- Improve documentation
1314

1415

1516
2022-05-20 0.2.0

README.rst

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Racker
4040
:target: https://pypi.org/project/racker/
4141
:alt: License
4242

43-
.. image:: https://img.shields.io/pypi/dm/racker.svg?label=PyPI%20downloads
43+
.. image:: https://pepy.tech/badge/racker/month
4444
:target: https://pypi.org/project/racker/
45-
:alt: PyPI downloads
45+
:alt: PyPI downloads / month
4646

4747

4848
----
@@ -52,44 +52,61 @@ Racker
5252
About
5353
*****
5454

55-
An experimental harness tool based on `systemd`_ and `systemd-nspawn`_, to run
56-
`operating system containers <OS containers_>`_, in the spirit of addressing some details of
57-
`Docker Considered Harmful`_ and `Systemd vs. Docker`_.
5855

59-
At the same time, it is a tribute to the authors and contributors of GNU, Linux,
60-
systemd, Python, VirtualBox, Vagrant, Docker, and more.
56+
At a glance
57+
===========
6158

62-
Most people running Linux probably want to use `Podman`_ these days. For more
63-
background, enjoy reading `Container wars`_ and `Container Tools Guide`_.
59+
Racker is an experimental harness tool for provisioning and running operating
60+
system containers.
6461

65-
Racker is ...
66-
=============
62+
For launching Linux operating systems, it is based on `systemd`_ and
63+
`systemd-nspawn`_, to run `operating system containers <OS containers_>`_,
64+
in the spirit of addressing some details of `Docker Considered Harmful`_ and
65+
`Systemd vs. Docker`_.
6766

68-
- A runtime harness for testing software packages and similar purposes, in
67+
68+
Details
69+
=======
70+
71+
With Racker, you can ...
72+
73+
- Launch an interactive command prompt within a Linux environment or invoke
74+
programs non-interactively.
75+
76+
- Use the runtime harness for testing software packages and similar purposes, in
6977
different environments, mostly run headless and non-interactively.
7078

79+
Racker is ...
80+
7181
- A lightweight wrapper around ``systemd-nspawn`` to provide and launch
7282
container environments for/with ``systemd``.
7383

7484
- A lightweight wrapper around ``vagrant`` to provide convenient access to all
7585
things needing a full VM, like running Windows on Linux or macOS.
7686

87+
- A tribute to the authors and contributors of GNU, Linux, systemd, Python,
88+
VirtualBox, Vagrant, Docker, Windows, Windows Docker Machine and countless
89+
others.
90+
7791

7892
Comparison with similar tools
7993
=============================
8094

81-
The aims of Racker are very similar to `Distrobox`_ and `Toolbox`_. However,
82-
there are also some differences.
95+
The aims of Racker are very similar to `Docker`_, `Podman`_, `Distrobox`_ and
96+
`Toolbox`_. However, there are also some differences.
8397

84-
- Racker is currently based on `systemd-nspawn`_ instead of `Docker`_ or
85-
`Podman`_.
86-
- Racker can invoke any kind of container payload, but strongly focuses on
87-
running `OS containers`_ aka. `OS-level virtualization`_, using `systemd`_
88-
as init process.
89-
- Racker aims to provide concise usability by folding its usage into a single
90-
command.
98+
Most people running Linux probably want to use `Podman`_ these days. For more
99+
background, enjoy reading `Container wars`_ and `Container Tools Guide`_.
100+
101+
- Racker is currently based on `systemd-nspawn`_ and `Vagrant`_ instead of
102+
`Docker`_ or `Podman`_.
103+
- Racker's focus is to provide easy provisioning and launching `OS containers`_
104+
aka. `OS-level virtualization`_, using `systemd`_ as init process.
91105
- The acquisition and provisioning of operating system images does not need any
92106
special preparation steps, those are handled by Racker on the fly.
107+
- Racker aims to provide concise usability by folding its usage into a single
108+
command.
109+
- Racker is written in Python instead of Golang or Bash.
93110

94111
See also `Comparison with similar tools - more details`_.
95112

@@ -398,6 +415,7 @@ Troubleshooting
398415

399416
.. _autopkgtest: https://www.freedesktop.org/wiki/Software/systemd/autopkgtest/
400417
.. _Changing Roots: http://0pointer.de/blog/projects/changing-roots.html
418+
.. _Chocolatey: https://chocolatey.org/
401419
.. _Comparison with similar tools - more details: https://github.com/cicerops/racker/blob/main/doc/comparison.rst
402420
.. _Container Tools Guide: https://github.com/containers/buildah/tree/main/docs/containertools
403421
.. _Container wars: https://github.com/cicerops/racker/blob/main/doc/research/container-wars.rst
@@ -421,6 +439,8 @@ Troubleshooting
421439
.. _Systemd vs. Docker: https://lwn.net/Articles/676831/
422440
.. _Toolbox: https://containertoolbx.org/
423441
.. _umoci: https://github.com/opencontainers/umoci
442+
.. _Vagrant: https://www.vagrantup.com/
443+
.. _Windows Docker Machine: https://github.com/StefanScherer/windows-docker-machine
424444

425445
.. _Containers without a Container Manager, with systemd: https://invidious.fdn.fr/watch?v=sqhojVPr7xM
426446
.. _Lennart Poettering und Kay Sievers über Systemd: https://invidious.fdn.fr/watch?v=6Q_iTG6_EF4

doc/backlog.rst

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,54 @@ Racker backlog
77
Those are just random notes about ideas and more.
88

99

10-
***********
11-
Iteration 2
12-
***********
13-
14-
- [x] Check if software tests can be invoked on CI/GHA.
15-
- [x] Improve software tests.
16-
- [x] Split functionality between ``racker`` and ``postroj``.
17-
18-
- ``racker {run,ps,pull,logs}``
19-
- ``postroj {list-images,pkgprobe,selftest}``
20-
- ``pronto opensuse/tumbleweed hostnamectl`` (``pronto.hexagon`` (hx), ``pronto.kaxon`` (kx))
21-
22-
- [x] Continue renaming to ``racker``.
23-
- [x] Improve error messages, see "Compatibility" section
24-
Compare with ``docker run --rm -it debian:bullseye-slim foo``.
25-
26-
- ``racker run -it --rm debian-stretch hostnamectl``
27-
- ``racker run -it --rm debian-stretch /bin/hostnamectl``
28-
- ``racker run -it --rm debian-stretch /usr/bin/hostnamectl``
29-
30-
- [x] Provide more advanced and generic image (label) resolution.
31-
From docker.io, ghcr.io, registry.access.redhat.com, etc.
32-
- [x] Improve documentation
33-
- [x] Is it possible to run RHEL and SLES?
34-
35-
- registry.access.redhat.com/rhel7/rhel
36-
- registry.suse.com/bci/bci-base
37-
- https://registry.suse.com/
38-
39-
4010
***********
4111
Iteration 3
4212
***********
4313

14+
- [o] Support for Windows. ``windows/nanoserver:1809`` and ``windows/servercore:ltsc2019``.
15+
- [o] Support for Windows 11 and Windows Server 2022
16+
17+
- https://github.com/StefanScherer/packer-windows
18+
- https://app.vagrantup.com/StefanScherer/boxes/windows_2022
19+
- ``mcr.microsoft.com/windows/servercore:ltsc2022-amd64``
20+
- [o] Provide curated image types per ``os://`` or ``vagrant://``.
4421
- [o] Tests: Wait for container to properly shut down before moving on.
4522

4623
- Q: When running ``postroj selftest``, why is there more output from
4724
containers shutting down, while the program is finished already?
4825
- Q: Why are the tests failing when trying to subsequently spin up / tear down
4926
the same container?
27+
- [o] Use/integrate with ``mkosi``.
28+
29+
- https://github.com/systemd/mkosi
30+
- http://0pointer.net/blog/mkosi-a-tool-for-generating-os-images.html
31+
- https://lwn.net/Articles/726655/
32+
- https://github.com/asiffer/netspot/search?q=mkosi
33+
34+
35+
*************
36+
Iteration 3.5
37+
*************
38+
39+
- [o] Windows support leftovers
40+
41+
- --cpus=8 --memory=8192M
42+
- https://github.com/docker/machine/issues/531#issuecomment-73938730
43+
- --mount type=git,src=https://github.com/crate/crate,dst=C:/src
44+
- --repository=https://github.com/crate/crate
45+
- https://github.com/StefanScherer/packer-windows
46+
- Make piping from STDIN possible
47+
- Display machine resources (VCPUs, memory) before starting the command/job.
5048

5149
- [o] Address issues in ``bugs.rst``
50+
- [o] When using ``apt-get``, use ``DEBIAN_FRONTEND=noninteractive``
5251

5352
- [o] Invoke arbitrary Docker containers, even when they don't contain an OS root directory.
5453

5554
- Directory ``/var/lib/postroj/archive/hello-world.img/rootfs`` doesn't look like an OS root directory (os-release file is missing). Refusing.
5655
- Directory ``/var/lib/postroj/archive/hello-world.img/rootfs`` doesn't look like it has an OS root directory. Refusing.
5756
- ``unshare --fork --pid --mount-proc --root=/var/lib/postroj/images/hello-world ./hello``
5857

59-
- [o] Use/integrate with ``mkosi``.
60-
61-
- https://github.com/systemd/mkosi
62-
- http://0pointer.net/blog/mkosi-a-tool-for-generating-os-images.html
63-
- https://lwn.net/Articles/726655/
64-
- https://github.com/asiffer/netspot/search?q=mkosi
65-
6658
- [o] Improve timeout behaviors across the board,
6759
using ``with stopit.ThreadingTimeout(timeout) as to_ctx_mgr``.
6860
- [o] Tests: ``racker pull foo``. Also remove ``/var/lib/postroj/archive/foo`` again.
@@ -71,6 +63,9 @@ Iteration 3
7163
- [o] ``racker --verbose run -it --rm https://cloud-images.ubuntu.com/minimal/daily/focal/current/focal-minimal-cloudimg-amd64-root.tar.xz /bin/bash``
7264
- [o] TODO: Introduce appropriate exception classes.
7365
- [o] Maybe use ``ubi8/ubi-init`` instead of ``ubi8/ubi``?
66+
- [o] How to integrate with other tools from https://github.com/topics/systemd-nspawn
67+
- [o] https://github.com/NixOS/nixops
68+
7469

7570

7671
***********

doc/bugs.rst

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,84 @@ See::
2626
stdout/stderr redirection
2727
=========================
2828
Most probably, since c5266940/a721345, the progress bar of ``skopeo`` isn't displayed anymore.
29+
30+
31+
VirtualBox on macOS with nested virtualization
32+
==============================================
33+
::
34+
35+
==> 2019-box: Booting VM...
36+
There was an error while executing `VBoxManage`, a CLI used by Vagrant
37+
for controlling VirtualBox. The command and stderr is shown below.
38+
39+
Command: ["startvm", "5f422042-d72f-46c5-9bcf-ec27eeee2e06", "--type", "headless"]
40+
41+
Stderr: VBoxManage: error: Cannot enable nested VT-x/AMD-V without nested-paging and unrestricted guest execution!
42+
VBoxManage: error: (VERR_CPUM_INVALID_HWVIRT_CONFIG)
43+
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
44+
2022-06-07 15:58:59,573 [racker.cli ] CRITICAL: Launching container failed. Command 'vagrant up --provider=virtualbox 2019-box' returned non-zero exit status 1.
45+
46+
47+
48+
Using the CrateDB RPM package on openSUSE
49+
=========================================
50+
51+
| A: Workaround applied by running ``rpm --install --nodeps``.
52+
| TODO: Maybe adjust the RPM dependencies?
53+
54+
::
55+
56+
zypper --non-interactive install crate-4.7.2-1.x86_64.rpm
57+
Loading repository data...
58+
Reading installed packages...
59+
Resolving package dependencies...
60+
61+
Problem: nothing provides 'systemd-units' needed by the to be installed crate-4.7.2-1.x86_64
62+
Solution 1: do not install crate-4.7.2-1.x86_64
63+
Solution 2: break crate-4.7.2-1.x86_64 by ignoring some of its dependencies
64+
65+
Choose from above solutions by number or cancel [1/2/c/d/?] (c): c
66+
67+
::
68+
69+
rpm -i crate-4.7.2-1.x86_64.rpm
70+
warning: crate-4.7.2-1.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 06f6eaeb: NOKEY
71+
error: Failed dependencies:
72+
shadow-utils is needed by crate-4.7.2-1.x86_64
73+
systemd-units is needed by crate-4.7.2-1.x86_64
74+
75+
76+
Spawning a container from the CrateDB Docker image
77+
==================================================
78+
79+
Currently, as of 2022-06, the CrateDB Docker image is based on CentOS 7, which
80+
has a systemd installation that is too old for being able to invoke nested
81+
systemd environments.
82+
83+
::
84+
85+
racker run -it --rm crate/crate:nightly bash
86+
87+
::
88+
89+
Failed to start transient service unit: Cannot set property AddRef, or unknown property.
90+
91+
=> systemd too old.
92+
93+
94+
Docker context on Windows VM not reachable
95+
==========================================
96+
97+
https://github.com/docker/machine/issues/531
98+
99+
::
100+
101+
$ docker --context=2019-box ps
102+
error during connect: Get "https://192.168.59.90:2376/v1.24/containers/json": x509: certificate is valid for 169.254.232.221, 172.30.112.1, 10.0.2.15, 127.0.0.1, not 192.168.59.90
103+
104+
$ docker --context=2019-box ps
105+
error during connect: Get "https://192.168.59.90:2376/v1.24/containers/json": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "Docker TLS Root")
106+
107+
Solution::
108+
109+
docker context rm 2019-box

doc/comparison.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ invoking `systemd-nspawn`_ without using the ``--boot`` option.
6363
Notes
6464
*****
6565

66-
There is also `Boombox`_, `CoreOS toolbox`_, `microos-toolbox`_ and `tlbx`_.
66+
There is also `Boombox`_, `CoreOS toolbox`_, `docker-coreos-toolbox-ubuntu`_,
67+
`microos-toolbox`_ and `tlbx`_.
6768

6869

6970
.. _Boombox: https://github.com/anthr76/boombox
@@ -72,6 +73,7 @@ There is also `Boombox`_, `CoreOS toolbox`_, `microos-toolbox`_ and `tlbx`_.
7273
.. _Distrobox: https://github.com/89luca89/distrobox
7374
.. _Distrobox - Containers distribution support: https://distrobox.privatedns.org/compatibility.html#containers-distros
7475
.. _distrobox-init: https://distrobox.privatedns.org/usage/distrobox-init.html
76+
.. _docker-coreos-toolbox-ubuntu: https://github.com/wallneradam/docker-coreos-toolbox-ubuntu
7577
.. _microos-toolbox: https://github.com/openSUSE/microos-toolbox
7678
.. _systemd-nspawn: https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html
7779
.. _tlbx: https://gitlab.com/uppercat/tlbx

doc/cratedb.rst

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -40,72 +40,3 @@ Test package on Fedora 36::
4040
HTTP/1.1 503 Service Unavailable
4141

4242
Improve!
43-
44-
45-
**************
46-
postroj invoke
47-
**************
48-
49-
Purpose: Invoke programs within a Windows/Java/OpenJDK environment.
50-
51-
::
52-
53-
# Basic usage.
54-
postroj invoke \
55-
--system=windows-1809 --cpus=8 --memory=8192M \
56-
--mount type=git,src=https://github.com/crate/crate,dst=C:/src \
57-
-- \
58-
cmd /C "cd src && gradlew :server:test -Dtests.crate.run-windows-incompatible=false"
59-
60-
# Advanced usage.
61-
postroj invoke \
62-
--environment=windows-1809 --cpus=8 --memory=8192M \
63-
--repository=https://github.com/crate/crate \
64-
--command="gradlew :server:test -Dtests.crate.run-windows-incompatible=false"
65-
66-
67-
********
68-
Failures
69-
********
70-
71-
72-
Using the CrateDB RPM package on openSUSE
73-
=========================================
74-
75-
| A: Workaround applied by running ``rpm --install --nodeps``.
76-
| TODO: Maybe adjust the RPM dependencies?
77-
78-
::
79-
80-
zypper --non-interactive install crate-4.7.2-1.x86_64.rpm
81-
Loading repository data...
82-
Reading installed packages...
83-
Resolving package dependencies...
84-
85-
Problem: nothing provides 'systemd-units' needed by the to be installed crate-4.7.2-1.x86_64
86-
Solution 1: do not install crate-4.7.2-1.x86_64
87-
Solution 2: break crate-4.7.2-1.x86_64 by ignoring some of its dependencies
88-
89-
Choose from above solutions by number or cancel [1/2/c/d/?] (c): c
90-
91-
::
92-
93-
rpm -i crate-4.7.2-1.x86_64.rpm
94-
warning: crate-4.7.2-1.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 06f6eaeb: NOKEY
95-
error: Failed dependencies:
96-
shadow-utils is needed by crate-4.7.2-1.x86_64
97-
systemd-units is needed by crate-4.7.2-1.x86_64
98-
99-
100-
Spawning a container from the CrateDB Docker image
101-
==================================================
102-
103-
::
104-
105-
racker run -it --rm crate/crate:nightly bash
106-
107-
::
108-
109-
Failed to start transient service unit: Cannot set property AddRef, or unknown property.
110-
111-
=> systemd too old.

0 commit comments

Comments
 (0)