Support Fedora CoreOS OS image streams on AWS

* Add `os_stream` variable to set the stream to stable (default),
testing, or next
* Remove unused os_image variable on Fedora CoreOS AWS
This commit is contained in:
Dalton Hubble 2020-05-13 21:37:18 -07:00
parent f4194cd57a
commit 01905b00bc
6 changed files with 14 additions and 24 deletions

View File

@ -20,9 +20,15 @@ Notable changes between versions.
* SELinux enforcement requires consistent file context MCS level
* Restarting a node resolved the issue as a previous workaround
#### AWS
* Support Fedora CoreOS official [image streams](https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/) ([#727](https://github.com/poseidon/typhoon/pull/727))
* Add `os_stream` variable to set the stream to `stable` (default), `testing`, or `next`
* Remove unused `os_image` variable
#### Google
* Use new Fedora CoreOS official [image streams](https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/) ([#723](https://github.com/poseidon/typhoon/pull/722))
* Support Fedora CoreOS official [image streams](https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/) ([#723](https://github.com/poseidon/typhoon/pull/722))
* Add `os_stream` variable to set the stream to `stable` (default), `testing`, or `next`
* Deprecate `os_image` variable. Manual image uploads are no longer needed

View File

@ -13,16 +13,8 @@ data "aws_ami" "fedora-coreos" {
values = ["hvm"]
}
filter {
name = "name"
values = ["fedora-coreos-31.*.*.*-hvm"]
}
filter {
name = "description"
values = ["Fedora CoreOS stable*"]
values = ["Fedora CoreOS ${var.os_stream} *"]
}
# try to filter out dev images (AWS filters can't)
name_regex = "^fedora-coreos-31.[0-9]*.[0-9]*.[0-9]*-hvm*"
}

View File

@ -41,9 +41,9 @@ variable "worker_type" {
default = "t3.small"
}
variable "os_image" {
variable "os_stream" {
type = string
description = "AMI channel for Fedora CoreOS (not yet used)"
description = "Fedora CoreOs image stream for instances (e.g. stable, testing, next)"
default = "stable"
}

View File

@ -8,7 +8,7 @@ module "workers" {
security_groups = [aws_security_group.worker.id]
worker_count = var.worker_count
instance_type = var.worker_type
os_image = var.os_image
os_stream = var.os_stream
disk_size = var.disk_size
spot_price = var.worker_price
target_groups = var.worker_target_groups

View File

@ -13,16 +13,8 @@ data "aws_ami" "fedora-coreos" {
values = ["hvm"]
}
filter {
name = "name"
values = ["fedora-coreos-31.*.*.*-hvm"]
}
filter {
name = "description"
values = ["Fedora CoreOS stable*"]
values = ["Fedora CoreOS ${var.os_stream} *"]
}
# try to filter out dev images (AWS filters can't)
name_regex = "^fedora-coreos-31.[0-9]*.[0-9]*.[0-9]*-hvm*"
}

View File

@ -34,9 +34,9 @@ variable "instance_type" {
default = "t3.small"
}
variable "os_image" {
variable "os_stream" {
type = string
description = "AMI channel for Fedora CoreOS (not yet used)"
description = "Fedora CoreOs image stream for instances (e.g. stable, testing, next)"
default = "stable"
}