Files
infix/test/docker/README.md
Joachim Wiberg 5386ec9a3a test,doc,board: Infamy Made Easy
As of 4768cae6, we can use conserver/telnet to connect to the docker0
bridge IP:90XX, where XX is DUTXX.  This was a great UX improvement
and this patch set aims to further the experience by:

 - allow running Infamy (infix-test container) completely rootless¹
 - reduce the expsed port range 50->10 (can be improved further)
 - use 'podman --publish-all' ports, which allocates ten random
   ports for the exposed Qemu telnet ports
 - add Quick Start Guide to doc/testing.md

This restores the possiblity of running multiple "make test-sh"
instances, e.g., when multiple users share the same server.

The 'console' script included in this commit uses 'podman inspect' to
find the port number for a given DUT, and optional instance.  It takes
either the console/dut number (1-N), or the dut name from the topology.

Also in this commit:
 - set hostname for easy identification (for console script)
 - set conatainer --name to hostname
 - adjust workdir from buildroot to infix/test
 - simplify PS1 and add time to prompt (when did the test finish?)

When running 'make test-sh' the prompt now tells you which instance you
are running, e.g., infmay10.  Calling 'console 1 infamy10' connects to
console 1 (port 9001) on the infamy10 instance.

For more information, see the Quick Start Guide in doc/testing.md.  It
shows how to use the new helper scripts: console and shell.

Fix #227

_______
¹) devs using podman, instead of docker, with slirp4netns installed, can
   run the infix-test container completely rootless.  We like this, and
   as of today podman is our recommendation.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-25 19:49:27 +01:00

41 lines
1.6 KiB
Markdown

Checklist for Updating Infamy Docker Image
==========================================
This directory holds the Dockerfile and any extras needed to build and
update the infix-test container image used for the test system.
The following is a checklist/reminder to maintainers for how to update
the image, e.g., with missing Alpine packages.
1. Update the Dockerfile
cd test/docker/
edit Dockerfile
2. Build the new image version, for latest version, see released images
here: <https://github.com/kernelkit/infix/pkgs/container/infix-test>
in this example we use version 0.4:
docker build -t ghcr.io/kernelkit/infix-test:0.4 .
3. Update the `test/.env` file to use the new version
4. Verify your new image works properly (remember to remove your `~/.infix-test-venv`)
5. Send PR to co-maintainer for review
The co-maintainer should then verify themselves before approving the PR.
A crucial step to remember is to:
1. Push the new image version to <https://ghcr.io>. For details on how
to do this, see this excellent guide to the [GitHub Container
Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry):
2. Shorthand after setup (above):
echo $CR_PAT | docker login ghcr.io -u troglobit --password-stdin
docker push ghcr.io/kernelkit/infix-test:0.4
3. Merge the PR to the `main` branch.
> **Note:** the co-maintainer may delegate the chore of uploading the
> new image to the one who prepared the PR (you), provided of course
> they have the access rights to do so.