Skip to content

salatfreak/pyromaniac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pyromaniac
πŸ”₯ Obsessed with creating Ignition πŸ”₯

tests badge beta badge

Pyromaniac is a framework for configuring and deploying self-maintaining server operating systems and services in a declarative, reproducible, and modular way based on Fedora CoreOS, Butane, and Jinja. Use it as a more powerful drop-in replacement for Butane, break your config up into reusable parameterized components, or build and publish your own libraries with ease.

Tip

You can learn all about Pyromaniac in the documentation or keep reading this document to get an overview of some of Pyromaniacs main features.

πŸ’« One Tool to Rule Them All πŸ’«

Pyromaniac combines the powers of Butane, the CoreOS Installer, and even comes with an HTTP(S) server for loading your configurations over the network, saving you the hassle of generating a new installer when your configuration changes.

Switch out Butane for Pyromaniac to generate your Ignition file:

pyromaniac --pretty config.bu > config.ign

Generate an ISO for unattended installation from your configuration with a single command:

pyromaniac --iso --iso-disk /dev/sda config.bu > installer.iso

Render and serve your configuration over HTTPS:

pyromaniac --serve --address https://192.168.1.100:8000/ config.bu

A self-signed TLS certificate and authentication credentials will automatically be generated and can easily be embedded into your remote installer for a mutually secured connection.

Learn more in the CLI Documentation.

🧁 Sugar, Parameterization, and Decomposition 🧁

Pyromaniac extends the Butane format with support for composite keys, Jinja templating using the "`" (backtick) delimiter, and parameterized components for better clarity and maintainability.

Configure three text files using composite keys and without repeating yourself:

storage.files:
{%- for name in ["Alice", "Bob", "Carol"] %}
  - path: `"/" + name + ".txt"`
    contents.inline: `name + " was here!"`
{%- endfor %}

Turn your configuration into a reusable component:

files.pyro

(*names: str, ext: str = ".txt")

{%- for name in names %}
- path: `"/" + name + ext`
  contents.inline: `name + " was here"`
{%- endfor %}

And include it from your main component:

main.pyro

storage:
  files: `files("Alice", "Bob", "Carol", ext=".md")`
  links[0]:
    path: /favourite.md
    target: /Carol.md

Learn more in the Component Documentation.

🐍 Arbitrary Python Code, Local Files, and More! 🐍

Pyromaniac allows you to include arbitrary python code into your configuration including the definition of functions and even classes, to make your components even more powerful. It also comes with a standard library of components for loading files, rendering Jinja templates, adding file system nodes, etc.

Add a Python block with a helper function to your component and use the file and load standard library components to configure a file from a local Jinja template:

(name: str)

---
def path(name: str) -> str:
  return f"/greeting-{name.lower()}.txt"
---

storage.files[0]: `file(path(name), load(_/"greeting.jinja", name=name))`

Load two Butane configurations specified in TOML format, render them and create an Ignition merge from them:

---
config1 = load.toml(_/"config-1.toml")
config2 = load.toml(_/"config-2.toml")
---

ignition.config.merge: `merge(config1, config2)`

Learn more in the Standard Library Documentation.

❀️ Charityware ❀️

Pyromaniac is charityware. It is GPL licensed and you may therefore freely use and modify it without charge. It would however be great if you took a minute to consider your power to fundamentally change other people's lives for the better.

You can restore a person's eyesight for half a week's pay or save a child from getting malaria for a third of an hourly wage. Contributing to non-human animal focused charities is plausibly even orders of magnitude more effective, since our society brutalizes them in such inconceivable numbers.

Many people pledge to give 10% of their income to charity. Some even pledge to donate 99% of their wealth. Whatever small or large contribution you are able and willing to make can mean the world to those who benefit from it.

Please read up on effective altruism and the devastating effects of animal agriculture on our planet ❀️