Commit Graph

4 Commits (3bbe380598a3179c8a2b71cfc5fb686c8e172654)

Author SHA1 Message Date
Dustin fd7778c01a mkvm: Add script to create FCOS VM
Fedora CoreOS can be provisioned on a QEMU virtual machine by providing
the Ignition configuration via `fw_cfg` value.  Unfortunately, the
`string` method does not work with JSON values, so we have to use
`file`.  The configuration file has to be uploaded via SFTP, rather than
`virsh vol-import`, since the latter would create the file with the
wrong permissions, and QEMU does not automatically adjust the
permissions of files used this way (like it does for disks).
2024-01-06 20:49:31 -06:00
Dustin d907b47db1 fetchcert: Add script to fetch certs from K8s
Since Fedora CoreOS machines are not managed by Ansible, we need another
way to keep the HTTPS certificate up-to-date.  To that end, I've added
the `fetchcert.sh` script, along with a corresponding systemd service
and timer unit, that will fetch the latest certificate from the Secret
resource managed by the Kubernetes API.  The script authenticates with
a long-lived bearer token associated with a particular Kubernetes
service account and downloads the current Secret to a local file.  If
the certificate in the Secret is different than the one already in
place, the certificate and key files are updated and nginx is reloaded.
2023-09-21 22:30:23 -05:00
Dustin dffa17410f frigate: Enable Frigate+ integration
To keep the API key a secret, we're encrypting the environment file in
the repository with GnuPG.  The decrypted copy only lives in the work
tree and is never committed. Changes have to be re-encrypted and
committed.
2023-09-21 22:29:51 -05:00
Dustin 2a0b23c9a8 meta: Add Makefile
When developing Butane/Ignition files, I frequently forget to update the
parent files after making a change to an included file.  This causes a
lot of wasted time re-provisioning, only to discover that my change
did not take effect.  To alleviate this, we'll use `make` with some
macro magic to scan the Butane files for their dependencies, and let it
generate whatever Ignition files need updating any time a dependant file
changes.

I've also added a "publish" step to the Makefile, since I also
frequently forget to upload the regenerated Ignition files to the
server, causing the same headaches.
2023-09-16 08:15:08 -05:00