butane icon indicating copy to clipboard operation
butane copied to clipboard

Command line builder for FCCs

Open bostrt opened this issue 3 years ago • 0 comments

NOTE: This is partially duplicated work now that I've learned about fcct local files: https://github.com/coreos/fedora-coreos-docs/issues/163

I've been working on a command line builder for FCCs, called fccb. Source is here: https://github.com/bostrt/fccb. My use case is for building FCCs from files that are in Git that I'd rather keep there for various reasons, including:

  • Better version tracking and potentially easier merges then keeping in an FCC Yaml
  • Easier to use linting tools on content outside of YAML (e.g. https://github.com/koalaman/shellcheck)
  • Syntax highlighters function better when code isn't embedded in YAML

A side use-case is that command line interaction is sometimes more fun than editing YAML directly.

I'm curious if anyone else in the Fedora CoreOS community might find fccb useful and if so, do you think a standalone tool is appropriate or if I should submit a PR to fcct?

Below are some examples that might better explain what this tool does exactly. BTW, Its output is FCC that can be piped directly into fcct. I didn't go directly to Ignition configs since fcct handles that already.

$ fccb add file test.fcc mymotd.txt -p /etc/motd | fcct -p # Add motd and instantly transpile
$ fccb add unit test.fcc -f test.service -d test.service.d/ # Add Systemd service unit and some drop-ins
$ fccb add user test.fcc -n bostrt -G floppy -s /bin/ksh # Add user in floppy and uses KSH
...

bostrt avatar Aug 20 '20 20:08 bostrt