Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Fedora CoreOS OS image streams on AWS #727

Merged
merged 1 commit into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 1 addition & 9 deletions aws/fedora-coreos/kubernetes/ami.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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*"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally this filtered out development images published in us-east-1. Checked this and with the new description filter, next stream correctly picks the image listed on https://getfedora.org/en/coreos/download?tab=cloud_launchable&stream=next, not next-devel (i.e. development)

}
4 changes: 2 additions & 2 deletions aws/fedora-coreos/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
2 changes: 1 addition & 1 deletion aws/fedora-coreos/kubernetes/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 1 addition & 9 deletions aws/fedora-coreos/kubernetes/workers/ami.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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*"
}
4 changes: 2 additions & 2 deletions aws/fedora-coreos/kubernetes/workers/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down