Operations

Orchestrator Deployment


Development

1
# Start the orchestrator: gRPC on 127.0.0.1:50051, REST API on 127.0.0.1:8080
2
DATABASE_URL=postgresql://orcher:orcher@localhost:5432/orcher ./target/release/orchestrator
3
4
# Or use the CLI
5
orcher server start --foreground

Docker Compose

A Compose file for the full stack. The orchestrator serves both gRPC (50051) and the REST API (8080), so it is the only Orcher service:

1
services:
2
postgres:
3
image: postgres:15
4
environment:
5
POSTGRES_DB: orcher
6
POSTGRES_USER: orcher
7
POSTGRES_PASSWORD: orcher
8
ports:
9
- "5432:5432"
10
healthcheck:
11
test: ["CMD-SHELL", "pg_isready -U orcher"]
12
interval: 10s
13
timeout: 5s
14
retries: 5
15
16
pgbouncer:
17
image: bitnami/pgbouncer:latest
18
depends_on:
19
postgres:
20
condition: service_healthy
21
ports:
22
- "6432:6432"
23
24
orchestrator:
25
image: ghcr.io/orcher-io/orcher
26
depends_on:
27
postgres:
28
condition: service_healthy
29
environment:
30
DATABASE_URL: postgresql://orcher:orcher@pgbouncer:6432/orcher
31
LOG_LEVEL: info
32
# The image listens on 0.0.0.0, which requires authentication.
33
# For a local, unauthenticated stack only; configure [security] for production.
34
ORCHER_INSECURE: "true"
35
ports:
36
- "127.0.0.1:50051:50051"
37
- "127.0.0.1:8080:8080"
38
healthcheck:
39
test: ["CMD", "curl", "-f", "http://localhost:8080/health/live"]
40
interval: 30s
41
timeout: 3s
42
start_period: 5s
43
retries: 3
1
docker compose up -d
2
3
# View logs
4
docker compose logs -f orchestrator
5
6
# Scale orchestrators for high availability
7
docker compose up -d --scale orchestrator=3

Using systemd

Create /etc/systemd/system/orcher-orchestrator.service:

1
[Unit]
2
Description=Orcher Orchestrator Server
3
After=network.target postgresql.service
4
5
[Service]
6
Type=simple
7
User=orcher
8
Group=orcher
9
EnvironmentFile=/etc/orcher/orchestrator.env
10
ExecStart=/usr/local/bin/orchestrator
11
Restart=always
12
RestartSec=5
13
StandardOutput=journal
14
StandardError=journal
15
SyslogIdentifier=orcher-orchestrator
16
17
NoNewPrivileges=true
18
PrivateTmp=true
19
ProtectSystem=strict
20
ProtectHome=true
21
22
[Install]
23
WantedBy=multi-user.target
1
sudo systemctl daemon-reload
2
sudo systemctl enable orcher-orchestrator
3
sudo systemctl start orcher-orchestrator
4
sudo journalctl -u orcher-orchestrator -f

Next Steps