Commit Graph

26 Commits (8933e517fbbfffbb86a34d52dd34a500e6452159)

Author SHA1 Message Date
Dustin 8933e517fb fedora-common: Do not configure SSH host cert
When the SSH daemon is already configured to use an SSH host
certificate but the specified certificate file does not exist, then the
server will not try to use it later once it is created.  This
essentially means that the certificate obtained during first boot will
not be used untile the SSH daemon is restarted.

Rather than try to set all of this up in the kickstart, it's probably
better to just let Ansible do it.  Then, the SSH daemon can be restarted
as needed automatically (by the host provisioner).
2025-05-09 20:49:02 -05:00
Dustin 713a61db28 fedora-disk-dch: Add back /boot partition
I forgot the `reqpart` command only deals with the EFI system partition,
and does not manage `/boot`.
2025-03-04 19:33:49 -06:00
Dustin 4d543d3a42 fedora-rpi: Enable auto provisioning 2025-02-23 16:09:37 -06:00
Dustin 5cfc410c06 fedora-disk-dch: Increase / to 4 GB
3 GB is no longer sufficient for basic Fedora installs now, especially
on Raspberry Pis (_uboot-images-armv8_ adds almost 500 MB itself).
2025-02-23 15:37:18 -06:00
Dustin 9160def94b fedora-disk-dch: Remove Raspberry Pi partitions
These are only needed on Raspberry Pis and should not be created on
other types of systems.  VMs, etc. should use `reqpart` instead.
2025-02-23 15:33:00 -06:00
Dustin 94a9ed900f autoprovision: Trigger host online webhook
To initiate the automatic host provisioning process, a new machine must
trigger the _POST /host/online_ webhook.  Included in the request are
the hostname of the new machine and its SSH host public keys.
Optionally, the request can also contain the name of a branch in the
configuration policy repository.  For virtual machines, this branch
name can be specified by a QEMU `fw_cfg` option.  The `fw_cfg` values in
sysfs are only readable by root, so the service must run as root, but
it does not need any additional privileges, so we can use systemd
sandbox features to restrict it.

This feature is enabled by default for virtual machines.  I haven't
quite figured out how to do the branch selection for physical machines
yet, but I will enable it for them once I do.
2025-02-08 17:22:44 -06:00
Dustin 437ed39ecb fedora: Use disk layout from disk-dch.ks
Ensure consistency between virtual and physical machines.
2025-02-08 17:09:25 -06:00
Dustin f0cb63b38a fedora-rpi-common: Fix sshd starting before certs
Delaying the _ssh-host-cert-sign@.service_ units starting until after
the clock is synchronized ends up causing _sshd.service_ to start way
before the host certififcates are available.  This prevents the SSH
daemon from using the host certificates until it is explicitly reloaded,
so clients will not be able to verify the server's authenticity
automatically on first boot.  To ensure that clients (read: Ansible)
will be able to connect to the server when it first boots without any
manual interaction, we need to delay the _sshd.service_ unit starting
until the certificate files are present.

I think this can actually happen to any server, not just a Raspberry Pi,
but it definitely always happens on Pis.  I may eventually apply this
change to the `ssh-host-cert-sign@.service` template unit file in the
_sshca-cli-systemd_ package, if it turns out to be a more common
problem.
2025-01-30 18:22:50 -06:00
Dustin 6c8564633b fedora-disk-dch: Factor out disk layout
This will allow the `fedora-rpi-common.ks` kickstart fragment to be more
composeable, making it usable for systems other than "servers" that may
need a different disk layout.
2025-01-30 16:47:08 -06:00
Dustin 40c27ec738 fedora-rpi: Split eMMC vs NVMe config
Machines that use eMMC/SD cards for OS storage need a slightly different
disk layout than those with nVME drives.  Notably, we do not want swap
or `/tmp` on the eMMC, as that will not really improve performance at
all and will be hard on the flash memory.

For NVMe, there are two options available, with and without a swap
volume.
2024-12-28 17:23:17 -06:00
Dustin 6c02a4672c fedora-rpi: Start chrony-wait before host certs
On machines without an RTC, the clock will likely be very wrong on first
boot when system tries to obtain the initial SSH host certificates.
This results in the SSHCA server rejecting the request because the
authorization token has expired.  To avoid this, we need to ensure the
clock is set before attempting to have the certificates signed.
2024-12-28 12:17:15 -06:00
Dustin 7c050b7920 fedora-common: Clear out machine-id
Apparently something is populating `/etc/machine-id` at install time
now, which prevents units scheduled to run on first boot (with
`ConditionFirstBoot=true`) from starting.
2024-12-28 11:44:18 -06:00
Dustin b4767cce92 fedora-common: Exclude docs from installed packages
We don't install `man` either, so let's reduce footprint a bit more and
omit documentation altogether.
2024-12-28 09:39:22 -06:00
Dustin be24a5dd52 Add generic Fedora kickstarts
* `fedora.ks` is used for virtual machines running Fedora Linux
* `fedora-rpi.ks` is for Raspberry Pi machines
* `common.ks` is shared between the two
2024-12-27 21:02:13 -06:00
Dustin 717f17893e vmhost0: Update to Fedora 32 2021-10-09 10:29:59 -05:00
Dustin 3221ad95d0 Add kickstart for gw1 2021-05-29 10:04:14 -05:00
Dustin 6b35ac54d7 Add kickstart for zaphym 2020-05-03 14:57:25 -05:00
Dustin 2346c2e910 Add kickstart for burp1 2020-01-25 10:13:40 -06:00
Dustin cd311c0b64 Add generic CentOS 8 kickstart
Mostly for test VMs created with `c8-testvm`
2019-09-24 16:19:49 -05:00
Dustin 49677d7cd1 Add kickstart for vmhost0 2019-05-07 15:40:38 -05:00
Dustin 07962ffa88 Add kickstart for vmhost1 2019-04-26 15:21:05 -05:00
Dustin 3e91f0f69f Add kickstart for dc1 2019-03-22 09:08:19 -05:00
Dustin 3d42b8090f Add generic CentOS 7 kickstart
Mostly for test VMs created with `c7-testvm`
2018-08-31 20:15:08 -05:00
Dustin bdc5681ed4 Add kickstart for toad 2018-07-28 10:33:52 -05:00
Dustin f6e1711d20 Add kickstart for gw0 2018-05-04 20:46:41 -05:00
Dustin 66fd6c8d3d Add kickstart for dns0 2018-02-19 23:18:17 -06:00