Operations
Docker and Kubernetes
Images, volumes, the OmniCoreDeployment file and production checks.
OmniCore's servers are published as container images, and occtl deploys them to Kubernetes or Docker Compose from one file. You can also run the images yourself.
Images
| Image | Listens on | Data |
|---|---|---|
eonsoftware/omnicore-database | 8080 | /data: the record log, schema, security, indexes, resources, plugins, views, workflows and dashboards. |
eonsoftware/omnicore-identity | 8080 | /data: the directory and the token-signing key. |
Both run as a non-root user, and both images are published with the same version. Pin a version in production rather
than latest.
Running the database yourself
docker run -p 5080:8080 -v omnicore-data:/data `
-e OmniCore__Auth__Authority=https://login.example.com/<tenant>/v2.0 `
-e OmniCore__Auth__Audience=<api app id> `
eonsoftware/omnicore-database:<version>Keep /data on a persistent volume. Only one server can open a data folder at a time: it takes an exclusive lock,
so a second container mounting the same volume fails to start rather than corrupting it. Run one replica.
Running OmniCore.Identity yourself
docker run -p 5090:8080 -v omnicore-identity:/data `
-e Identity__Bootstrap__Password='<first admin password>' `
-e Identity__PublicOrigin=https://login.example.com `
eonsoftware/omnicore-identity:<version>- Keep the volume, and keep it private: it holds the signing key.
- Set
Identity__PublicOriginbehind a proxy or load balancer, so the issuer stays the same. - Give the bootstrap password only for the first start, then remove it. It's ignored once the directory has users.
- The image has a built-in health check.
The OmniCoreDeployment file
occtl deploy init writes the file with every setting explained. The full shape:
apiVersion: omnicore.io/v1
kind: OmniCoreDeployment
metadata:
name: omnicore # names the Kubernetes objects / Docker project
spec:
target: kubernetes # kubernetes or docker
version: latest # image tag; pin a published version in production
registry:
server: "" # e.g. myregistry.azurecr.io; empty = Docker Hub
databaseRepository: eonsoftware/omnicore-database
identityRepository: eonsoftware/omnicore-identity
pullSecret: "" # Kubernetes image pull secret
pullPolicy: "" # empty = Always for latest, else IfNotPresent
kubernetes:
context: "" # kubeconfig context; empty = current
namespace: omnicore # created if missing
storageClass: "" # empty = cluster default
serviceType: LoadBalancer # LoadBalancer, ClusterIP (with ingress) or NodePort
# ingress: { className: nginx, tlsSecret: omnicore-tls }
docker:
project: "" # empty = metadata.name
databasePort: 5080
identityPort: 5090
database:
publicUrl: http://localhost:5080
storage: 5Gi
durableWrites: true
env: {} # extra settings, e.g. OmniCore__MaxPageSize: "500"
identity:
provider: omnicore # omnicore or external
omnicore:
publicUrl: http://localhost:5090
storage: 1Gi
tenantName: omnicore
adminUser: admin@omnicore.local
env: {}
external:
authority: "" # e.g. https://login.microsoftonline.com/<tenant-id>/v2.0
audience: "" # the database API's application (client) id
clientId: "" # public client for occtl and the admin app
subjectClaim: oid
roleClaim: roles
requireHttpsMetadata: true
bootstrapAdmins: [] # subjects that are always System Adminsapply checks the file first and explains every problem: the apiVersion and kind, the name, the target, namespace,
service type and provider, that public URLs are absolute http(s) addresses, the settings each provider needs, and
unknown properties (usually typos). serviceType: ClusterIP also needs an ingress host.
The env maps pass any database or
identity setting to the servers. They're applied last, so
they can override a setting occtl chose.
Updates
Change spec.version and run occtl deploy apply again: the servers are rolled to the new images and occtl waits until
they're healthy. Re-applying an unchanged file changes nothing.
Before going live
- Pin
spec.versionto a published version. - Serve the database, identity provider and portal over HTTPS.
- Keep
DurableWriteson. - Back up the database's and the identity provider's volumes. The identity volume holds the signing key: keep the backups private.
- Store the initial admin password
applyprinted, and give the first administrators their roles. - Check that
/healthanswers on both servers (occtl deploy status). - Don't turn off authentication, and don't enable development tokens.
Limits to plan for
- One writer, one process. There's no replication or clustering yet.
- Compaction blocks reads and writes while it runs, and building an index blocks writes. Plan them for quiet times.
- Plugin events aren't durable: events waiting to run are lost if the server stops.
- There's no audit log of who changed what yet.