Examples
shared-files
Data shared between two machines: the writer stores a file in the shared volume, the reader finds it at its own path. One Docker volume for both containers; on VMs the writer serves its directory over NFS and the reader mounts it (at boot too), started once the writer serves it. The writer also has a data disk of its own: a named volume on Docker, a claim on Kubernetes, an empty disk formatted and mounted at boot on the VM targets. Each machine's setup script runs once it is up, with its volumes, the same way as a container or a VM.
The example's folder, with the files its spec names: examples/shared-files.
version: 1
name: shared-files
networks:
app: { cidr: 10.84.0.0/24 }
volumes:
shared: { owner: writer }
machines:
writer:
os: debian@12
networks: { app: 10 }
volumes: { shared: /srv/shared }
disks: { data: { size_gb: 50, mount: /srv/data } }
setup: [steps/write.sh]
reader:
os: debian@12
networks: { app: 11 }
volumes: { shared: /data/shared }
setup: [steps/look.sh]
checks:
- name: the reader sees what the writer wrote
from: reader
exec: cat /data/shared/greeting
expect: written by the writer
- name: the writer's data disk is mounted
from: writer
exec: "grep -q ' /srv/data ' /proc/mounts && echo mounted"
expect: mounted
Targets
docker, hosted, docker-vm, cloud-docker, kubernetes, vagrant, proxmox, esxi, cloud-vm. See targets for what each means.
Checks
The spec's own:
- the reader sees what the writer wrote (
exec) - the writer's data disk is mounted (
exec)
Plus the checks Isoloom derives from the machines' ports and the reach rules. See checks.