diff --git a/cmdeploy/src/cmdeploy/lxc/incus.py b/cmdeploy/src/cmdeploy/lxc/incus.py index dd2bb6a5..e21d4447 100644 --- a/cmdeploy/src/cmdeploy/lxc/incus.py +++ b/cmdeploy/src/cmdeploy/lxc/incus.py @@ -230,12 +230,7 @@ class Incus: class Container: - """Lightweight handle for an Incus container. - - Carries the container *name* and provides convenience methods - for running commands, managing lifecycle, and extracting state - so callers don't repeat the name everywhere. - """ + """The base container handle wraps all interactions with incus.""" def __init__(self, incus, name, domain=None, memory="100MiB"): self.incus = incus @@ -385,6 +380,7 @@ class RelayContainer(Container): def disable_ipv6(self): """Disable IPv6 inside the container via sysctl.""" + # incus provides net.* virtalization self.bash("""\ sysctl -w net.ipv6.conf.all.disable_ipv6=1 sysctl -w net.ipv6.conf.default.disable_ipv6=1 @@ -469,7 +465,7 @@ class RelayContainer(Container): class DNSContainer(Container): - """Specialised container handle for the PowerDNS name server.""" + """Container handle for the PowerDNS name server.""" def __init__(self, incus): super().__init__(incus, DNS_CONTAINER_NAME, domain=DNS_DOMAIN) diff --git a/cmdeploy/src/cmdeploy/tests/test_lxc.py b/cmdeploy/src/cmdeploy/tests/test_lxc.py index 504e1f4a..cf156b61 100644 --- a/cmdeploy/src/cmdeploy/tests/test_lxc.py +++ b/cmdeploy/src/cmdeploy/tests/test_lxc.py @@ -10,7 +10,7 @@ from cmdeploy.lxc import cli from cmdeploy.lxc.incus import Incus pytestmark = pytest.mark.skipif( - not shutil.which("incus") or not shutil.which("lxc"), + not shutil.which("incus"), reason="incus/lxc not installed", ) diff --git a/doc/source/lxc.rst b/doc/source/lxc.rst index 54621223..06662462 100644 --- a/doc/source/lxc.rst +++ b/doc/source/lxc.rst @@ -93,13 +93,12 @@ CLI reference 2. ``cmdeploy run``: deploy chatmail services on each relay - 3. publish ``localchat-relay`` image after first successful deploy + 3. locally cache ``localchat-relay`` image after first successful deploy 4. ``cmdeploy dns --zonefile``: generate standard BIND-format zone files, load full DNS records 5. ``cmdeploy test``: run full test suite - with ``-n4 -x`` By default creates, deploys, and tests both ``test0`` and ``test1`` for dual-domain federation testing (sets ``CHATMAIL_DOMAIN2=_test1.localchat``). @@ -221,12 +220,12 @@ per-container ``chatmail-*.ini`` files, zone files, and ``ssh-config``. The only state *outside* the repository is the Incus containers and images themselves (managed via the ``incus`` CLI, labelled with ``user.localchat-managed=true``). -Two cached images are published to the local Incus image store: +The Incus image store retains the following snapshot images: * ``localchat-base``: Debian 12 with openssh-server and Python (built on first run) * ``localchat-relay``: fully deployed relay snapshot, - published after the first successful ``cmdeploy run``. + cached after the first successful ``cmdeploy run``. Subsequent relay containers launch from this image so the deploy step is mostly no-ops (roughly 3× faster than a fresh deploy). Relay containers are limited to **500 MiB RAM** and the DNS container to **100 MiB**.