Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
327ec91
Enhance deployment documentation to include Kubernetes orchestration …
junhaoliao Dec 19, 2025
e9e4326
fix format
junhaoliao Dec 19, 2025
164a3d8
Update external database guide to clarify bundled database usage and …
junhaoliao Dec 19, 2025
34f7cd2
Refactor and enhance deployment and user guides to include Docker Com…
junhaoliao Dec 26, 2025
d8ba9d9
Merge branch 'main' into helm-docs
junhaoliao Dec 26, 2025
105549d
Reorganize guides overview to reposition `log-ingestor` section
junhaoliao Dec 26, 2025
8c6cbce
Remove duplicated API server guide reference
junhaoliao Dec 26, 2025
6e90f25
Update clp-json.md
quinntaylormitchell Jan 12, 2026
a410618
Update clp-text.md
quinntaylormitchell Jan 12, 2026
5e67440
Update guides-k8s-deployment.md
quinntaylormitchell Jan 12, 2026
fa3629d
Consolidate documentation structure for consistency and clarity, merg…
junhaoliao Jan 13, 2026
7c6ce03
Refine user documentation for clarity and conciseness in multi-host d…
junhaoliao Jan 13, 2026
93ad3e1
Merge branch 'main' into helm-docs
junhaoliao Jan 13, 2026
6ff459a
Add package scripts reference to user documentation
junhaoliao Jan 13, 2026
4ec571b
Refine deployment section in user docs to include details on Docker C…
junhaoliao Jan 13, 2026
e59377c
rename `distributed` to `distributedDeployment` to match latest propo…
junhaoliao Jan 13, 2026
7fcf276
use backticks whenever appropiate
junhaoliao Jan 13, 2026
f705016
add missing admin tools ref
junhaoliao Jan 13, 2026
713c6e4
revert admin tools ref
junhaoliao Jan 13, 2026
105d96d
lock version to fix ci
junhaoliao Jan 13, 2026
67d8d99
Merge branch 'main' into helm-docs
junhaoliao Jan 13, 2026
cba43bc
Merge branch 'main' into helm-docs
junhaoliao Jan 13, 2026
4f9235f
Update user docs: Rename "Package services" section to "Query & analy…
junhaoliao Jan 14, 2026
2b43439
Add hidden toctree for 'self' in user docs index
junhaoliao Jan 14, 2026
01b312f
Merge branch 'main' into helm-docs
junhaoliao Jan 14, 2026
748d4aa
refine sentence structure by removing em dash - Apply suggestions fro…
junhaoliao Jan 15, 2026
bd3907f
Clarify the development status of the KubernetesController in deploym…
junhaoliao Jan 15, 2026
df392fa
use backticks for package flavours - Apply suggestions from code review
junhaoliao Jan 15, 2026
22184e5
reflow line to 100 chars - Apply suggestions from code review
junhaoliao Jan 15, 2026
ca3e5aa
use imperative tense in introduction sentence - Apply suggestions fro…
junhaoliao Jan 15, 2026
afe07c7
reflow line to 100 chars - Apply suggestions from code review
junhaoliao Jan 15, 2026
1d4544e
Use consistent indentation in JSON log file formatting section.
junhaoliao Jan 15, 2026
a1950b4
reflow to 100 chars
junhaoliao Jan 15, 2026
7365f13
Merge branch 'main' into helm-docs
junhaoliao Jan 15, 2026
8aef170
Update Helm documentation to include reducer configuration and log in…
junhaoliao Jan 15, 2026
55a4887
Merge branch 'main' into helm-docs
junhaoliao Jan 15, 2026
3c52bb9
consistently add `.md` extension to references
junhaoliao Jan 15, 2026
594368c
Clarify deployment orchestration description and frameworks supported…
junhaoliao Jan 15, 2026
f7c956b
Reorder Core cards and adjust toctree sequence in user docs index.
junhaoliao Jan 15, 2026
8ed5766
remove unnecessary markdown link syntax from kubeadm section in deplo…
junhaoliao Jan 15, 2026
aca5855
update SeaweedFS setup reference in Kubernetes deployment guide - App…
junhaoliao Jan 15, 2026
1bd1a98
move admin tools reference doc to top level
junhaoliao Jan 15, 2026
ab1e0ff
Update Core README to fix running link in documentation
junhaoliao Jan 15, 2026
fb50b45
Minor edits.
kirkrodrigues Jan 17, 2026
97ff21f
Minor edits.
kirkrodrigues Jan 17, 2026
ae96897
Remove extraneous details.
kirkrodrigues Jan 17, 2026
870607d
Move k8s setup steps into start-up section.
kirkrodrigues Jan 17, 2026
e4bf2be
Undo header level change.
kirkrodrigues Jan 17, 2026
b9f9278
Refactor where we mention single and multinode set ups; Explain the t…
kirkrodrigues Jan 17, 2026
0a9b1f5
Remove unused link references.
kirkrodrigues Jan 18, 2026
5acdf68
Remove extraneous details.
kirkrodrigues Jan 18, 2026
663bf1d
Move k8s setup steps into start-up section.
kirkrodrigues Jan 18, 2026
bc80588
Minor edits.
kirkrodrigues Jan 18, 2026
32d3a52
Use different API server ports for each orchestration framework.
kirkrodrigues Jan 18, 2026
1b08711
Move admin-tools docs back under Package scripts doc; Rename Package …
kirkrodrigues Jan 18, 2026
40c251b
Clean-up link.
kirkrodrigues Jan 18, 2026
31008ea
Some edits.
kirkrodrigues Jan 18, 2026
5be86a6
Some edits.
kirkrodrigues Jan 18, 2026
cd5b237
Some edits.
kirkrodrigues Jan 18, 2026
cb525c5
Lint fixes.
kirkrodrigues Jan 18, 2026
4d38a78
Add note about API server address changes.
kirkrodrigues Jan 18, 2026
03b1101
remove references to api server / log ingestor in clp-text quick star…
junhaoliao Jan 19, 2026
46d53bf
Remove API server search documentation from clp-text quick-start guide.
junhaoliao Jan 19, 2026
3f50484
Merge branch 'main' into helm-docs
junhaoliao Jan 19, 2026
d516bbc
ensure all "flavour" references are changed to "flavor"
junhaoliao Jan 19, 2026
711e8a0
add missing verb
junhaoliao Jan 19, 2026
e7f454b
Remove common configuration options table from Kubernetes deployment …
junhaoliao Jan 19, 2026
2a5b1ec
fix duplicated archive_output keys; set 1-month archive retention
junhaoliao Jan 19, 2026
124ca06
Fix typo in user docs ("bofore" -> "before")
junhaoliao Jan 19, 2026
131f609
Standardize spelling from "flavour" to "flavor" across documentation.
junhaoliao Jan 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 69 additions & 74 deletions docs/src/dev-docs/design-deployment-orchestration.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Deployment orchestration

The CLP package is composed of several components that are currently designed to be deployed in a
set of containers that are orchestrated using a framework like [Docker Compose][docker-compose].
This document explains the architecture of that orchestration and any associated nuances.
The CLP package is composed of several components that are designed to be deployed in a set of
containers that are orchestrated using a framework like [Docker Compose][docker-compose] or
[Kubernetes][kubernetes] (via [Helm][helm]). This document explains the architecture of that
orchestration and any associated nuances.
Comment thread
junhaoliao marked this conversation as resolved.
Resolved

## Architecture

Expand Down Expand Up @@ -188,102 +189,96 @@ graph LR
**Table 2**: One-time initialization jobs in the CLP package.
::::

## Code structure
## Orchestration methods

The orchestration code is split up into:
CLP supports two orchestration methods: Docker Compose for single-host or manual multi-host
deployments, and Helm for Kubernetes deployments. Both methods share the same configuration
interface (`clp-config.yaml` and `credentials.yaml`) and support the same deployment types.

* `BaseController` that defines:
* common logic for preparing the environment variables, configuration files, and directories
necessary for each service.
* abstract methods that orchestrator-specific derived classes must implement in order to
orchestrate a deployment.
* `<Orchestrator>Controller` that implements (and/or overrides) any of the methods in
`BaseController` (`<Orchestrator>` is a placeholder for the specific orchestrator for which the
class is being implemented).
### Configuration

## Docker Compose orchestration
Each service requires configuration values passed through config files, environment variables,
and/or command line arguments. Since services run in containers, some values must be adapted for the
orchestration environment—specifically, host paths must be converted to container paths, and
Comment thread
junhaoliao marked this conversation as resolved.
Resolved
hostnames/ports must use service discovery mechanisms.

This section explains how we use Docker Compose to orchestrate the CLP package and is broken into
the following subsections:
The orchestration controller (e.g., `DockerComposeController`) reads `etc/clp-config.yaml` and
`etc/credentials.yaml`, then generates:
* A container-specific CLP config file with adapted paths and service names
* Runtime configuration (environment variables or ConfigMaps)
* Required directories (e.g., data output directories)

* [Setting up the Docker Compose project's environment](#setting-up-the-environment)
* [Starting and stoping the Docker Compose project](#starting-and-stopping-the-project)
* [Deployment types](#deployment-types)
* [Implementation details](#implementation-details)
* [Troubleshooting](#troubleshooting)
For Docker Compose, this generates `var/log/.clp-config.yaml` and `.env`. For Kubernetes, the Helm
chart generates a ConfigMap and Secrets from `values.yaml`.

### Setting up the environment

Several services require configuration values to be passed in through the CLP package's config file,
environment variables, and/or command line arguments. Since the services are running in containers,
some of these configuration values need to be modified for the orchestration environment.
Specifically:
:::{note}
A `KubernetesController` is also planned that will read `clp-config.yaml` and `credentials.yaml`
like `DockerComposeController`, then set up the Helm release accordingly. This will unify the
configuration experience across both orchestration methods.
Comment thread
junhaoliao marked this conversation as resolved.
Resolved
:::
Comment on lines +195 to +222

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Clarify the configuration flow for Kubernetes.

The note about a planned KubernetesController (lines 215-218) may confuse readers. Since the Helm chart currently uses values.yaml, explain how users should configure Kubernetes deployments today versus the future unified approach.

📝 Suggested clarification
 For Docker Compose, this generates `var/log/.clp-config.yaml` and `.env`. For Kubernetes, the Helm
 chart generates a ConfigMap and Secrets from `values.yaml`.

 :::{note}
+**Current approach**: For Kubernetes deployments, configure the Helm chart via `values.yaml`
+or `--set` flags as shown in the [Kubernetes deployment guide][kubernetes-guide].
+
+**Future enhancement**: 
 A `KubernetesController` is also planned that will read `clp-config.yaml` and `credentials.yaml`
 like `DockerComposeController`, then set up the Helm release accordingly. This will unify the
 configuration experience across both orchestration methods.
 :::
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Orchestration methods
The orchestration code is split up into:
CLP supports two orchestration methods: Docker Compose for single-host or manual multi-host
deployments, and Helm for Kubernetes deployments. Both methods share the same configuration
interface (`clp-config.yaml` and `credentials.yaml`) and support the same deployment types.
* `BaseController` that defines:
* common logic for preparing the environment variables, configuration files, and directories
necessary for each service.
* abstract methods that orchestrator-specific derived classes must implement in order to
orchestrate a deployment.
* `<Orchestrator>Controller` that implements (and/or overrides) any of the methods in
`BaseController` (`<Orchestrator>` is a placeholder for the specific orchestrator for which the
class is being implemented).
### Configuration
## Docker Compose orchestration
Each service requires configuration values passed through config files, environment variables,
and/or command line arguments. Since services run in containers, some values must be adapted for the
orchestration environment—specifically, host paths must be converted to container paths, and
hostnames/ports must use service discovery mechanisms.
This section explains how we use Docker Compose to orchestrate the CLP package and is broken into
the following subsections:
The orchestration controller (e.g., `DockerComposeController`) reads `etc/clp-config.yaml` and
`etc/credentials.yaml`, then generates:
* A container-specific CLP config file with adapted paths and service names
* Runtime configuration (environment variables or ConfigMaps)
* Required directories (e.g., data output directories)
* [Setting up the Docker Compose project's environment](#setting-up-the-environment)
* [Starting and stoping the Docker Compose project](#starting-and-stopping-the-project)
* [Deployment types](#deployment-types)
* [Implementation details](#implementation-details)
* [Troubleshooting](#troubleshooting)
For Docker Compose, this generates `var/log/.clp-config.yaml` and `.env`. For Kubernetes, the Helm
chart generates a ConfigMap and Secrets from `values.yaml`.
### Setting up the environment
Several services require configuration values to be passed in through the CLP package's config file,
environment variables, and/or command line arguments. Since the services are running in containers,
some of these configuration values need to be modified for the orchestration environment.
Specifically:
:::{note}
A `KubernetesController` is also planned that will read `clp-config.yaml` and `credentials.yaml`
like `DockerComposeController`, then set up the Helm release accordingly. This will unify the
configuration experience across both orchestration methods.
:::
## Orchestration methods
CLP supports two orchestration methods: Docker Compose for single-host or manual multi-host
deployments, and Helm for Kubernetes deployments. Both methods share the same configuration
interface (`clp-config.yaml` and `credentials.yaml`) and support the same deployment types.
### Configuration
Each service requires configuration values passed through config files, environment variables,
and/or command line arguments. Since services run in containers, some values must be adapted for the
orchestration environment—specifically, host paths must be converted to container paths, and
hostnames/ports must use service discovery mechanisms.
The orchestration controller (e.g., `DockerComposeController`) reads `etc/clp-config.yaml` and
`etc/credentials.yaml`, then generates:
* A container-specific CLP config file with adapted paths and service names
* Runtime configuration (environment variables or ConfigMaps)
* Required directories (e.g., data output directories)
For Docker Compose, this generates `var/log/.clp-config.yaml` and `.env`. For Kubernetes, the Helm
chart generates a ConfigMap and Secrets from `values.yaml`.
:::{note}
**Current approach**: For Kubernetes deployments, configure the Helm chart via `values.yaml`
or `--set` flags as shown in the [Kubernetes deployment guide][kubernetes-guide].
**Future enhancement**:
A `KubernetesController` is also planned that will read `clp-config.yaml` and `credentials.yaml`
like `DockerComposeController`, then set up the Helm release accordingly. This will unify the
configuration experience across both orchestration methods.
:::
🤖 Prompt for AI Agents
In @docs/src/dev-docs/design-deployment-orchestration.md around lines 192 - 218,
Clarify that today Kubernetes deployments are configured directly via the Helm
chart using values.yaml and Kubernetes Secrets/ConfigMaps (users should place
container-adapted settings and credentials into values.yaml or create Secrets
rather than relying on etc/clp-config.yaml), and update the note to state that
in the future a planned KubernetesController (like DockerComposeController) will
read clp-config.yaml and credentials.yaml and automatically generate the Helm
values/ConfigMaps/Secrets to unify the workflow; reference KubernetesController,
DockerComposeController, clp-config.yaml, credentials.yaml, and values.yaml so
readers know what to use now versus what will be automated later.


1. Paths on the host must be converted to appropriate paths in the container.
2. Component hostnames must be converted to service names, and component ports must be converted to the component's default ports.
* This ensures that in the Docker Compose configuration, services can communicate over fixed, predictable hostnames and ports rather than relying on configurable variables.
### Secrets

To achieve this, before starting the deployment, `DockerComposeController.start` generates:
Sensitive credentials (database passwords, API keys) are stored in `etc/credentials.yaml` and
require special handling to avoid exposure.

* a CLP configuration file (`<clp-package>/var/log/.clp-config.yaml` on the host) specific to the
Docker Compose project environment.
* an environment variable file (`<clp-package>/.env`) for any other configuration values.
* any necessary directories (e.g., data output directories).
* **Docker Compose**: Credentials are written to `.env` and passed as environment variables
* **Kubernetes**: Credentials are stored in Kubernetes Secrets

The Docker Compose project then passes those environment variables to the relevant services, either
as environment variables or command line arguments, as necessary.
### Dependencies

### Starting and stopping the project
As shown in [Figure 1](#figure-1), services have complex interdependencies. Both orchestrators
ensure services start only after their dependencies are healthy.

To start and stop the project, `DockerComposeController` simply invokes `docker compose up` or
`docker compose down` as appropriate. However, to allow multiple CLP packages to be run on the same
host, we explicitly specify a project name for the project, where the name is based on the package's
instance ID.
* **Docker Compose**: Uses `depends_on` with `condition: service_healthy` and container healthchecks
* **Kubernetes**: Uses init containers (via the `clp.waitFor` helper) and readiness/liveness probes

### Deployment Types
### Storage

CLP supports four deployment types determined by the `compression_scheduler.type` and
`package.query_engine` configuration setting.
Services require persistent storage for logs, data, archives, and streams.

| Deployment Type | Compression Scheduler | Query Engine | Docker Compose File |
|-----------------|-----------------------|------------------------------|------------------------------------|
| Base | Celery | [Presto][presto-integration] | `docker-compose-base.yaml` |
| Full | Celery | Native | `docker-compose.yaml` |
| Spider Base | Spider | [Presto][presto-integration] | `docker-compose-spider-base.yaml` |
| Spider Full | Spider | Native | `docker-compose-spider.yaml` |
* **Docker Compose**: Uses bind mounts for host directories and named volumes for database data.
Conditional mounts use variable interpolation to mount empty tmpfs when not needed.
* **Kubernetes**: Uses PersistentVolumeClaims per component, with shared PVCs (`ReadWriteMany`) for
archives and streams. Uses `local-storage` StorageClass by default.

### Implementation details
### Deployment types

One notable implementation detail is in how we handle mounts that are only necessary under certain
configurations. For instance, the input logs mount is only necessary when the `logs_input.type` is
`fs`. If `logs_input.type` is `s3`, we shouldn't mount some random directory from the user's
host filesystem into the container. However, Docker doesn't provide a mechanism to perform
conditional mounts. Instead, we use Docker's variable interpolation to conditionally mount an empty
tmpfs mount into the container. This strategy is used wherever we need a conditional mount.
CLP supports multiple deployment configurations based on the compression scheduler and query engine.

### Troubleshooting
| Deployment Type | Compression Scheduler | Query Engine |
|-----------------|-----------------------|------------------------------|
| Base | Celery | [Presto][presto-integration] |
| Full | Celery | Native |
| Spider Base | Spider | [Presto][presto-integration] |
| Spider Full | Spider | Native |

If you encounter issues with the Docker Compose deployment, first determine the instance ID for your
deployment by checking the content of `<clp-package>/var/log/instance-id`. Then run one of the
commands below as necessary.
:::{note}
Spider support is not yet available for Helm.
:::
Comment on lines +249 to +262

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Clarify Spider deployment status.

The deployment types table includes Spider Base and Spider Full, but the note states "Spider support is not yet available for Helm." This may confuse users about whether they can use Spider at all. Consider clarifying that Spider is available for Docker Compose only.

♻️ Suggested clarification
 ### Deployment types

 CLP supports multiple deployment configurations based on the compression scheduler and query engine.

 | Deployment Type | Compression Scheduler | Query Engine                 |
 |-----------------|-----------------------|------------------------------|
 | Base            | Celery                | [Presto][presto-integration] |
 | Full            | Celery                | Native                       |
 | Spider Base     | Spider                | [Presto][presto-integration] |
 | Spider Full     | Spider                | Native                       |

 :::{note}
-Spider support is not yet available for Helm.
+Spider-based deployment types (Spider Base and Spider Full) are currently only supported
+for Docker Compose deployments. Kubernetes/Helm support for Spider is planned for a future release.
 :::
🤖 Prompt for AI Agents
In @docs/src/dev-docs/design-deployment-orchestration.md around lines 245 - 258,
The "Spider" entries in the "Deployment types" section are ambiguous; update the
table or adjacent note under the "Deployment types" header to explicitly state
that Spider deployments (Spider Base and Spider Full) are supported only for
Docker Compose and are not supported for Helm; modify the note that currently
reads "Spider support is not yet available for Helm." to something like "Spider
deployments are supported for Docker Compose only; Helm support for Spider is
not yet available," and ensure the table rows for "Spider Base" and "Spider
Full" remain but align with this clarified note.


1. Check service status:
Docker Compose selects the appropriate compose file (e.g., `docker-compose.yaml` for Full,
`docker-compose-spider.yaml` for Spider Full) and uses `deploy.replicas` with environment
variables (e.g., `CLP_MCP_SERVER_ENABLED`) to toggle optional services. Helm uses conditional
templating to include/exclude resources.

```bash
docker compose --project-name clp-package-<instance-id> ps
```
## Troubleshooting

2. View service logs:
When issues arise, use the appropriate commands for your orchestration method:

```bash
docker compose --project-name clp-package-<instance-id> logs <service-name>
```
* [Docker Compose debugging][docker-compose-debugging]
* [Kubernetes Helm debugging][kubernetes-debugging]

Comment on lines +269 to 275

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Add context for troubleshooting links.

The Troubleshooting section provides links to debugging guides but doesn't explain what kinds of issues users might encounter or when to consult each guide. Consider adding brief context.

📋 Suggested improvement
 ## Troubleshooting

-When issues arise, use the appropriate commands for your orchestration method:
+When services fail to start, crash, or exhibit unexpected behaviour, use the appropriate
+debugging commands and techniques for your orchestration method:

 * [Docker Compose debugging][docker-compose-debugging]
 * [Kubernetes Helm debugging][kubernetes-debugging]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Troubleshooting
2. View service logs:
When issues arise, use the appropriate commands for your orchestration method:
```bash
docker compose --project-name clp-package-<instance-id> logs <service-name>
```
* [Docker Compose debugging][docker-compose-debugging]
* [Kubernetes Helm debugging][kubernetes-debugging]
## Troubleshooting
When services fail to start, crash, or exhibit unexpected behaviour, use the appropriate
debugging commands and techniques for your orchestration method:
* [Docker Compose debugging][docker-compose-debugging]
* [Kubernetes Helm debugging][kubernetes-debugging]
🤖 Prompt for AI Agents
In @docs/src/dev-docs/design-deployment-orchestration.md around lines 265 - 271,
Update the "Troubleshooting" section to add one or two succinct sentences before
the links that describe typical issues and when to use each guide—mention that
[docker-compose-debugging] is for local/service startup, container logs,
networking, and dependency issues in single-host setups, and that
[kubernetes-debugging] is for cluster-level problems like pod crashes,
scheduling, ingress, and Helm releases; reference the "Troubleshooting" heading
and the link tokens [docker-compose-debugging] and [kubernetes-debugging] so the
added context sits directly above those links.

3. Validate configuration:
## User guides

```bash
docker compose config
```
* [Kubernetes deployment][kubernetes-guide]: Deploying CLP with Helm
* [Multi-host deployment][docker-compose-multi-host]: Manual Docker Compose across multiple hosts

[docker-compose]: https://docs.docker.com/compose/
[docker-compose-debugging]: ../user-docs/guides-docker-compose-deployment.md#monitoring-and-debugging
[helm]: https://helm.sh/
[kubernetes]: https://kubernetes.io/
[kubernetes-debugging]: ../user-docs/guides-k8s-deployment.md#monitoring-and-debugging
[kubernetes-guide]: ../user-docs/guides-k8s-deployment.md
[docker-compose-multi-host]: ../user-docs/guides-docker-compose-deployment.md#multi-host-deployment
[presto-integration]: ../user-docs/guides-using-presto.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# Multi-host deployment
# Docker Compose deployment

This guide explains how to deploy CLP using Docker Compose. Docker Compose provides a
straightforward way to orchestrate CLP's services, suitable for both development and production
environments.

## Deployment options

Docker Compose can be used for:

* **Single-host deployment**: Run all CLP services on a single machine. This is the simplest setup,
covered in the [quick-start guides](quick-start/index.md).
* **Multi-host deployment**: Distribute CLP services across multiple machines for higher throughput
and scalability. This is covered in detail below.

---

## Multi-host deployment

A multi-host deployment allows you to run CLP across a distributed set of hosts.

:::{warning}
The instructions below provide a temporary solution for multi-host deployment and may change as we
actively work to improve ease of deployment. The present solution uses *manual* Docker Compose
orchestration; however, Kubernetes Helm support will be available in a future release, which will
simplify multi-host deployments significantly.
:::{note}
The instructions below use *manual* Docker Compose orchestration, which is more lightweight and
provides fine-grained control over service placement, but requires more configuration than
Helm-based deployments.
:::

## Requirements
Expand Down Expand Up @@ -305,9 +321,11 @@ sbin/stop-clp.sh

This will stop all CLP services managed by Docker Compose on the current host.

## Monitoring services
## Monitoring and debugging

To check the status of services on a host:
First, determine your instance ID from `<clp-package>/var/log/instance-id`.

To check the status of services:

```bash
docker compose --project-name clp-package-<instance-id> ps
Expand All @@ -319,6 +337,20 @@ To view logs for a specific service:
docker compose --project-name clp-package-<instance-id> logs -f <service-name>
```

To execute commands in a running container:

```bash
docker compose --project-name clp-package-<instance-id> exec <service-name> /bin/bash
```

To validate your Docker Compose configuration:

```bash
docker compose config
```

---

## Setting up SeaweedFS

The instructions below are for running a simple SeaweedFS cluster on a set of hosts. For other use
Expand Down
4 changes: 2 additions & 2 deletions docs/src/user-docs/guides-external-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ initialization jobs (`db-table-creator` and `results-cache-indices-creator`).

[aws-rds]: https://aws.amazon.com/rds/
[azure-databases]: https://azure.microsoft.com/en-us/products/category/databases
[docker-compose-orchestration]: ../dev-docs/design-deployment-orchestration.md#docker-compose-orchestration
[docker-compose-orchestration]: ../user-docs/guides-docker-compose-deployment.md
[mongodb-install]: https://www.mongodb.com/docs/manual/installation/
[mongodb-security]: https://docs.mongodb.com/manual/security/
[multi-host-guide]: guides-multi-host.md#starting-clp
[multi-host-guide]: guides-docker-compose-deployment.md#starting-clp
Loading