Production meshes (transport=direct, full mesh, operator-pinned mutual TLS) stalled at a fixed record count with failed_cycles=0 because a failed inbound apply stage skipped the node's own publish. Reproducing that needs several real daemons with enrolled pins and a corpus of embeddings and topology edges authored on different nodes, so add tests/integration/p2p_mesh: - Dockerfile and node entrypoint that run prebuilt yams/yams-daemon from a host build dir or a released .deb, one isolated volume per node. - mesh.py (stdlib only) with up/seed/converge/status/chaos/run/down. It generates writer keys and manifests, enrolls every peer pin and connects a full mesh the way an operator does, and records apply-health counters when the build reports them. Local/manual tooling only; not wired into any CI. Signed-off-by: trvon <me@trevon.dev>
36 lines
1.4 KiB
Docker
36 lines
1.4 KiB
Docker
# Generic runtime image for the YAMS p2p mesh harness (tests/integration/p2p_mesh/mesh.py).
|
|
#
|
|
# The image carries no YAMS build of its own. mesh.py stages the binaries under payload/ in the
|
|
# build context: either a copy of a host build (bin/ + lib/) or a released .deb. The base image's
|
|
# glibc/libstdc++ must be at least as new as the build host's; the default tracks Debian testing
|
|
# for that reason. Use --base ubuntu:24.04 (or similar) for a released .deb.
|
|
ARG BASE=debian:testing-slim
|
|
FROM ${BASE}
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
ca-certificates openssl iproute2 procps libstdc++6 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY payload/ /payload/
|
|
RUN set -e; \
|
|
if ls /payload/*.deb >/dev/null 2>&1; then \
|
|
apt-get update && apt-get install -y --no-install-recommends /payload/*.deb \
|
|
&& rm -rf /var/lib/apt/lists/*; \
|
|
else \
|
|
mkdir -p /opt/yams && cp -a /payload/. /opt/yams/; \
|
|
fi; \
|
|
rm -rf /payload
|
|
|
|
# One unprivileged user and one volume root per node; nothing is shared with the host.
|
|
RUN useradd --uid 1000 --create-home --home-dir /home/yams yams \
|
|
&& mkdir -p /node \
|
|
&& chown yams:yams /node
|
|
COPY node.sh /usr/local/bin/mesh-node.sh
|
|
RUN chmod 0755 /usr/local/bin/mesh-node.sh
|
|
|
|
ENV PATH=/opt/yams/bin:${PATH}
|
|
USER yams
|
|
WORKDIR /node
|
|
ENTRYPOINT ["/usr/local/bin/mesh-node.sh"]
|