Skip to main content

A practical templating tool for Jinja templates

Project description

:warning: jinny is under active development and is not yet 1.0 Packages may not work, code may not install, etc. Bear with us!

jinny

Jinny is a templating tool for jinja templates. It can be used for a number of things but was created from a DevOps perspective to aid in configuration management for scaled deployments instead of using tools like Helm, Kustomize, jinja-cli, etc.

Use Cases & Why

The 2020's of software usually include mashing together different/underlying/proxied systems that need to be able to scale, adapt and transform in unstable environments (no pets, black box providers, etc) and unstable direction. This means you're running applications and controlling services that lead to a mass of config that needs to change on a whim. Add to this the need to pass this through various CI/CD pipelines and there's a need for a templating application that is:

  • Command line controlled
  • Can take multiple JSON & YAML template inputs
  • Can take multiple Jinja based templates
  • Can choose to template out to stdout, to separate files, to one big file
  • Allows for cascading overwriting of inputs
  • Alows the utilising of a seasoned templating language with some room for adding functionality
  • Stable - uses simple and reliable libraries and doesn't need constant maintenance. We don't want this failing our pipelines or botching deployments

For example, Jinny was originally conceived as a way to handle templating of Kubernetes manifests rather than using Helm or other Go templating tools. Helm is overengineered for what I often need and usually comes with unwanted issues such as nuking production environments (your milage may vary). Jinny doesn't attempt Kubernetes package management, whatever that is, and instead just sticks to templating such that you as the Ops engineer can choose how, when or what to apply.

How to use

# Basic use, templating out template1.tmpl and template2.tmpl with the values from values.yml and any values overriden with values from values-override.json
jinny -i values.yml values-override.json -t template1.tmpl template2.tmpl

Packages used

Check out src/jinny/requirements.txt

As of May 2022 only PyYAML and Jinja2 are used

FAQs

Will jinny ever integrate with Kubernetes directly? Maybe. The Kubernetes API is fairly organised but the preprovided SDKs are autogenerated nightmares. If there's a way to work around that, which there probably is, then maybe. As an engineer I'm much keener to lean on kubectl as interacting with the Kubernetes API is kubectl's job.

What about Windows? My Windows days are behind me and I'm not coming back to it. If you'll like to PR it in go for it, however I'm neither motivated nor tooled up to maintain support for Windows.

Can I donate or support? Nah. I'm good. If jinny really helps and you want to right the balance then please donate to the Guide Dogs UK or Australia or Tassie. With some time, energy and some delicious dog treats they give people back their independence, it's the best ROI I know of.

https://www.guidedogs.org.uk
https://guidedogs.com.au
https://guidedogstas.com.au/supportus/donate/

Can you offer support? jinny is simple enough that your problem isn't likely to be jinny itself. If it is then open up an issue here on Gitlab or on Github.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jinny-0.1.3.tar.gz (9.8 kB view details)

Uploaded Source

File details

Details for the file jinny-0.1.3.tar.gz.

File metadata

  • Download URL: jinny-0.1.3.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.2

File hashes

Hashes for jinny-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3014d64a8b37140b866d66462205dbd6da7631007bf24c67da68dc49a9fcc3ff
MD5 9df553c86b9f7bd89d7c9a07830c4270
BLAKE2b-256 1bfd200df88b5f702bcd8d7bed46870a1445af34236fae63dc1591f7527336e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page