Four OpenShift labs turn microservice failure modes into hands-on exercises
The sequence uses the free Developer Sandbox to teach transactional outboxes, replay-safe consumers, circuit breakers, sagas and a deliberately minimal GitOps loop.
A new set of four open-source labs takes a small e-commerce application from service decomposition to event-driven workflows, resilience controls and saga-based coordination on the free Red Hat Developer Sandbox. The IBM Community post is notable less for the sample storefront than for the failure modes it asks developers to reproduce and inspect.
What the sequence builds
The first lab separates catalog and order services, gives each its own PostgreSQL database and uses OpenShift service discovery and health probes. The second introduces a single-node Kafka deployment, a transactional outbox and a notification service. Its exercises cover CloudEvents, partition keys, at-least-once delivery, idempotent consumption and a dead-letter topic.
The third lab adds timeouts, jittered retries, a circuit breaker, bulkheads, structured logs, RED metrics and trace propagation across HTTP and Kafka. The fourth adds a payment service and an orchestrated saga, including rejection, timeout and a late payment reply that must trigger compensation rather than a fictional distributed rollback. It also introduces a Tekton pipeline, Kustomize overlays and a small reconciliation CronJob.
Each lab directory is a complete snapshot rather than a patch against the preceding exercise. The repository includes step-by-step guides and runnable Node.js reference implementations, so teams can either build the services themselves or deploy the supplied code and concentrate on operational behavior.
Why the constraints matter
The exercises are designed for a single Developer Sandbox namespace without cluster-admin rights or user-installed operators. Those limits force explicit choices. Kafka runs in KRaft mode from ordinary Kubernetes objects. The final lab uses a five-minute CronJob as a minimal reconciler rather than assuming Argo CD is available. The author is clear that production deployments would use Red Hat Streams for Apache Kafka and OpenShift GitOps; the simplified components exist to expose the mechanisms those products automate.
That makes this more useful than another happy-path microservices tutorial. Developers have to prove that replaying a topic does not send duplicate notifications, that a broker outage does not prevent an order from being confirmed, that a bad product identifier does not trip a circuit breaker and that a late saga reply produces a compensating action.
What teams should try
Platform teams evaluating the labs should begin with the supplied Sandbox assumptions, then replace one teaching component at a time. Swapping the single-node broker for Streams for Apache Kafka tests whether event contracts and idempotency survive a production service. Replacing the CronJob reconciler with OpenShift GitOps makes drift and reconciliation visible without changing the application boundary. The repository also identifies what was tested locally and what still requires verification on a live cluster, including OpenShift commands, the Kafka manifest, Tekton tasks and monitoring permissions.
The practical value is the progression: the labs connect application design decisions to the OpenShift facilities that carry them into operation, while keeping the system small enough to break on purpose.
sources
comments · 0