Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
aa64df9
feat(deployment): Add k8s Helm chart for CLP package deployment.
junhaoliao Nov 14, 2025
b13eadb
Add reducer service and deployment to Helm chart.
junhaoliao Nov 16, 2025
c0c9d02
Replace hostPath volumes with PersistentVolumeClaims in Helm chart; f…
junhaoliao Nov 16, 2025
8bfd5e1
update test.sh
junhaoliao Nov 16, 2025
a3a1356
update test.sh
junhaoliao Nov 16, 2025
37000f6
Update readiness probe timeoutSeconds to 1.
junhaoliao Nov 16, 2025
34b3dca
feat(deployment): Add deployments for MCP server, API server, and gar…
junhaoliao Nov 16, 2025
a266427
feat(deployment): Add liveness and readiness probes to API server dep…
junhaoliao Nov 16, 2025
a1afc7f
Simplify service templates with conditional NodePort configuration.
junhaoliao Nov 16, 2025
e3d78a4
Add named ports in Helm templates for standardization.
junhaoliao Nov 16, 2025
f679f38
fix nodePort 's value
junhaoliao Nov 16, 2025
3108eca
fix(helm): Update default port values in configmap for query schedule…
junhaoliao Nov 16, 2025
597de93
remove comment
junhaoliao Nov 16, 2025
9c68929
Rename `user` to `username` across all components
junhaoliao Nov 16, 2025
1f6a5f0
refactor(helm): Split secrets into component-specific files; remove r…
junhaoliao Nov 16, 2025
89af695
Replace `clp-package` references with `clp` across templates.
junhaoliao Nov 16, 2025
ca7d820
split yamls
junhaoliao Nov 16, 2025
0b8ef72
exclude helm directory from yaml lint
junhaoliao Nov 16, 2025
9b5b53b
fix templates
junhaoliao Nov 16, 2025
c1dccd6
fix(helm): Update maintainer name in Chart.yaml.
junhaoliao Nov 16, 2025
236c024
fix(helm): Set default tag to "nightly" for clpPackage.
junhaoliao Nov 16, 2025
5aa26cd
Add Helm linting and toolchain support
junhaoliao Nov 16, 2025
2ab3e74
fix(helm): Rename `user` to `username` in query-worker-deployment tem…
junhaoliao Nov 16, 2025
2ac391b
refactor(helm): Rename PVC and PV files; add tmp-pvc definition.
junhaoliao Nov 16, 2025
f1f3a54
refactor(helm): Remove localPathBase; redefine directory paths for st…
junhaoliao Nov 16, 2025
832eb19
refactor(helm): Consolidate PersistentVolume templates into `createLo…
junhaoliao Nov 16, 2025
d2b4671
refactor(helm): Rename PVC and PV template files for consistency.
junhaoliao Nov 17, 2025
8985355
refactor(helm): Simplify PV and secret object names for consistency.
junhaoliao Nov 17, 2025
75c0101
refactor(helm): Consolidate PVC definitions into `createPvc` and stre…
junhaoliao Nov 17, 2025
a47741a
Merge branch 'main' into helm
junhaoliao Nov 17, 2025
1476b71
Add user-logs PVC and PV definitions.
junhaoliao Nov 17, 2025
ad82e25
fix(helm): Remove unnecessary image tag override in test script.
junhaoliao Nov 17, 2025
29fe3c0
feat(helm): Add conditional database image selection based on configu…
junhaoliao Nov 17, 2025
c5bb582
feat(helm): Add persistentVolumeClaimRetentionPolicy to statefulsets.
junhaoliao Nov 17, 2025
db9cef9
feat(helm): Add ttlSecondsAfterFinished to job templates.
junhaoliao Nov 17, 2025
1503c49
feat(deployment): set up initial Helm chart for CLP package:
junhaoliao Nov 17, 2025
2b8052f
chore(deployment): remove pod watch from test script.
junhaoliao Nov 17, 2025
0b4c4fd
chore(deployment): update chart-testing config to set target branch.
junhaoliao Nov 17, 2025
f12557d
quote string
junhaoliao Nov 17, 2025
5713eb3
fix missing yamale
junhaoliao Nov 17, 2025
fa2522e
quote string
junhaoliao Nov 17, 2025
8d176fe
fix missing yamale
junhaoliao Nov 17, 2025
e1fe436
chore(ci): Set fetch-depth to 0 in clp-lint workflow.
junhaoliao Nov 17, 2025
e4c0f22
fix(deployment): Adjust readinessProbe timeout and failure threshold.
junhaoliao Nov 17, 2025
649848d
Merge branch 'main' into helm-setup
junhaoliao Nov 17, 2025
83770ef
Merge branch 'main' into helm-setup
kirkrodrigues Nov 18, 2025
7fe32b7
chore(ci): Add comment explaining fetch-depth requirement in clp-lint…
junhaoliao Nov 21, 2025
129cc17
Merge branch 'main' into helm-setup
junhaoliao Nov 21, 2025
6c89ed6
Reformat database Job initContainer command for readability.
junhaoliao Nov 21, 2025
e40d239
Update database livenessProbe to include authentication parameters.
junhaoliao Nov 21, 2025
f17264e
alphabetize
junhaoliao Nov 21, 2025
f51b97e
Adjust probe timings for readiness and liveness checks.
junhaoliao Nov 21, 2025
8ed32a7
add url to maintainers - Apply suggestions from code review
junhaoliao Nov 21, 2025
45674e2
Standardize version field placement in Chart.yaml.
junhaoliao Nov 21, 2025
2ad9b0a
Adjust livenessProbe periodSeconds to 30.
junhaoliao Nov 21, 2025
5d5bd27
Swap liveness and readiness probe configurations in database-stateful…
junhaoliao Nov 21, 2025
fb2d287
Update all `.yml` extensions to `.yaml` for consistency
junhaoliao Nov 22, 2025
5dd3ab4
Merge branch 'helm-setup' into helm
junhaoliao Nov 25, 2025
a155ba3
Update configuration file extensions from .yml to .yaml for consistency
junhaoliao Nov 25, 2025
be9afb3
Refactor liveness and readiness probes across multiple deployment fil…
junhaoliao Nov 25, 2025
762acb9
Merge branch 'main' into helm
junhaoliao Nov 25, 2025
387ad2f
Add workerConcurrency setting to values.yaml
junhaoliao Nov 25, 2025
d2a4357
Set replicas to 1 for compression and query workers
junhaoliao Nov 25, 2025
d4f3c81
upgrade yamale to 6.1.0 - Apply suggestions from code review
junhaoliao Nov 26, 2025
1515d0d
Add chart-testing SHA256 checksum for Linux ARM64 architecture in too…
junhaoliao Nov 26, 2025
dd35d68
Remove redundant chart schema and lint validation check settings beca…
junhaoliao Nov 26, 2025
fe69119
Merge remote-tracking branch 'refs/remotes/origin/main' into helm-setup
junhaoliao Nov 26, 2025
5296f31
Remove the unneeded `chmod u+x` from the helm env source script - App…
junhaoliao Nov 26, 2025
2c41251
use chart-yaml-schema from the downloaded toolchain
junhaoliao Nov 26, 2025
0931136
Remove chart_schema.yaml from lint.yaml
junhaoliao Nov 26, 2025
dd70f5c
Assign `nodeRole` for database persistent volumes to target control-p…
junhaoliao Nov 27, 2025
ea06268
Improve waiting prompts - Apply suggestions from code review
junhaoliao Nov 27, 2025
ba5d4df
update helm chart description - Apply suggestions from code review
junhaoliao Nov 27, 2025
8b44dd6
update docs - Apply suggestions from code review
junhaoliao Nov 27, 2025
9ff1611
Rename `allowSbinScripts` to `allowHostAccessForSbinScripts` for clea…
junhaoliao Nov 27, 2025
0140971
update test script shebang, update TODO comment, set eu pipefail - Ap…
junhaoliao Nov 27, 2025
44bd1af
Make image pull policy configurable for db-table-creator job in Helm …
junhaoliao Nov 27, 2025
72013ed
Add JSDoc-style comments for helper templates in Helm chart
junhaoliao Nov 27, 2025
550e7a9
Merge branch 'main' into helm-setup
junhaoliao Nov 27, 2025
1452795
improve docs - Apply suggestions from code review
junhaoliao Nov 27, 2025
480c14b
Remove unused `createPvc` helper definition from Helm templates
junhaoliao Nov 27, 2025
4142856
Update helm toolchain output directory to use `G_HELM_TOOLCHAIN_DIR`
junhaoliao Nov 27, 2025
036222f
Remove `ct.yaml` and inline configuration in `lint.yaml` for clarity
junhaoliao Nov 27, 2025
e258b3d
Merge branch 'main' into helm-setup
junhaoliao Nov 27, 2025
bda53c1
Merge branch 'main' into helm-setup
junhaoliao Nov 27, 2025
c7789f8
Merge branch 'helm-setup' into helm
junhaoliao Nov 28, 2025
476526c
Merge branch 'main' into helm
junhaoliao Nov 28, 2025
bfa2ea3
update values.yaml with the latest clp-config.yaml
junhaoliao Nov 28, 2025
93fcbfe
Assign `nodeRole` to persistent volumes for control-plane targeting.
junhaoliao Nov 28, 2025
7a1fff4
add back helper to create PersistentVolumeClaim templates.
junhaoliao Nov 28, 2025
ba6abb4
fix(helm): Rename values flag for sbin script access in results cache…
junhaoliao Nov 28, 2025
b25b243
refactor(helm): Update initContainer command syntax for better readab…
junhaoliao Nov 28, 2025
4ef25b5
refactor(helm): Use configurable image pull policy for deployments.
junhaoliao Nov 28, 2025
0ca3173
revert db port
junhaoliao Nov 28, 2025
e57243b
Merge branch 'main' into helm
junhaoliao Nov 29, 2025
399373f
refactor(helm): Remove redundant host field from configuration values.
junhaoliao Nov 29, 2025
0bb706b
remove empty line
junhaoliao Nov 29, 2025
7f90a85
Update image tag to 'main' and pull policy to 'Always' in values.yaml.
junhaoliao Nov 29, 2025
39fdcd6
feat(deployment): Add redis, queue (RabbitMQ), and results cache (Mon…
junhaoliao Nov 29, 2025
72024e4
chore(deployment): Bump Helm chart version to 0.1.1.
junhaoliao Nov 29, 2025
4fb6dd4
add empty newline at EOF
junhaoliao Nov 29, 2025
1f4df0c
docs(deployment): Reorder parameters in Helm helper function document…
junhaoliao Nov 29, 2025
2bbccca
Merge branch 'dbs' into helm
junhaoliao Nov 29, 2025
683f03b
fix(helm): Simplify syntax for redis livenessProbe exec configuration.
junhaoliao Nov 29, 2025
abc02ca
Merge branch 'main' into helm
junhaoliao Dec 3, 2025
1b93ccc
Merge branch 'main' into helm
junhaoliao Dec 8, 2025
33ea69a
Update port names for services and deployments.
junhaoliao Dec 8, 2025
7a52e6c
chore(helm): Bump chart version to 0.1.2-dev.3
junhaoliao Dec 8, 2025
abb1cf8
feat(helm): Add `max_concurrent_tasks_per_job` parameter to compressi…
junhaoliao Dec 8, 2025
3bf2d94
Update configmap webui settings
junhaoliao Dec 8, 2025
0195c05
Make `StreamTargetUncompressedSize` configurable via values file
junhaoliao Dec 8, 2025
af2a04b
avoid encoding u64 as float
junhaoliao Dec 8, 2025
0a8707d
feat(helm): Add conditional storage_engine configuration to configmap
junhaoliao Dec 8, 2025
eeb0fc2
fix(helm): Update reducer base_port to a fixed value in configmap and…
junhaoliao Dec 8, 2025
696ea80
fix(helm): Replace hardcoded sample file copy with dynamic download a…
junhaoliao Dec 8, 2025
356f336
remove compression-scheduler-service.yaml
junhaoliao Dec 8, 2025
7bd5558
Download and extract sample datasets in the background during test setup
junhaoliao Dec 8, 2025
ddb98c0
feat(test): Add hostPath mount for /home in test setup
junhaoliao Dec 8, 2025
c0d6a5a
fxi: make Web UI rate limit configurable in Helm chart
junhaoliao Dec 9, 2025
7d6cf4f
feat(helm): Add support for root database credentials in Helm templates.
junhaoliao Dec 10, 2025
8f695d9
feat(helm): Refactor init containers to use shared `clp.waitFor` help…
junhaoliao Dec 12, 2025
b231898
feat(helm): Refactor PersistentVolume and PersistentVolumeClaim templ…
junhaoliao Dec 12, 2025
44b0f17
feat(helm): Add shared helpers for Celery environment variables and i…
junhaoliao Dec 12, 2025
a9e6d09
feat(helm): Update hostPath in PersistentVolume templates for consist…
junhaoliao Dec 12, 2025
9279032
fix(test): Correct temp directory structure and ensure Redis database…
junhaoliao Dec 12, 2025
2d92641
Merge branch 'main' into helm
junhaoliao Dec 12, 2025
8580c11
refactor(helm): Reorder volumeMounts in StatefulSet templates for con…
junhaoliao Dec 12, 2025
1c26692
refactor(helm): Update templates to replace `component` with `compone…
junhaoliao Dec 14, 2025
a0cbb98
refactor(helm): Standardize indentation and list formatting in templa…
junhaoliao Dec 14, 2025
e44f8b9
Merge branch 'main' into helm
junhaoliao Dec 14, 2025
7447430
Merge branch 'main' into helm
junhaoliao Dec 16, 2025
8beb8e0
feat(helm): Add S3 support for storage configurations and AWS authent…
junhaoliao Dec 18, 2025
e9868f4
Merge branch 'main' into helm
junhaoliao Dec 18, 2025
41f0348
refactor(helm): Reorganize volumeMounts and environment variables for…
junhaoliao Dec 19, 2025
3363229
feat(helm): Add log_ingestor configuration for S3 log input support
junhaoliao Dec 19, 2025
17e2fc2
feat(helm): Add `type` configuration to compression_scheduler for tas…
junhaoliao Dec 19, 2025
2300cc5
feat(helm): Add log-ingestor deployment, service, and volume configur…
junhaoliao Dec 19, 2025
0e34c78
refactor(helm): Replace `database.name` with `database.names.clp`
junhaoliao Dec 19, 2025
50906ea
fix(helm): Update S3 profile condition to include storage type valida…
junhaoliao Dec 19, 2025
748c176
feat(helm): Add mcp_server configuration support in configmap template
junhaoliao Dec 19, 2025
b807445
chore(helm): Update api-server RUST_LOG environment variable to use "…
junhaoliao Dec 19, 2025
25c9003
feat(helm): Add readiness and liveness probes to query-scheduler depl…
junhaoliao Dec 19, 2025
e3a34e9
fix(helm): Correct indentation for logsInputVolumeMount in webui-depl…
junhaoliao Dec 19, 2025
dc878b9
feat(helm): Add S3 storage type support for query-worker staged strea…
junhaoliao Dec 19, 2025
bdcfb5e
feat(helm): Add Presto configuration support in values.yaml and confi…
junhaoliao Dec 19, 2025
6ad5757
feat(helm): Add conditional checks for api-server and garbage-collect…
junhaoliao Dec 19, 2025
77743e7
fix(helm): Remove unused `port` field from query_scheduler configurat…
junhaoliao Dec 19, 2025
4e0cd58
feat(helm): Add support for container port 30302 in query-scheduler d…
junhaoliao Dec 19, 2025
43da85a
fix(helm): Add missing log_ingestor directory to test script
junhaoliao Dec 19, 2025
ffcd412
fix(helm): Simplify S3 credentials configuration in webui-deployment …
junhaoliao Dec 19, 2025
aee79bc
fix(helm): Correct placement of readiness and liveness probes in quer…
junhaoliao Dec 19, 2025
a9cdedd
fix(helm): Refactor configmap template to improve conditional handlin…
junhaoliao Dec 19, 2025
3a5968a
fix(helm): Use `with` for aws_config_directory in webui-deployment te…
junhaoliao Dec 19, 2025
753d402
fix(helm): Replace `if` with `with` for aws_config_directory in deplo…
junhaoliao Dec 19, 2025
896cb31
fix(helm): Update accessModes to ReadWriteOnce in PVC and PV template…
junhaoliao Dec 19, 2025
5c81b0f
fix(helm): Add missing quotes for host fields in configmap template t…
junhaoliao Dec 19, 2025
f9a507d
fix(helm): Remove S3-specific PVC/PV and volume mounts for staged-str…
junhaoliao Dec 19, 2025
ee248a1
fix(helm): Add `| quote` and handle null case for aws_config_director…
junhaoliao Dec 19, 2025
be70bd3
fix(helm): Add conditional for logsInputVolumeMount in webui-deployme…
junhaoliao Dec 19, 2025
c346734
fix(helm): Add conditional for logsInputVolume in compression-schedul…
junhaoliao Dec 19, 2025
80251dc
fix(helm): Correct placement of logsInputVolume and pvcVolume conditi…
junhaoliao Dec 19, 2025
82dc4d7
fix(helm): Add int casting for numerical values in configmap template…
junhaoliao Dec 19, 2025
8709443
fix(helm): Adjust volume mounts and conditionals for staged archives …
junhaoliao Dec 19, 2025
7443e4e
fix(helm): Correct placement of config volume mounts across deploymen…
junhaoliao Dec 19, 2025
b32613b
chore(helm): Bump chart version to 0.1.2-dev.8
junhaoliao Dec 19, 2025
3b411a7
fix(helm): Handle null case for log_ingestor and update default clpCo…
junhaoliao Dec 19, 2025
1f82b19
docs(helm): Update deployment guides for Docker Compose and add ones …
junhaoliao Dec 24, 2025
ee75a28
feat(helm): Add node affinity and topology spread constraints for mul…
junhaoliao Dec 24, 2025
7469e5c
fix(helm): Update default storage and query engine values in `values.…
junhaoliao Dec 26, 2025
0b8a695
docs: Improve orchestration docs and fix broken links in deployment g…
junhaoliao Dec 26, 2025
eb55b31
feat(helm): Proper multi-node support: Refactor storage provisioning …
junhaoliao Dec 26, 2025
39e9069
docs(helm): Update Kubernetes deployment guide to improve worker sche…
junhaoliao Dec 26, 2025
46587a9
fix(helm): update termination grace period for api-server and mcp-ser…
junhaoliao Jan 5, 2026
1c4807f
fix(helm): update query scheduler health checks to use named port for…
junhaoliao Jan 5, 2026
905677c
fix order
junhaoliao Jan 5, 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.

## 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
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.
:::

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.
:::

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]

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
Loading