How seeker89/chaos-engineering-book works
Project type & purpose
• Type: A book’s companion repository containing
– Infrastructure-as-code (Packer + Ansible) for building a VM image
– Chapter‐organized chaos-engineering experiments (scripts, containers, Kubernetes manifests, small apps in Python/JavaScript/C)
• Purpose: Teach chaos-engineering by provisioning an isolated VM environment, deploying sample apps/services, then running fault-injection experiments and observing resilience.
File-structure highlights
– Root: Makefile, getting-started docs, per-chapter markdown folders (ch02…ch12)
– vm/: Packer template (packer.json), Ansible playbooks & roles to provision a VM (e.g., install services or WordPress)
– examples/: subfolders grouping experiments by technology (app, busy-neighbours, js, jvm, killer-whiles, poking-docker, kubernetes, etc.)
– media/: images for the book
– README.md + getting-started.md: instructions on cloning, building the VM, then running examples.
High-level components
A. Developer Workstation (local machine)
– Git & Make (clone + make vm)
– Packer CLI + Ansible CLI
– Experiment runners (Python scripts, shell scripts)
B. Environment Provisioner
– Packer (builds VM image)
– Ansible roles & playbooks (vm/ansible/)
C. Target VM (VirtualBox/QEMU)
– Base OS image
– Provisioned services (e.g., sample web app, WordPress, Docker engine, Kubernetes tools, monitoring agents)
D. Chaos-Engineering Experiments (examples/)
– Scripted fault injectors: CPU/memory hogs, I/O starvation, process kills, network partitions
– Container-based experiments (poking-docker)
– Kubernetes manifests (examples/kubernetes)
– Language-agent examples (JVM agents, JS experiments)
– C-based syscall filters & seccomp profiles (who-you-gonna-call)
E. Observability & Logging (optional external)
– Local or in-VM logs, metrics output (not shipped but implied in chapters on observability)
Interactions & data flow
• Workstation → Packer → VM image
• Workstation → Ansible → VM configuration
• Workstation/VM → sample application deployed on VM
• Experiment scripts (on host or inside VM) → Target services
– Fault injection APIs (Docker daemon, Kubernetes API, direct syscalls)
– Traffic generators (ab, curl, fetch/XMLHttpRequest)
• Monitoring/Logging (metrics, consoles) ← All components
Architectural patterns & principles
– Infrastructure-as-Code for deterministic environment (Packer + Ansible)
– Clear separation: provisioning layer vs. experimentation layer vs. target application layer
– Modular experiments: each examples/* subdirectory is self-contained
– Layered “blast radius”: OS-level faults, container-level faults, orchestration-level faults
Final checklist
– Clear component boundaries (Host vs. VM vs. External)
– Labels for each folder/technology (Makefile, Packer, Ansible, Python scripts, shell scripts, Kubernetes YAML, etc.)