Commit Graph

33 Commits (master)

Author SHA1 Message Date
Dustin bfd70ef34e fedora-comon: Update default package set
infra/kickstart/pipeline/head This commit looks good Details
* Install `system-upgrade` plugin for `dnf`, since we'll almost always
  want this in order to be able to update hosts
* Do not install _sshca-cli-systemd_; this package has been deprecated
  and removed in favor of setting up the systemd units from Ansible
* Install _python3-libdnf5_, as this is required by Ansible and will be
  installed by it later, so we can save a bit of time by always having
  it installed.
2025-09-14 15:18:00 -05:00
Dustin d8118e0fce autoprovision: split script+unit into separate files
Now that we're using Jinja to render the kickstart scripts, we can
separate out scripts, systemd unit files, etc. into their own files and
`include` them.  This makes editing them much easier, especially since
syntax highlighting will work correctly.
2025-07-26 07:20:01 -05:00
Dustin a85f4cfde7 fedora: Exclude firmware, fwupd
infra/kickstart/pipeline/head This commit looks good Details
Virtual machines don't have any firmware to update...
2025-07-22 15:36:29 -05:00
Dustin f07abaff3a ci: Set file mtimes from git log
infra/kickstart/pipeline/head This commit looks good Details
Every time the job runs, the _Publish_ stage changes the timestamps of
the files on the server, even if their contents haven't changed.  This
is because each build runs from a fresh checkout, so every file appears
to have just been created.  To avoid this, and leave files on the server
alone unless they've changed, we now set the modification timestamp of
every file from its last commit.
2025-07-09 10:39:10 -05:00
Dustin ed5a4f9743 fedora-common: Exclude udisks2
infra/kickstart/pipeline/head This commit looks good Details
Anaconda seems to want to install this by default now.  This is a
useless package with a bunch of security vulnerabilities and a hard
dependency on Polkit.
2025-07-09 10:25:47 -05:00
Dustin 06ffb6713c ci: Add Jenkins build+publish pipeline 2025-07-09 10:25:47 -05:00
Dustin 1822514b36 Use Jinja to manage includes
The drawback to the native `%include` Kickstart directive is that it
requires a static, hard-coded, absolute path.  This means that we
cannot, for example, host a copy of the kickstarts from a different
branch for testing, without modifying the URLs of all the included
files.

Switching to using Jinja templates introduces a build step, but the
result is that the artifacts are self-contained.  This way, they can be
deployed anywhere.  I'm not sure where I'll put them, though, and
they'll need a Jenkins job to run the build and publish them.
2025-07-09 10:25:47 -05:00
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