← All Learning Paths

Environment Management Engineer

Kill 'works on my machine': environment parity, twelve-factor config, drift detection, layered overlays, and secret rotation that never causes downtime.

roleintermediate8 nodes10.67h total

Path overview

环境管理的敌人是熵:手工改动悄悄积累,直到生产与代码描述分道扬镳。本路径从环境对等与十二要素讲起,覆盖 IaC 与密钥管理,再落地 Kustomize 分层、漂移告警与零停机配置,收尾于环境变量管理器项目。

The enemy of environment management is entropy: manual changes accumulate until production diverges from code. This path covers parity, twelve-factor, IaC, overlays, drift alerts, and rotation.

  1. Compare "Secrets: Handling and Hygiene" with "Environment Parity and the .env.example Contract" in "Configuration Management Across Environments" and state which trade-off you would accept in environments code.

    Completion criteria: Write a five-line decision note citing "Secrets: Handling and Hygiene" from "Configuration Management Across Environments", name the option you rejected, and attach the before/after diff of one file you changed.

    Next step: Zod Nested Environment Config

    ⏱ 1h

  2. Execute "Zod Nested Environment Config", change one constant, and describe how the output diverges from "Flatten process.env into a strongly typed nested config with Zod, supporting defaults,".

    Prerequisites: Configuration Management Across Environments

    Completion criteria: Save two runs of "Zod Nested Environment Config" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: Layer Environment Differences with Kustomize Overlays

    ⏱ 0.75h

  3. Run "Remove copy-pasted per-environment manifests and make every environment-specific change" from "Layer Environment Differences with Kustomize Overlays" and confirm the documented result "The base renders a complete workload with no environment-specific values.".

    Prerequisites: Zod Nested Environment Config

    Completion criteria: Show the command for every step of "Layer Environment Differences with Kustomize Overlays" and paste the output proving "Remove copy-pasted per-environment manifests and make every environment-specific change"; then note the step where "The base renders a complete workload with no environment-specific values." appears.

    Next step: Alert on Runtime Config Drift from Git

    ⏱ 0.5h

  4. Apply "Alert on Runtime Config Drift from Git" to a environments task, checking that "No output and exit code 0 when the cluster matches Git; exit code 1 with a diff when it does" appears after the "Know within minutes when someone edits a live ConfigMap instead of merging a change to the" step.

    Prerequisites: Layer Environment Differences with Kustomize Overlays

    Completion criteria: Run "Alert on Runtime Config Drift from Git" twice — once as written and once with a changed input — and attach both transcripts with the observed difference.

    Next step: Roll Out Config Changes Without Restarting Everything

    ⏱ 0.5h

  5. Execute "Roll Out Config Changes Without Restarting Everything" end to end, then repeat the last step with one parameter changed and compare "Apply configuration changes during business hours without dropping requests or restarting".

    Prerequisites: Alert on Runtime Config Drift from Git

    Completion criteria: Deliver a transcript of "Roll Out Config Changes Without Restarting Everything" with each step's command and observed state, ending at "Apply configuration changes during business hours without dropping requests or restarting".

    Next step: Detect Terraform Drift on a Schedule

    ⏱ 0.5h

  6. Run "Find out that infrastructure was changed by hand before a deploy either reverts it silently" from "Detect Terraform Drift on a Schedule" and confirm the documented result "Exit code 0 means no changes, 2 means drift or pending changes, 1 means the plan failed.".

    Prerequisites: Roll Out Config Changes Without Restarting Everything

    Completion criteria: Show the command for every step of "Detect Terraform Drift on a Schedule" and paste the output proving "Find out that infrastructure was changed by hand before a deploy either reverts it silently"; then note the step where "Exit code 0 means no changes, 2 means drift or pending changes, 1 means the plan failed." appears.

    Next step: Detect Configuration Drift as Paths

    ⏱ 0.5h

  7. Solve "Detect Configuration Drift as Paths" for environments work: turn JSON object: { declared, actual } (nested plain objects) into {drifted:[app.replicas],inSync:false} and pass both samples.

    Prerequisites: Detect Terraform Drift on a Schedule

    Completion criteria: Attach the solution file for "Environment Management Engineer", two passing sample runs, and one failing run whose error matches the contract.

    Next step: Build an Environment Variable Manager CLI

    ⏱ 0.42h

  8. Build "Build an Environment Variable Manager CLI" through its phases, keeping "Parse .env files with single quotes, double quotes, escape sequences, comments, and export" independently testable.

    Prerequisites: Detect Terraform Drift on a Schedule, Detect Configuration Drift as Paths

    Completion criteria: Deliver "Parse .env files with single quotes, double quotes, escape sequences, comments, and export" and show a commit where the corresponding test goes from failing to passing.

    Next step: Apply this path in a capstone project and review the related resources.

    ⏱ 4h