Skip to content

Latest commit

 

History

History
41 lines (21 loc) · 1.87 KB

File metadata and controls

41 lines (21 loc) · 1.87 KB

🎤 Interview Q&A - Lab 16: Templated Config Generator

1. What was the main goal of this lab?

Answer: The main goal was to build a reusable configuration workflow using Jinja2 templates, YAML data files, and validation checks before deployment.

2. Why was Jinja2 used in this project?

Answer: Jinja2 made it possible to keep one reusable template and render different outputs for development and production from separate data files.

3. How were environment differences handled?

Answer: Environment-specific values were stored in separate YAML files, then injected into the templates during generation.

4. What was the purpose of generator.py?

Answer: It loaded YAML input, rendered Jinja2 templates, and wrote the generated configuration files to the configs directory.

5. What was the purpose of validator.py?

Answer: It validated generated YAML files against JSON schema and performed basic syntax checks for Nginx configuration.

6. Why was JSON schema validation important?

Answer: It helped catch missing or malformed configuration values before those settings could be deployed or used downstream.

7. What did the invalid configuration test prove?

Answer: It proved that bad input could still generate output, but the validator correctly identified the missing required values.

8. How was the Nginx configuration checked?

Answer: The lab used a basic validator that checked brace balance, required blocks, and semicolon placement.

9. What real-world DevOps pattern does this lab represent?

Answer: It reflects template-driven configuration management used in deployment automation and infrastructure-as-code workflows.

10. What did you verify at the end of the lab?

Answer: I verified that the modules loaded, files were generated, expected values existed, and the validation commands returned the correct exit status.