Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Hello World

Zero-dependency quickstart — no API keys needed.

Hello World Demo

What it demonstrates

  • DAG basics — defining a multi-step batch Story
  • Parallel executionfetch-ip and fetch-headers run at the same time
  • Step dependenciessummarize waits for both upstream steps
  • Template expressions — the summary POST body interpolates output from upstream steps
  • Story output mapping — results from individual steps collected into a single storyrun.status.output

Architecture

flowchart LR
    fetch-ip --> summarize
    fetch-headers --> summarize
Loading

Prerequisites

  • BubuStack installed on your cluster
  • EngramTemplate: http-request

Quick start

# 1. Create the namespace
kubectl apply -f bootstrap.yaml

# 2. Deploy the Engrams
kubectl apply -f engrams.yaml

# 3. Deploy the Story
kubectl apply -f story.yaml

# 4. Trigger a run
kubectl apply -f storyrun.yaml

# 5. View the output
kubectl get storyrun hello-world-run -n hello-world \
  -o jsonpath='{.status.output}' | jq .

Verify

# Check deployed resources
kubectl get engrams,stories -n hello-world

# Watch the StoryRun progress
kubectl get storyruns -n hello-world -w

# Check individual StepRun phases
kubectl get stepruns -n hello-world

Cleanup

kubectl delete namespace hello-world

Under the Hood

  1. kubectl apply -f story.yaml creates a Story CRD — a DAG definition with 3 steps. The Story controller validates the DAG is acyclic and registers it.

  2. kubectl apply -f storyrun.yaml creates a StoryRun CRD — an execution instance. The StoryRun controller sets phase to Pending, resolves all template expressions against inputs, and transitions to Running.

  3. The StoryRun controller creates StepRun CRDs for steps with no unmet dependencies (fetch-ip, fetch-headers). Each StepRun controller spawns a Kubernetes Job running the http-request Engram container.

  4. When both StepRuns reach Succeeded, their .status.output is written back. The StoryRun controller detects that summarize's dependencies are met, creates its StepRun.

  5. Once summarize succeeds, the StoryRun controller evaluates the Story's output template — collecting IP, headers status, and summary body from each step — and stores the result in storyrun.status.output. The StoryRun transitions to Succeeded.

CRDs involved: Story, StoryRun, StepRun, Engram, EngramTemplate (http-request)