You can deploy a local Dragonfly environment using the provided Docker Compose configuration. This setup includes a client, a scheduler, and a seed-client service.
Service Details:
- client: The main Dragonfly client service. It depends on the
scheduler and seed-client. It exposes ports 4000, 4001, and 4002. - scheduler: The Dragonfly scheduler service. It exposes port
8002. - seed-client: A client service used for seeding, depending on the
scheduler. It exposes ports 4010, 4011, and 4012.
Volume Mapping Requirements:
To run this configuration, you must have local directories and configuration files prepared as follows:
| Service | Local Log Path | Local Config Path | Local DynConfig Path |
|---|
client | ./log/client | ./config/client.yaml | ./config/client-dynconfig.yaml |
scheduler | ./log/scheduler | ./config/scheduler.yaml | ./config/scheduler-dynconfig.yaml |
seed-client | ./log/seed-client | ./config/seed-client.yaml | ./config/client-dynconfig.yaml |
services:
client:
image: dragonflyoss/client:latest
depends_on:
- scheduler
- seed-client
container_name: client
restart: always
healthcheck:
test: ["CMD-SHELL", "/bin/grpc_health_probe -addr=unix:///var/run/dragonfly/dfdaemon.sock || exit 1"]
interval: 1s
timeout: 2s
retries: 30
volumes:
- ./log/client:/var/log/dragonfly
- ./config/client.yaml:/etc/dragonfly/dfdaemon.yaml:ro
- ./config/client-dynconfig.yaml:/etc/dragonfly/dynconfig.yaml:ro
ports:
- 4000:4000
- 4001:4001
- 4002:4002
scheduler:
image: dragonflyoss/scheduler:latest
container_name: scheduler
restart: always
healthcheck:
test: ["CMD-SHELL", "/bin/grpc_health_probe -addr=:8002 || exit 1"]
interval: 1s
timeout: 2s
retries: 30
volumes:
- ./log/scheduler:/var/log/dragonfly
- ./config/scheduler.yaml:/etc/dragonfly/scheduler.yaml:ro
- ./config/scheduler-dynconfig.yaml:/etc/dragonfly/dynconfig.yaml:ro
ports:
- 8002:8002
seed-client:
image: dragonflyoss/client:latest
depends_on:
- scheduler
container_name: seed-client
restart: always
healthcheck:
test: ["CMD-SHELL", "/bin/grpc_health_probe -addr=unix:///var/run/dragonfly/dfdaemon.sock || exit 1"]
interval: 1s
timeout: 2s
retries: 30
volumes:
- ./log/seed-client:/var/log/dragonfly
- ./config/seed-client.yaml:/etc/dragonfly/dfdaemon.yaml:ro
- ./config/client-dynconfig.yaml:/etc/dragonfly/dynconfig.yaml:ro
ports:
- 4010:4010
- 4011:4011
- 4012:4012