06-07, 17:00–17:50 (EST5EDT), Altispeed (JR Ballroom )
Python has excellent abstractions and tooling. What if you could use this popular, general-purpose programming language for infrastructure? How to
- Terraform: incrementally migrate from Hashicorp Configuration Language (HCL) to Python
- Jinja: format templates in Python nicely, for Ansible, Airflow, and beyond
- Ansible: write playbooks in Python instead of YAML
A brief history and comparison of tools which enable writing Python for Terraform:
* https://github.com/NerdWalletOSS/terraformpy
* https://github.com/hashicorp/terraform-cdk
* https://github.com/covracer/helicopyter
Examples of Python-defined Terraform using helicopyter, ruff, and mypy.
A brief story of my own workflow engine journey from YAML to Python--arriving at a very similar arrangement as Airflow, and then just switching to it. Along the way, figuring out how to format Jinja template curly braces nicely.
Applying those YAML to Python lessons to Ansible, with examples.
Chris is a fan of many Free, Libre, and Open Source projects including Linux, CRIU, QEMU, and OpenBMC. When not trying to globally search and replace extended Latin micro with Greek mu (there can only be one), Chris spends time with family and improves CRISPR guide RNA synthesis software.