You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-24Lines changed: 46 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,47 +1,71 @@
1
-
# 🤖 bobrapet - Kubernetes-Native AI Workflow Engine
1
+
# 🤖 bobrapet - A Declarative, Kubernetes-Native AI Workflow Engine
2
2
3
-
> **Declarative, Composable, Cloud-Native AI Workflows**
4
-
5
-
Bobrapet is a Kubernetes-native workflow engine designed specifically for AI and data processing workloads. It uses Custom Resource Definitions (CRDs) to define, execute, and manage complex, multi-step workflows directly within your Kubernetes cluster.
3
+
Bobrapet is a powerful, cloud-native workflow engine for orchestrating complex AI and data processing pipelines on Kubernetes. It leverages the declarative power of Custom Resource Definitions (CRDs) to let you define, manage, and execute multi-step, event-driven workflows with unparalleled flexibility and control.
6
4
7
5
## 🌟 Key Features
8
6
9
-
-**Declarative Workflows**: Define complex pipelines as Kubernetes resources (`Story`).
10
-
-**Composable Components**: Package reusable tasks as `Engrams`, backed by versioned, cluster-scoped `EngramTemplates`.
11
-
-**Flexible Triggers**: Initiate workflows from events using `Impulses`, backed by `ImpulseTemplates`.
12
-
-**Full Observability**: Track the state of every workflow (`StoryRun`) and each individual step (`StepRun`).
13
-
-**Cross-Namespace Support**: Orchestrate workflows that span multiple Kubernetes namespaces, enabling multi-tenant and shared service models.
7
+
-**Declarative & GitOps-Friendly**: Define your entire workflow as a `Story` resource. Treat your AI pipelines as code and manage them through GitOps.
8
+
-**Advanced DAG Orchestration**: A sophisticated Directed Acyclic Graph (DAG) engine orchestrates your steps, enabling complex dependencies and execution flows.
9
+
-**Parallel-by-Default Execution**: For maximum performance, independent steps run in parallel automatically. Use the `needs` keyword to define an explicit execution order.
10
+
-**Dynamic Control Flow**: Implement powerful logic directly in your workflows with built-in primitives and Common Expression Language (CEL) for `if` conditions.
11
+
-**Composable & Reusable Components**: Package reusable tasks as `Engrams`, backed by versioned, cluster-scoped `EngramTemplates` for consistency.
12
+
-**Flexible Streaming Strategies**: Optimize for long-running tasks with `PerStory` (always-on) or `PerStoryRun` (on-demand) resource allocation.
13
+
-**Cross-Namespace Orchestration**: Securely reference resources and orchestrate workflows across multiple Kubernetes namespaces.
14
+
-**Event-Driven Triggers**: Initiate workflows from various event sources using `Impulses`.
15
+
16
+
## 🏗️ Architecture
17
+
18
+
The `bobrapet` operator is engineered for robustness and maintainability, following best practices for Kubernetes controller design. The core `StoryRun` controller, for example, is built on a modular, sub-reconciler pattern:
19
+
20
+
-**Main Controller**: Acts as a lean, high-level orchestrator.
21
+
-**RBAC Manager**: Manages all RBAC-related resources (`ServiceAccount`, `Role`, `RoleBinding`).
22
+
-**DAG Reconciler**: Contains the entire workflow state machine, handling state synchronization, dependency analysis, and scheduling.
23
+
-**Step Executor**: Manages the specific logic for launching different types of steps (`engram`, `executeStory`, etc.).
24
+
25
+
This clean separation of concerns makes the operator highly scalable, testable, and easy to extend.
14
26
15
27
## 📚 Core Concepts
16
28
17
29
-**`Story`**: The top-level definition of a workflow, composed of steps.
18
30
-**`Engram`**: A configured, runnable instance of a component (a "worker").
19
31
-**`Impulse`**: A trigger that creates workflow instances based on external events.
20
32
-**`StoryRun`**: An instance of an executing `Story`.
21
-
-**`StepRun`**: An instance of a single step executing within a `StoryRun`.
33
+
-**`StepRun`**: An instance of a single `engram`step executing within a `StoryRun`.
22
34
-**`EngramTemplate` & `ImpulseTemplate`**: Reusable, cluster-scoped definitions for `Engrams` and `Impulses`.
23
35
36
+
## 🧰 Workflow Primitives
37
+
38
+
Beyond running custom `Engrams`, `Story` resources can use a rich set of built-in primitives for advanced control flow:
39
+
40
+
-**`executeStory`**: Run another `Story` as a sub-workflow, either synchronously or asynchronously.
41
+
-**`if` condition**: Use CEL expressions to conditionally execute steps.
42
+
-**`switch`**: Implement multi-way branching (like a switch/case statement).
43
+
-**`loop`**: Iterate over arrays or repeat actions.
44
+
-**`parallel`**: Group steps to be executed concurrently.
45
+
- And many more for flow control, data transformation, and state management (`sleep`, `stop`, `filter`, `transform`, `setData`, etc.).
46
+
24
47
## 🚀 Quick Start
25
48
26
49
### Prerequisites
27
-
- A running Kubernetes cluster (e.g., KinD, Minikube, or a cloud provider).
50
+
- A running Kubernetes cluster (e.g., KinD, Minikube).
28
51
-`kubectl` configured to access your cluster.
29
52
30
53
### 1. Install the Operator
31
54
32
-
First, install the Custom Resource Definitions (CRDs) that define the `bobrapet` resources:
55
+
First, install the Custom Resource Definitions (CRDs):
33
56
```bash
34
57
make install
35
58
```
36
59
37
60
Next, deploy the operator controller to your cluster:
38
61
```bash
39
-
make deploy
62
+
make deploy IMG=<your-repo>/bobrapet:latest
40
63
```
64
+
*(Replace `<your-repo>` with your container registry)*
41
65
42
66
### 2. Deploy a Sample Workflow
43
67
44
-
This example defines a two-step workflow that fetches content from a URL and uses an AI model to summarize it.
68
+
The following example defines a two-step workflow that fetches content from a URL and uses an AI model to summarize it. Notice how the `summarize` step implicitly depends on the output of the `fetch-content` step.
45
69
46
70
Apply the sample manifests, which include the necessary `EngramTemplates`, `Engrams`, and the `Story` definition:
This commandwill run the operator on your localmachine, using your local`kubeconfig` to communicate with the cluster.
122
+
2. **Run the controller locally:**
123
+
This commandruns the operator on your machine, using your local`kubeconfig` to communicate with the cluster. This is great for rapid development and debugging.
0 commit comments