diff --git a/main.tf b/main.tf index c34eaf6..15ac841 100644 --- a/main.tf +++ b/main.tf @@ -25,41 +25,42 @@ locals { # ansible role that assigns roles based on wether or not 'master' is in the # name. "k8s-master" = { - base-image = var.ubuntu-ami + base-image = var.ubuntu-ami aws-ec2-type = var.t2-medium-4gib-2vcpu - subnet-ids = local.k8s-subnets-ids - num = 1 + subnet-ids = local.k8s-subnets-ids + num = 1 }, "k8s-wrkr" = { - base-image = var.ubuntu-ami + base-image = var.ubuntu-ami aws-ec2-type = var.c5a-xlarge-amd-8gib-4vcpu - subnet-ids = local.k8s-subnets-ids - disk-size = 32 - num = 2 + subnet-ids = local.k8s-subnets-ids + disk-size = 32 + num = 2 }, - "test" = { - base-image = var.ubuntu-ami - aws-ec2-type = var.t2-micro-1gib-1vcpu + "dev" = { + base-image = var.ubuntu-ami + aws-ec2-type = var.t3a-medium-amd-4gib-2vcpu # subnet-ids = [module.aws-network-from-scratch.subnet.id] - subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_2"].id] - num = 0 + subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id] + disk-size = 32 + num = 1 }, "nfs" = { - base-image = var.ubuntu-ami - aws-ec2-type = var.t3a-medium-amd-4gib-2vcpu - # subnet-ids = [module.aws-network-from-scratch.subnet.id] - subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id] - num = 1 - num-disks = 1 + base-image = var.ubuntu-ami + aws-ec2-type = var.t3a-medium-amd-4gib-2vcpu + # subnet-ids = [module.aws-network-from-scratch.subnet.id] + subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id] + num = 1 + num-disks = 1 zfs-disk-size = 10 }, "proxy" = { - base-image = var.ubuntu-ami + base-image = var.ubuntu-ami aws-ec2-type = var.t2-micro-1gib-1vcpu # subnet-ids = [module.aws-network-from-scratch.subnet.id] - subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id] - private-ips = [var.aws-proxy-private-ip] - num = 1 + subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id] + private-ips = [var.aws-proxy-private-ip] + num = 1 }, } @@ -79,11 +80,21 @@ locals { disk-group = "zfs-64g" # TODO also make sure that get drive letters or whetever still works. did # it ever work? - drive-letters = ["g"] + # TODO We need to have a map of drive letters to device path in linux. + # This gets a little more complicated becuase the t2 instances map to + # /dev/xvdg while the t3a instance types map to /dev/nvme0n1 where 0 is + # the nth drive connected. The nth drive does not seem to map to a drive + # letter, ie. drive letter "f" does not map to 6, the nth drive simply + # increments by 1 for each drive attached regardless of the drive letter + # set. + drive-letters = ["g", "h", "i"] }, ] install-qemu-agent = false + # TODO remove after nfs mounts are figured out. + # nfs_home_dir_mount = true + # nfs_server = } ################################################################################ diff --git a/variables.tf b/variables.tf index fbfe661..4620963 100644 --- a/variables.tf +++ b/variables.tf @@ -223,16 +223,16 @@ variable "c5a-xlarge-amd-8gib-4vcpu" { variable "ubuntu-img" { default = "https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64-disk-kvm.img" - description = "The libvirt image tp use for Ubuntu." + description = "The libvirt image to use for Ubuntu." } variable "centos7-img" { # Latest as of 2021-12-06. default = "https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-2111.qcow2" - description = "The libvirt image tp use for CentOS 7." + description = "The libvirt image to use for CentOS 7." } variable "centos8-img" { default = "https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2" - description = "The libvirt image tp use for CentOS 8." + description = "The libvirt image to use for CentOS 8." }