Skip to content

Commit

Permalink
ci: use more cost-effective ec2 instance type
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Chiu <[email protected]>
  • Loading branch information
yangchiu authored and innobead committed Feb 22, 2024
1 parent 385b3de commit b9686f3
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 56 deletions.
2 changes: 1 addition & 1 deletion build_engine_test_images/terraform/aws/ubuntu/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ variable "build_engine_aws_instance_name" {

variable "build_engine_aws_instance_type" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = ""
}

Expand Down
4 changes: 2 additions & 2 deletions scalability_test/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ variable "lh_aws_instance_name_controlplane" {

variable "lh_aws_instance_type_controlplane" {
type = string
default = "t2.xlarge"
default = "t3.xlarge"
}

variable "lh_aws_instance_type_worker" {
type = string
default = "t2.xlarge"
default = "t3.xlarge"
}

variable "lh_aws_instance_root_block_device_size_controlplane" {
Expand Down
14 changes: 7 additions & 7 deletions test_framework/terraform/aws/centos/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ variable "lh_aws_secret_key" {

variable "aws_region" {
type = string
default = "us-east-2"
default = "us-east-1"
}

variable "aws_availability_zone" {
type = string
default = "us-east-2c"
default = "us-east-1c"
}

variable "lh_aws_vpc_name" {
Expand Down Expand Up @@ -55,12 +55,12 @@ variable "lh_aws_instance_name_controlplane" {

variable "lh_aws_instance_type_controlplane" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
}

variable "lh_aws_instance_type_worker" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
}

variable "lh_aws_instance_root_block_device_size_controlplane" {
Expand Down Expand Up @@ -96,12 +96,12 @@ variable "k8s_distro_name" {

variable "k8s_distro_version" {
type = string
default = "v1.25.3+k3s1"
default = "v1.28.4+k3s1"
description = <<-EOT
kubernetes version that will be deployed
rke: (default: v1.22.5-rancher1-1)
k3s: (default: v1.25.3+k3s1)
rke2: (default: v1.25.3+rke2r1)
k3s: (default: v1.28.4+k3s1)
rke2: (default: v1.28.4+rke2r1)
EOT
}

Expand Down
2 changes: 1 addition & 1 deletion test_framework/terraform/aws/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ resource "aws_eks_node_group" "node_group" {
subnet_ids = module.vpc.public_subnets
ami_type = var.arch == "amd64" ? "AL2_x86_64" : "AL2_ARM_64"
capacity_type = "ON_DEMAND"
instance_types = [var.arch == "amd64" ? "t2.xlarge" : "a1.xlarge"]
instance_types = [var.arch == "amd64" ? "t3.xlarge" : "t4g.xlarge"]
disk_size = 40
scaling_config {
desired_size = 3
Expand Down
19 changes: 11 additions & 8 deletions test_framework/terraform/aws/oracle/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ variable "lh_aws_secret_key" {

variable "aws_region" {
type = string
default = "us-east-2"
default = "us-east-1"
}

variable "aws_availability_zone" {
type = string
default = "us-east-2a"
default = "us-east-1a"
}

variable "lh_aws_vpc_name" {
Expand All @@ -26,11 +26,12 @@ variable "lh_aws_vpc_name" {
variable "arch" {
type = string
description = "available values (amd64, arm64)"
default = "amd64"
}

variable "distro_version" {
type = string
default = "8.6"
default = "9.1"
}

variable "aws_ami_oraclelinux_account_number" {
Expand All @@ -55,12 +56,14 @@ variable "lh_aws_instance_name_controlplane" {

variable "lh_aws_instance_type_controlplane" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_type_worker" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_root_block_device_size_controlplane" {
Expand Down Expand Up @@ -96,12 +99,12 @@ variable "k8s_distro_name" {

variable "k8s_distro_version" {
type = string
default = "v1.25.3+k3s1"
default = "v1.28.4+k3s1"
description = <<-EOT
kubernetes version that will be deployed
rke: (default: v1.22.5-rancher1-1)
k3s: (default: v1.25.3+k3s1)
rke2: (default: v1.25.3+rke2r1)
k3s: (default: v1.28.4+k3s1)
rke2: (default: v1.28.4+rke2r1)
EOT
}

Expand Down
19 changes: 11 additions & 8 deletions test_framework/terraform/aws/rhel/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ variable "lh_aws_secret_key" {

variable "aws_region" {
type = string
default = "us-east-2"
default = "us-east-1"
}

variable "aws_availability_zone" {
type = string
default = "us-east-2a"
default = "us-east-1a"
}

variable "lh_aws_vpc_name" {
Expand All @@ -26,11 +26,12 @@ variable "lh_aws_vpc_name" {
variable "arch" {
type = string
description = "available values (amd64, arm64)"
default = "amd64"
}

variable "os_distro_version" {
type = string
default = "8.6.0"
default = "9.1.0"
}

variable "aws_ami_rhel_account_number" {
Expand All @@ -55,12 +56,14 @@ variable "lh_aws_instance_name_controlplane" {

variable "lh_aws_instance_type_controlplane" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_type_worker" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_root_block_device_size_controlplane" {
Expand Down Expand Up @@ -96,12 +99,12 @@ variable "k8s_distro_name" {

variable "k8s_distro_version" {
type = string
default = "v1.25.3+k3s1"
default = "v1.28.4+k3s1"
description = <<-EOT
kubernetes version that will be deployed
rke: (default: v1.22.5-rancher1-1)
k3s: (default: v1.25.3+k3s1)
rke2: (default: v1.25.3+rke2r1)
k3s: (default: v1.28.4+k3s1)
rke2: (default: v1.28.4+rke2r1)
EOT
}

Expand Down
19 changes: 11 additions & 8 deletions test_framework/terraform/aws/rockylinux/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ variable "lh_aws_secret_key" {

variable "aws_region" {
type = string
default = "us-east-2"
default = "us-east-1"
}

variable "aws_availability_zone" {
type = string
default = "us-east-2a"
default = "us-east-1a"
}

variable "lh_aws_vpc_name" {
Expand All @@ -26,11 +26,12 @@ variable "lh_aws_vpc_name" {
variable "arch" {
type = string
description = "available values (amd64, arm64)"
default = "amd64"
}

variable "os_distro_version" {
type = string
default = "9.2"
default = "9.3"
}

variable "aws_ami_rockylinux_account_number" {
Expand All @@ -55,12 +56,14 @@ variable "lh_aws_instance_name_controlplane" {

variable "lh_aws_instance_type_controlplane" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_type_worker" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_root_block_device_size_controlplane" {
Expand Down Expand Up @@ -96,12 +99,12 @@ variable "k8s_distro_name" {

variable "k8s_distro_version" {
type = string
default = "v1.25.3+k3s1"
default = "v1.28.4+k3s1"
description = <<-EOT
kubernetes version that will be deployed
rke: (default: v1.22.5-rancher1-1)
k3s: (default: v1.25.3+k3s1)
rke2: (default: v1.25.3+rke2r1)
k3s: (default: v1.28.4+k3s1)
rke2: (default: v1.28.4+rke2r1)
EOT
}

Expand Down
16 changes: 8 additions & 8 deletions test_framework/terraform/aws/sle-micro/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ variable "arch" {

variable "os_distro_version" {
type = string
default = "5.3"
default = "5.5"
}

variable "aws_ami_sles_account_number" {
Expand All @@ -56,14 +56,14 @@ variable "lh_aws_instance_name_controlplane" {

variable "lh_aws_instance_type_controlplane" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
default = "t2.xlarge"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_type_worker" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
default = "t2.xlarge"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_root_block_device_size_controlplane" {
Expand Down Expand Up @@ -99,12 +99,12 @@ variable "k8s_distro_name" {

variable "k8s_distro_version" {
type = string
default = "v1.25.3+k3s1"
default = "v1.28.4+k3s1"
description = <<-EOT
kubernetes version that will be deployed
rke: (default: v1.22.5-rancher1-1)
k3s: (default: v1.25.3+k3s1)
rke2: (default: v1.25.3+rke2r1)
k3s: (default: v1.28.4+k3s1)
rke2: (default: v1.28.4+rke2r1)
EOT
}

Expand Down
8 changes: 4 additions & 4 deletions test_framework/terraform/aws/sles/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ variable "lh_aws_instance_name_controlplane" {

variable "lh_aws_instance_type_controlplane" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
default = "t2.xlarge"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_type_worker" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
default = "t2.xlarge"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_root_block_device_size_controlplane" {
Expand Down
20 changes: 11 additions & 9 deletions test_framework/terraform/aws/ubuntu/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ variable "lh_aws_secret_key" {

variable "aws_region" {
type = string
default = "us-east-2"
default = "us-east-1"
}

variable "aws_availability_zone" {
type = string
default = "us-east-2a"
default = "us-east-1a"
}

variable "lh_aws_vpc_name" {
Expand All @@ -26,11 +26,12 @@ variable "lh_aws_vpc_name" {
variable "arch" {
type = string
description = "available values (amd64, arm64)"
default = "amd64"
}

variable "os_distro_version" {
type = string
default = "20.04"
default = "22.04"
}

variable "aws_ami_ubuntu_account_number" {
Expand All @@ -55,13 +56,14 @@ variable "lh_aws_instance_name_controlplane" {

variable "lh_aws_instance_type_controlplane" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"
description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_type_worker" {
type = string
description = "Recommended instance types t2.xlarge for amd64 & a1.xlarge for arm64"

description = "Recommended instance types t3.xlarge for amd64 & t4g.xlarge for arm64"
default = "t3.xlarge"
}

variable "lh_aws_instance_root_block_device_size_controlplane" {
Expand Down Expand Up @@ -97,12 +99,12 @@ variable "k8s_distro_name" {

variable "k8s_distro_version" {
type = string
default = "v1.25.3+k3s1"
default = "v1.28.4+k3s1"
description = <<-EOT
kubernetes version that will be deployed
rke: (default: v1.22.5-rancher1-1)
k3s: (default: v1.25.3+k3s1)
rke2: (default: v1.25.3+rke2r1)
k3s: (default: v1.28.4+k3s1)
rke2: (default: v1.28.4+rke2r1)
EOT
}

Expand Down

0 comments on commit b9686f3

Please sign in to comment.