Conch is distributed as a single statically-compiled Go binary, requiring no external dependencies, dynamic loaders, or library runtimes. This makes deployment straightforward across diverse Linux distributions.
For production deployments, compile a statically-linked binary for the target architecture:
# Build statically-linked amd64 binary
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o conch ./cmd/conchThis binary has zero dynamic dependencies and can be safely copied to any compatible target host.
To run the distributed cron runner (conch conchd), it should be supervised by a process manager like systemd.
A standard systemd service unit template (/etc/systemd/system/conchd.service):
[Unit]
Description=Conch Distributed Cron Daemon
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
Environment="CONCH_ENDPOINTS=http://127.0.0.1:2379"
ExecStart=/usr/local/bin/conch conchd
Restart=always
RestartSec=5
LimitNOFILE=65536
[Install]
WantedBy=multi-user.targetConfigure CONCH_ENDPOINTS to point to your cluster's etcd nodes.
While cron jobs are stored inside etcd, you can manage their lifecycle declaratively using configuration management tools (Ansible, Chef, SaltStack, or NixOS).
An automation script or module should deploy jobs by executing:
# Add or overwrite a job in the cluster
conch cron add <job-name> --schedule '<expr>' -- <cmd...>Since conch cron add is idempotent, running it repeatedly will simply update the job specification in etcd.
When deploying upgrades to the conch binary or conchd:
- Deploy Binary: Copy the updated
conchbinary to/usr/local/bin/conchon all nodes. (This is a non-destructive binary delivery). - Verify CLI: Run a test command to verify connection to the etcd cluster:
conch elect rollout-test --who
- Restart Daemon: Perform a rolling restart of the
conchdservices on each node:Note: Because of lease state and tick intervals, rolling restarts do not skip execution ticks unless all nodes are offline concurrently for longer than the tick window.systemctl restart conchd
- Logs: Standard output and error from both
conchdand the child processes are written directly to stdout/stderr. If using systemd, these are captured by journald:journalctl -u conchd.service -f
- Liveness Probes: Check that the host can campaign and talk to etcd by running an assertion check:
conch elect monitor-probe --assert
- Status HTTP API: If
conchdhas--status-addrenabled, query status or health directly via HTTP:# Query cron, election, or semaphore statuses curl -fsS http://localhost:9191/cron curl -fsS http://localhost:9191/elect curl -fsS http://localhost:9191/sema - Dead Man's Snitch: Register a simple heartbeat cron job to ping an external monitoring endpoint:
If the endpoint stops receiving pings, it indicates a failure of the cron runner daemon, loss of etcd quorum, or cluster host isolation.
conch cron add heartbeat --schedule '@every 5m' -- curl -fsS https://hchk.io/your-uuid