Skip to content

Add the computing unit managing service and k8s architecture - #3337

Merged
bobbai00 merged 117 commits into
masterfrom
jiadong-add-computing-unit-manager
Apr 6, 2025
Merged

bobbai00 merged 117 commits into
masterfrom
jiadong-add-computing-unit-manager

Conversation

@bobbai00

@bobbai00 bobbai00 commented Mar 24, 2025 •

Copy link
Copy Markdown
Contributor

Introduce Computing Unit Management Service and Kubernetes Architecture

Overview

This pull request introduces a ComputingUnitManagingService and integrates a Kubernetes-based architecture deployment of Texera.

Key Features

  1. ComputingUnitManagementService

    • Provides endpoints to manage the computing units(cu) lifecycles
    • Provides access control and rate limit of users using computing units.
  2. Kubernetes-based Deployment

    • Adds a helm chart that can launch the Texera on Kubernetes with few commands on both local development environment and production environment

Architecture Diagram

image

Benefits

  • Computation Isolation: in this architecture, each workflow execution is isolated in certain computing unit(a kubernetes pod)
  • Service Reliability and Elasticity: because of Kubernetes, each micro service can be scaled up, down, and restart very easily.

Future PR Plans

  1. Uniform the naming of the environment variables, e.g. adding TEXERA_ prefix to all of them
  2. Improve the Helm chart by removing the hard-coded values as much as possible
  3. Add a garbage collection mechanism for idle pods
  4. Add user execution quota
  5. Add with GPU option when creating the computing unit
  6. Fault Tolerance of an execution in the computing unit
  7. Generalize the physical entity of computing units, e.g. can be an EC2 instance like cloud mapper's use case.

@bobbai00
bobbai00 requested a review from shengquan-ni March 24, 2025 17:04
@bobbai00 bobbai00 self-assigned this Mar 24, 2025
@bobbai00
bobbai00 force-pushed the jiadong-add-computing-unit-manager branch from 7172812 to 593ab68 Compare March 26, 2025 00:14

@shengquan-ni shengquan-ni left a comment

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.

Let's merge this PR to unblock the release. We can fix bugs incrementally after this PR.

@shengquan-ni
shengquan-ni marked this pull request as ready for review April 6, 2025 00:23
@shengquan-ni shengquan-ni changed the title WIP: add the computing unit managing service and k8s architecture Add the computing unit managing service and k8s architecture Apr 6, 2025
@bobbai00
bobbai00 merged commit cffa080 into master Apr 6, 2025
@bobbai00
bobbai00 deleted the jiadong-add-computing-unit-manager branch April 6, 2025 04:32
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
…3337)

## Introduce Computing Unit Management Service and Kubernetes
Architecture

### Overview
This pull request introduces a **ComputingUnitManagingService** and
integrates a **Kubernetes-based architecture deployment** of Texera.

### Key Features
1. **ComputingUnitManagementService**
   - Provides endpoints to manage the computing units(cu) lifecycles
- Provides access control and rate limit of users using computing units.

2. **Kubernetes-based Deployment**
- Adds a helm chart that can launch the Texera on Kubernetes with few
commands on both local development environment and production
environment

### Architecture Diagram

![image](https://github.com/user-attachments/assets/efe0e20c-1985-4bd2-b545-dca07cfe3472)


### Benefits
- Computation Isolation: in this architecture, each workflow execution
is isolated in certain computing unit(a kubernetes pod)
- Service Reliability and Elasticity: because of Kubernetes, each micro
service can be scaled up, down, and restart very easily.

### Future PR Plans
1. Uniform the naming of the environment variables, e.g. adding
`TEXERA_` prefix to all of them
2. Improve the Helm chart by removing the hard-coded values as much as
possible
3. Add a garbage collection mechanism for idle pods
4. Add user execution quota
5. Add `with GPU` option when creating the computing unit
6. Fault Tolerance of an execution in the computing unit
7. Generalize the physical entity of computing units, e.g. can be an EC2
instance like cloud mapper's use case.

---------

Co-authored-by: Shengquan Ni <[email protected]>
Co-authored-by: Shengquan Ni <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…3337)

## Introduce Computing Unit Management Service and Kubernetes
Architecture

### Overview
This pull request introduces a **ComputingUnitManagingService** and
integrates a **Kubernetes-based architecture deployment** of Texera.

### Key Features
1. **ComputingUnitManagementService**
   - Provides endpoints to manage the computing units(cu) lifecycles
- Provides access control and rate limit of users using computing units.

2. **Kubernetes-based Deployment**
- Adds a helm chart that can launch the Texera on Kubernetes with few
commands on both local development environment and production
environment

### Architecture Diagram

![image](https://github.com/user-attachments/assets/efe0e20c-1985-4bd2-b545-dca07cfe3472)


### Benefits
- Computation Isolation: in this architecture, each workflow execution
is isolated in certain computing unit(a kubernetes pod)
- Service Reliability and Elasticity: because of Kubernetes, each micro
service can be scaled up, down, and restart very easily.

### Future PR Plans
1. Uniform the naming of the environment variables, e.g. adding
`TEXERA_` prefix to all of them
2. Improve the Helm chart by removing the hard-coded values as much as
possible
3. Add a garbage collection mechanism for idle pods
4. Add user execution quota
5. Add `with GPU` option when creating the computing unit
6. Fault Tolerance of an execution in the computing unit
7. Generalize the physical entity of computing units, e.g. can be an EC2
instance like cloud mapper's use case.

---------

Co-authored-by: Shengquan Ni <[email protected]>
Co-authored-by: Shengquan Ni <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Sep 28, 2026
…st (apache#8715)

### What changes were proposed in this PR?

Deletes `bin/pylsp/python-language-server.yaml`, a standalone Kubernetes
Deployment + Service for the Python language server that nothing
applies. It pulled a personal image (`jxzliu/pylsp:latest`) with a
`regcred` pull secret into a hard-coded `texera` namespace. **−61
lines.** There is no behaviour change: the Helm chart's own pylsp
template (`bin/k8s/templates/base/pylsp/pylsp.yaml`, image
`texera/pylsp`) is what actually deploys the server.
`bin/pylsp/Dockerfile` and `run_pylsp.sh`, which build that image, stay.

### History

| | |
| --- | --- |
| **Introduced by** | apache#3441 (2025-05-19), "Add `share-editing-server`
and `pylsp` dockerfiles to the deployment folder". It was moved
unchanged by apache#3883 and apache#3892 |
| **Usage removed by** | **never used**. No script, CI job, doc or
Dockerfile applies or copies it. The Helm pylsp template from apache#3337
(2025-04-05) predates it and has been the real deployment all along |

It has duplicated the Helm template since the day it was added, about
sixteen months ago. Its Service name (`python-language-server-service`)
doesn't even match the one the gateway routes to
(`python-language-server-svc`).

### Any related issues, documentation, discussions?

Closes apache#8714

### How was this PR tested?

No new tests; this deletes a deployment file that nothing reads.

- `bash bin/k8s/tests/test_helm_values.sh`: PASS (156 template value
references checked across 53 files).
- `git grep -n "python-language-server"`: the remaining hits are the
Helm pylsp values, the gateway route, and the language-server path and
port settings (`gui.conf`, the code editor, `pyright-language-service`).
None of them reference the deleted file.
- `bin/build-images.sh` builds `pylsp/Dockerfile` with context
`./pylsp`, and the Dockerfile copies only `run_pylsp.sh`, so the image
never contained the manifest.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 26, 2026
### What changes were proposed in this PR?

Remove code that nothing uses, or that repeats work already done, across
16 files in the frontend, Amber, the shared config and observability
modules, and the sbt license helper (**+22/−152 lines**). There is no
behavior change.

- **`PresetService`:** `getOperatorPreset`,
`filterOperatorPresetProperties` and the private `ajvStrip` validator
they share have no caller outside their own spec. Their two spec blocks
go with them.
- **`UserConfigService`:** `set` and `delete` return their request
observables, and no caller reads them; `PresetService`, the only caller,
discards both. They now return `void`, so the `shareReplay` carriers and
the `of` import go. Each call still sends its request once and updates
the local dictionary when the request succeeds.
- **Resource registry:** `ResourceDescriptor.setCover` and its dataset
and model implementations have no caller outside the registry's own
spec. The dataset and model pages set a cover through
`DatasetService.updateDatasetCoverImage` and
`ModelService.updateModelCoverImage` directly. The spec drops its
`setCover` call, the matching assertion and the `updateModelCoverImage`
stub, and the workflow descriptor's comment stops naming the hook.
- **`StorageConfig`:** 12 JDBC, Iceberg and S3 name constants that
nothing reads. Every reader, such as `ComputingUnitManagingResource`,
uses the same names from `EnvironmentalVariable`. The four cleanup and
warehouse constants stay, because `StorageConfigSpec` reads them.
- **Telemetry:** `WorkflowMetricsRecorder.init` calls
`WorkflowMetrics.ensureBound()` right after
`setActiveExecutionsSupplier`, which already calls it.
`OtelInit.initialized` only ever holds an `OpenTelemetrySdk`, so it is
now typed that way, and `resetForTest` loses a fallback arm that could
not run.
- **`CollaborationResource`:** the `heartbeat`, `tryLock`, `acquireLock`
and `restoreVersion` patterns bind names that their bodies never read,
so each becomes `_`.
- **Result table:** nothing reads the `#statsRow` template reference.
- **`search-results.component.spec.ts`:** the card-template host imports
`NgTemplateOutlet`, which its template never uses.
- **`TexeraWebApplication`:** drops a commented-out call to
`discardUncommittedChangesOfAllDatasets` and its TODO. That method no
longer exists.
- **`AddMetaInfLicenseFiles`:** drops `import
com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport._`, which
nothing in the helper uses.

| Event | PR / Commit |
| --- | --- |
| Introduced by | `PresetService`: apache#1164 (2022-01-14);
`UserConfigService`: apache#1162 (2021-06-27); resource registry: apache#8299
(2026-08-31); `StorageConfig`: apache#3337 (2025-04-06); telemetry: apache#5375
(2026-10-25) and apache#5376 (2026-10-27); `CollaborationResource`: apache#1427
(2022-02-15); result table: apache#2931 (2024-10-14); search results spec:
apache#6565 (2026-07-20); `TexeraWebApplication`: apache#2391 (2024-02-20),
commented out by apache#2733 (2024-07-15); `AddMetaInfLicenseFiles`: apache#4367
(2026-04-17) |
| Usage removed by | `TexeraWebApplication`: apache#3314 (2025-03-12) deleted
`discardUncommittedChangesOfAllDatasets`. `AddMetaInfLicenseFiles`:
apache#4449 (2026-04-29) removed the last `Universal` reference. Everything
else: unused since introduction. |

As of 2026-11-25:
- No caller has read the `UserConfigService` return values in the more
than 5 years since they were added.
- The two `PresetService` helpers have had no caller outside their spec
for almost 5 years, and the `CollaborationResource` bindings have been
unused for as long.
- The `#statsRow` reference has been unread for over 2 years.
- The commented call has pointed at a deleted method, and the
`StorageConfig` constants have been unread, for over a year and a half
each.
- The Universal import has been unused for almost 7 months.
- The `setCover` hook has had no caller in the almost 3 months it has
existed, and the telemetry duplicates have done nothing in the month
since they were added.

### Any related issues, documentation, discussions?

Closes apache#9695.

### How was this PR tested?

Ran on this branch and on `main` at `d1a0c5e673` (Windows 11; Node 24
with Yarn 4.14.1; JDK 17):

```bash
cd frontend
npx ng test --watch=false --include='**/preset.service.spec.ts' --include='**/user-config.service.spec.ts' --include='**/preset-wrapper.component.spec.ts' --include='**/result-table-frame.component.spec.ts' --include='**/search-results.component.spec.ts' --include='**/resource-registry.service.spec.ts'
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src)
cd ..
sbt Config/test Observability/test "WorkflowExecutionService/testOnly org.apache.texera.web.resource.CollaborationResourceSpec org.apache.texera.web.observability.WorkflowMetricsRecorderSpec"
sbt Config/scalafmtCheckAll Observability/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "Config/scalafixAll --check" "Observability/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check"
```

- **Frontend:** the six specs run 199 tests on this branch and 206 on
`main`, all passing. The 7 extra on `main` are the deleted helpers' own
spec cases; every other test keeps its name and outcome. Both
typechecks, prettier-eslint and ESLint pass.
- **Scala:** the `Config` and `Observability` suites and the two Amber
specs run 212 tests, all passing on both sides with the same names and
outcomes. scalafmt and scalafix pass for all three projects.
- Every sbt run compiles the build definition, so
`AddMetaInfLicenseFiles.scala` compiled with and without the import.

To re-check, both commands return no hits on this branch:

```bash
git grep -nwE "getOperatorPreset|filterOperatorPresetProperties|ajvStrip|setCover" -- frontend/src
git grep -nE "ENV_(JDBC|ICEBERG|S3)_" -- common/config/src/main/scala/org/apache/texera/common/config/StorageConfig.scala
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants