Reference

The reef.json format, and the tools that run it.

reef.json

A reef.json describes one atoll: a group of capsules that share a network namespace.

  • name: the atoll's name.
  • restart: restart policy, Always or Never. Repeated crashes back off.
  • capsules: the list of capsules.
    • name, image, cmd: what to run.
    • probe.exec: a command run inside the capsule as a liveness check.
    • probe.period_seconds, probe.failure_threshold: how often to probe, and how many failures kill and restart the capsule.

Every field with its type, default and flag is on Run an atoll. Full example, from examples/web:

{
  "name": "web",
  "restart": "Always",
  "capsules": [
    {
      "name": "app",
      "image": "alpine:latest",
      "cmd": ["sh", "-c", "while true; do nc -l -p 8080; done"],
      "probe": {
        "exec": ["sh", "-c", "echo x | nc -w 1 127.0.0.1 8080"],
        "period_seconds": 2,
        "failure_threshold": 3
      }
    },
    {
      "name": "sidecar",
      "image": "alpine:latest",
      "cmd": ["sleep", "300"]
    }
  ]
}

coraild

The control plane. It watches the desired state, starts and supervises capsules, and serves a JSON API on a unix socket at $CORAILD_ROOT/coraild.sock. Design and status: CORAILD.md.

recify

The client for coraild, in the spirit of kubectl.

On Linux, start the daemon, then use it:

$ coraild &
$ recify apply -f reef.json
$ recify get atolls
$ recify describe web
$ recify logs web
$ recify delete web

On macOS (Intel and Silicon), recify up starts a Linux guest through Docker or Apple's container tool. recify down stops it. apply, get, describe, logs and delete are the same.

sonar

A terminal view of a running atoll. Key map: SONAR.md.