Commit Graph

10 Commits (ff67ddf8bfb63b3bc13a57bf964d1740e76fa010)

Author SHA1 Message Date
Dustin ff67ddf8bf tf/asg: Update node template to Fedora 41
dustin/dynk8s-provisioner/pipeline/head There was a failure building this commit Details
2025-07-05 11:06:32 -05:00
Dustin 0ec109b088 tf/asg: Update to Fedora 40
Upstream changed the naming convention for Fedora AMIs.  It also seems
they've stopped publishing "release" artifacts; all the AMIs are now
date-stamped.  We should probably consider running `terraform apply`
periodically to keep up-to-date.
2024-11-03 12:31:11 -06:00
Dustin 6f279430c2 tf/asg: Use larger instance type
I'd rather spend a few extra pennies on beefier ephemeral worker nodes
to speed up builds.
2024-02-13 07:41:05 -06:00
Dustin c4f73073dc tf/asg: Increase root block device size
The default root block device for Fedora EC2 instances is only 10 GiB.
This is insufficient for many jobs, especially those that build large
container images.
2024-02-05 20:53:38 -06:00
Dustin f6910f04df tf/asg: Add CA resource tag for FUSE device plugin
dustin/dynk8s-provisioner/pipeline/head This commit looks good Details
Jenkins jobs that build container images in user namespaces need access
to `/dev/fuse`, which is provided by the [fuse-device-plugin][0].  This
plugin runs as a DaemonSet, which updates the status of the node it's
running on when it starts to indicate that the FUSE device is available.
When scaling up from zero nodes, Cluster Autoscaler has no way to know
that this will occur, and therefore cannot determine that scaling up the
ASG will create a node with the required resources.  Thus, the ASG needs
a tag to inform CA that the nodes it creates will indeed have the
resources and scaling it up will allow the pod to be scheduled.

Although this feature of CA was added in 1.14, it apparently got broken
at some point and no longer works in 1.22.  It works again in 1.26,
though.

[0]: https://github.com/kuberenetes-learning-group/fuse-device-plugin/tree/master
2024-01-14 11:42:46 -06:00
Dustin 02772f17dd tf/asg: Look up Fedora AMI by attributes
Instead of hard-coding the AMI ID of the Fedora build we want, we can
use the `aws_ami` data source to search for it.  The Fedora release team
has a consistent naming scheme for AMIs, so finding the correct one is
straightforward.
2023-11-13 20:27:50 -06:00
Dustin 4a2a376409 terraform: Update node template to Fedora 38 2023-11-13 19:52:47 -06:00
Dustin c4cabfcdbc terraform: Update node template to Fedora 37
dustin/dynk8s-provisioner/pipeline/head This commit looks good Details
2023-06-11 20:22:44 -05:00
Dustin b01841ab72 terraform: Update node template to Fedora 36
dustin/dynk8s-provisioner/pipeline/head Something is wrong with the build of this commit Details
2023-01-10 17:19:20 -06:00
Dustin e11f98b430 terraform: Add config for auto-scaling group
The Cluser Autoscaler uses EC2 Auto-Scaling Groups to configure the
instances it launches when it determines additional worker nodes are
necessary.  Auto-Scaling Groups have an associated Launch Template,
which describes the properties of the instances, such as AMI ID,
instance type, security groups, etc.

When instances are first launched, they need to be configured to join
the on-premises Kubernetes cluster.  This is handled by *cloud-init*
using the configuration in the instance user data.  The configuration
supplied here specifies the Fedora packages that need to be installed on
a Kubernetes worker node, plus some additional configuration required by
`kubeadm`, `kubelet`, and/or `cri-o`.  It also includes a script that
fetches the WireGuard client configuration and connects to the VPN,
finalizes the setup process, and joins the cluster.
2022-10-11 21:40:42 -05:00