Solution
Reference solution for Hello Pico on Manifold.
Reference solution
A working solution consists of the seven files shipped under downloads/, applied against a local minikube cluster:
01-namespace.yaml— themanifoldNamespace that is the Manifold RuntimeEnvironment for this lab.02-pico-engine.yaml— the single-shot Pico engine Pod that hosts thehello-world-picoPico Element.03-channel-service.yaml— the KubernetesServicethat realizes thehelloChannel from the InteractionTopology.04-topology-configmap.yaml— the on-clusterConfigMapthat publishes the same Wrangler topology fragment inside the RuntimeEnvironment.topology.yaml— the authored Wrangler-style InteractionTopology fragment; declarative truth for what runs.event.json— the one event payload sent onto thehelloChannel (hello.requestEventType).verify.sh— the automatable verification script the walkthrough runs in Step 7.
Commands (recap)
Run from work/hello-pico-on-manifold/ after copying the manifests in place (see the walkthrough for the full setup):
kubectl apply -f 01-namespace.yaml
kubectl apply -f 02-pico-engine.yaml
kubectl -n manifold wait --for=condition=Ready --timeout=60s pod/pico-engine
kubectl apply -f 03-channel-service.yaml
kubectl apply -f 04-topology-configmap.yaml
bash verify.shExpected output
The hosted Pico prints exactly one Observation line into its container logs:
pico[hello-world-pico] observation: Hello, Pico!
verify.sh waits for the Pod to be Ready, sends the one event, waits for the Pod to Succeed, and asserts the log line matches:
verify: OK — one Observation 'pico[hello-world-pico] observation: Hello, Pico!' produced by hosted Pico
Why this satisfies the objectives
- Manifold as RuntimeEnvironment: The
manifoldNamespace is labelledoe.academy/runtime-environment=manifold/oe.academy/runtime-substrate=kubernetes; every hosted object lives under it, so lifecycle and cleanup are one-for-one with the Namespace. - Pico engine as in-process host:
02-pico-engine.yamlruns one Pod that plays the Pico engine role and produces exactly one Observation for exactly one event. - Wrangler topology:
topology.yamldeclares the single Channel and the Pico’s subscription in Wrangler-style YAML; the same fragment is published on-cluster as aConfigMapin04-topology-configmap.yaml. - Single event, single response:
event.jsonis the one event sent onto thehelloChannel; the hosted Pico’s log line is the one Observation produced in response.verify.shenforces both halves. - Runtime substrate stays Kubernetes: All commands are
kubectlandminikube; no non-Kubernetes runtime is introduced. This matches the Phase 7 constructive-realization contract.
Verification
You can verify the solution matches this reference by:
- Diffing your copy of each
downloads/*.yaml,topology.yaml, andevent.jsonagainst the versions in the source repository. They should be byte-identical. - Confirming
bash verify.shexits0with theverify: OKline. - Confirming
build/hello-world-pico-on-manifold/observation.txtcontains exactly the linepico[hello-world-pico] observation: Hello, Pico!.
Variations
- Change the greeting: Edit
valueinevent.jsonand rerun the lab from Step 5 (delete and reapply02-pico-engine.yamlfirst — the Pod is single-shot). The Pico engine will echo whatevervaluethe event carries. - Rename the Channel: Edit
channels[0].nameintopology.yaml, the Servicemetadata.namein03-channel-service.yaml, and theCHANNEL_HOSTenvironment variable inverify.shto keep the three in sync. This is a good exercise in seeing how Wrangler’s declarative topology and Manifold’s realized Channel line up. - Reuse the artifact from the Hello Pico lab: The greeting value in
event.jsonmatches thehello-world-picoartifact produced by the Hello Pico lab. Producing the same greeting from the same declarative input, once on a laptop and once through a Manifold-hosted Pico, is the point of the runtime frame the Manifold course teaches.
NoteOut of scope for this reference
Multi-Pico topologies, Home Assistant as a Control Surface, fleet orchestration, and non-Kubernetes runtimes are explicitly out of scope for this first runtime-focused lab and its reference solution.