NAME
ocifbsd_orchestration —
ocifbsd pod, stack, and scheduling
library
SYNOPSIS
#include
<ocifbsd/orchestration.h>
int
orch_init(struct
orch_config *cfg);
void
orch_shutdown(void);
int
pod_create(struct
pod_spec *spec);
int
pod_start(const
char *name);
int
pod_stop(const
char *name, int
timeout);
int
pod_delete(const
char *name);
int
pod_scale(const
char *name, int
replicas);
int
stack_deploy(struct
stack_spec *spec);
int
health_check_pod(const
char *name);
int
rolling_update(struct
pod_spec *new_spec);
int
scheduler_place(struct
pod_spec *spec, struct
node_info *nodes, int
n_nodes);
DESCRIPTION
The ocifbsd_orchestration library
implements the high-level orchestration primitives used by
ocifbsd(8) to manage pods,
stacks, and rolling updates. It is not a standalone program; it is linked
into the main ocifbsd(8)
binary.
The library is organised into seven functional modules:
- Pod management (pod.c) creates, starts, stops, deletes, and scales pods (multi-container deployment units modelled on Kubernetes Pods).
- Stack management (stack.c) deploys and tears down stacks — multi-pod application bundles modelled on Docker Compose files.
- Scheduling (scheduler.c) selects the best node to run a pod on, based on available CPU, memory, and resource quotas.
- Health checking (health.c) runs liveness and readiness probes against running pods and reports status to the cluster.
- Rolling updates (rolling_update.c) performs zero-downtime updates by replacing pod replicas one at a time.
- CLI plumbing (orch_cli.c) implements the
ocifbsd pod,ocifbsd stack, andocifbsd servicesubcommand handlers. - Lifecycle (orch_init.c) initialises the global orchestration state (mutexes, trees, default config) and shuts it down cleanly.
The library calls the container lifecycle functions
(ocifbsd_create_container, ocifbsd_start_container, etc.) that live in the
main ocifbsd(8) binary.
When the library is loaded standalone, the
stubs.c()
file in this directory provides stub implementations of those functions so
the library can be linked and tested in isolation. When it is linked into
the main ocifbsd(8)
binary, the real implementations override the stubs.
The full public API is declared in
<ocifbsd/orchestration.h>.
FILES
- /etc/ocifbsd/orchestration.conf
- Orchestration defaults (replica limits, rolling-update parameters, health-check intervals).
- /var/run/ocifbsd/pods
- Per-pod state directory.
- /var/db/ocifbsd/stacks
- Stack manifests.
SEE ALSO
HISTORY
The ocifbsd_orchestration library first
appeared in FreeBSD 16.0.
AUTHORS
The ocifbsd_orchestration library was
developed by Klara, Inc. under sponsorship from