Repository navigation
docs(spider): Add a user guide for deploying Spider and related components with the CLP Helm chart. #2457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(spider): Add a user guide for deploying Spider and related components with the CLP Helm chart. #2457
Changes from 8 commits
4e3fd4d
a4139dd
5809bc4
cfb5edc
fbb81b2
3b9f252
fdce5d3
48ee986
a57241e
79286ef
ecab327
395ef29
f97535c
6e8016f
24f40c0
c729248
a392dac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,198 @@ | ||
| # Using Spider scheduler | ||
|
|
||
| [Spider][spider] is a distributed task scheduling and execution framework. It schedules tasks across | ||
| configured workers and manages their execution lifecycle. | ||
|
|
||
| CLP uses Spider as its next-generation framework for orchestrating compression and search jobs, | ||
| providing the following benefits: | ||
|
|
||
| * **Improved fault tolerance** | ||
| * **Minimized scheduling overhead** | ||
| * **Maximized utilization of compute resources** | ||
|
|
||
| :::{note} | ||
| In the current release, CLP uses Spider only for compression jobs coordinated by | ||
| `compression-coordinator`. Support for orchestrating search jobs with Spider is under development | ||
| and will be introduced in a future release. | ||
|
|
||
| Spider is planned to become the default job execution framework for CLP, eventually replacing the | ||
| existing Celery-based job orchestration components. | ||
| ::: | ||
|
|
||
| ## Deployment | ||
|
|
||
| When Spider is enabled, compatible CLP coordinators are automatically deployed and submit supported | ||
| jobs to Spider for scheduling and execution. Currently, Spider and its related CLP components can be | ||
| enabled only in [Kubernetes deployments][k8s-deployment] using the CLP Helm chart. | ||
|
|
||
| :::{note} | ||
| Spider is not supported in Docker Compose deployments in the current release. Support for Docker | ||
| Compose is planned for a future release. | ||
| ::: | ||
|
|
||
| ### Kubernetes (Helm) | ||
|
|
||
| When deploying CLP on Kubernetes using Helm, enable Spider by setting `spider.enabled` to `true`. | ||
| The CLP Helm chart will then automatically deploy the following components: | ||
|
|
||
| * **Spider subchart**: Deploys all the Spider services required to schedule and execute jobs. | ||
| * **compression-coordinator**: Coordinates supported CLP compression jobs and submits them to | ||
| Spider for execution. | ||
|
|
||
| :::{note} | ||
| In the current release, `compression-coordinator` supports only compression jobs that use certain | ||
| CLP package configurations. See "Using compression-coordinator" for the current limitations. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once #2456 is merged we should refer to the coordinator's guide.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to myself, do a pass after all deps PRs are merged
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually we should probably merge this PR first since it's self-contained. #2456 will refer to content in this PR as well but it needs to refer to specific sections.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, but be sure to add linking in the content we wrote in this PR back in #2456, for example, "Using compression-coordinator" in this sentence right here worth a link
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I will add it after this PR is merged. |
||
| ::: | ||
|
|
||
| #### Set up | ||
|
|
||
| 1. Create a values file to enable Spider and its related CLP components. | ||
|
|
||
| ```{code-block} yaml | ||
| :caption: spider-values.yaml | ||
|
|
||
| spider: | ||
| enabled: true | ||
|
|
||
| # Optional Spider configuration passed directly to the Spider subchart. | ||
| # The values below are the defaults and can be adjusted as needed. | ||
| spiderConfig: | ||
| storage: | ||
| log_level: "INFO" | ||
| port: 50051 | ||
| scheduler: | ||
| log_level: "INFO" | ||
| worker: | ||
| replicas: 4 | ||
|
|
||
| clpConfig: | ||
| # Optional `compression-coordinator` configuration. | ||
| # The values below are the defaults and can be adjusted as needed. | ||
| compression_coordinator: | ||
| logging_level: "INFO" | ||
| # How often the coordinator checks for newly created compression jobs. | ||
| job_polling_interval_millisecs: 100 | ||
| # Maximum number of times a failed compression task can be retried. | ||
| compression_task_max_retry: 1 | ||
| # Maximum number of times a failed commit task can be retried. | ||
| commit_task_max_retry: 1 | ||
|
20001020ycx marked this conversation as resolved.
Resolved
|
||
|
|
||
| logs_input: | ||
| # In the current release, compression jobs coordinated by `compression-coordinator` require | ||
| # input logs to be stored in S3. | ||
| type: "s3" | ||
| aws_authentication: | ||
| type: "credentials" | ||
| credentials: | ||
| access_key_id: "<access-key-id>" | ||
| secret_access_key: "<secret-access-key>" | ||
|
|
||
| archive_output: | ||
| storage: | ||
| # In the current release, `compression-coordinator` supports only S3 archive output. | ||
| type: "s3" | ||
| s3_config: | ||
| region_code: "us-east-2" | ||
| bucket: "<archives-bucket>" | ||
| key_prefix: "archives/" | ||
| aws_authentication: | ||
| type: "credentials" | ||
| credentials: | ||
| access_key_id: "<access-key-id>" | ||
| secret_access_key: "<secret-access-key>" | ||
|
20001020ycx marked this conversation as resolved.
Resolved
|
||
| ``` | ||
|
|
||
| 2. Install (or upgrade) the Helm chart with the Spider values: | ||
|
|
||
| ```bash | ||
| helm install clp clp/clp DOCS_VAR_HELM_VERSION_FLAG -f spider-values.yaml | ||
| ``` | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| 3. Verify that `compression-coordinator` and Spider pods are running: | ||
|
|
||
| ```bash | ||
| kubectl get pods | grep -E "spider|compression-coordinator" | ||
| ``` | ||
|
|
||
| The pods may take a few minutes to become ready. During startup, some Spider pods may restart | ||
| while the Spider database is being initialized. A small number of restarts during this period is | ||
| expected. | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| The output should include pods similar to the following: | ||
|
20001020ycx marked this conversation as resolved.
Resolved
|
||
|
|
||
| ```text | ||
| NAME READY STATUS RESTARTS AGE | ||
| clp-compression-coordinator-... 1/1 Running 0 5m | ||
| clp-spider-database-0 1/1 Running 0 5m | ||
| clp-spider-scheduler-... 1/1 Running 2 5m | ||
| clp-spider-storage-... 1/1 Running 2 5m | ||
| clp-spider-worker-... 1/1 Running 2 5m | ||
| ``` | ||
|
|
||
| ## Configure Spider | ||
|
|
||
| Spider can be configured to meet the resource, storage, and authentication requirements of your | ||
| workload. This section describes commonly adjusted settings for Spider in a CLP deployment, followed | ||
| by options for more advanced performance tuning. | ||
|
|
||
| Configure these settings in the CLP Helm values file. | ||
|
|
||
| ### Common settings | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A note for myself, add external database set up config in #2493 |
||
|
|
||
| The following settings are commonly adjusted when deploying Spider with CLP. | ||
|
|
||
| :::{confval} spider.enabled | ||
| :type: `bool` | ||
| :default: `false` | ||
|
|
||
| Enables Spider and deploys its related CLP components. | ||
| ::: | ||
|
|
||
| :::{confval} spider.spiderConfig.worker.replicas | ||
| :type: `int` | ||
| :default: 4 | ||
|
|
||
| Sets the number of Spider worker pods to deploy. Increase this value to allow more tasks to run | ||
| concurrently. | ||
| ::: | ||
|
|
||
| :::{confval} spider.spiderConfig.worker.extra_volumes | ||
| :type: `list` | ||
| :default: Chart-defined defaults | ||
|
|
||
| Adds volumes to the Spider worker pods. | ||
|
|
||
| When overriding this list, retain the default entries that mount the CLP configuration and staging | ||
| directory. | ||
| ::: | ||
|
|
||
| :::{confval} spider.spiderConfig.worker.extra_volume_mounts | ||
| :type: `list` | ||
| :default: Chart-defined defaults | ||
|
|
||
| Adds the volume mounts corresponding to {confval}`spider.spiderConfig.worker.extra_volumes` to the | ||
| Spider worker pods. | ||
|
|
||
| When overriding this list, retain the default entries that mount the CLP configuration and staging | ||
| directory. | ||
| ::: | ||
|
20001020ycx marked this conversation as resolved.
Resolved
|
||
|
|
||
| :::{confval} spider.spiderConfig.worker.service_account_name | ||
| :type: `string` | ||
| :default: The CLP `ServiceAccount` | ||
|
|
||
| Specifies the Kubernetes `ServiceAccount` assigned to the Spider worker pods. | ||
|
|
||
| On Amazon EKS, configure this service account with the appropriate AWS permissions when Spider | ||
| workers need to access AWS resources. See [this guide][aws-eks-service-accounts] for details. | ||
| ::: | ||
|
20001020ycx marked this conversation as resolved.
Resolved
|
||
|
|
||
| ### Advanced tuning | ||
|
|
||
| :::{warning} | ||
| 🚧 This section is still under construction. | ||
| ::: | ||
|
20001020ycx marked this conversation as resolved.
Resolved
|
||
|
|
||
| [aws-eks-service-accounts]: https://docs.aws.amazon.com/eks/latest/userguide/service-accounts.html | ||
| [k8s-deployment]: guides-k8s-deployment.md | ||
| [spider]: https://github.com/y-scope/spider | ||
Uh oh!
There was an error while loading. Please reload this page.