]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Support mkosi ssh for multiple running instances of the same image
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 27 Mar 2024 22:48:36 +0000 (23:48 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 28 Mar 2024 11:44:48 +0000 (12:44 +0100)
commit6852e1f0a7efdb155e07fa5d77bfb716e4644cbe
treed11dde13076a6ad91247463e1877ba9f3c1bc4d5
parentde72c01342f48df149429ea95881aa486c1a9d3a
Support mkosi ssh for multiple running instances of the same image

Let's add a stopgap solution until systemd-machined supports everything
we need. We maintain a super basic JSON state file in the runtime directory
that is used to map a machine name to the corresponding SSH proxy command.

We also store the path to the ssh key in there so that mkosi ssh can be
run from every directory.

The new Machine= option allows selecting the machine name to use. Unless
set explicitly, we also use the machine name as the hostname for the machine.
mkosi/__init__.py
mkosi/config.py
mkosi/qemu.py
mkosi/resources/mkosi.md
mkosi/user.py
mkosi/util.py
tests/test_json.py