Checking in to share with other others.

new-vpc
Curtis Wilson 4 years ago
parent b9ed4a37d5
commit 8d0c8878bd

@ -25,41 +25,42 @@ locals {
# ansible role that assigns roles based on wether or not 'master' is in the # ansible role that assigns roles based on wether or not 'master' is in the
# name. # name.
"k8s-master" = { "k8s-master" = {
base-image = var.ubuntu-ami base-image = var.ubuntu-ami
aws-ec2-type = var.t2-medium-4gib-2vcpu aws-ec2-type = var.t2-medium-4gib-2vcpu
subnet-ids = local.k8s-subnets-ids subnet-ids = local.k8s-subnets-ids
num = 1 num = 1
}, },
"k8s-wrkr" = { "k8s-wrkr" = {
base-image = var.ubuntu-ami base-image = var.ubuntu-ami
aws-ec2-type = var.c5a-xlarge-amd-8gib-4vcpu aws-ec2-type = var.c5a-xlarge-amd-8gib-4vcpu
subnet-ids = local.k8s-subnets-ids subnet-ids = local.k8s-subnets-ids
disk-size = 32 disk-size = 32
num = 2 num = 2
}, },
"test" = { "dev" = {
base-image = var.ubuntu-ami base-image = var.ubuntu-ami
aws-ec2-type = var.t2-micro-1gib-1vcpu aws-ec2-type = var.t3a-medium-amd-4gib-2vcpu
# subnet-ids = [module.aws-network-from-scratch.subnet.id] # subnet-ids = [module.aws-network-from-scratch.subnet.id]
subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_2"].id] subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id]
num = 0 disk-size = 32
num = 1
}, },
"nfs" = { "nfs" = {
base-image = var.ubuntu-ami base-image = var.ubuntu-ami
aws-ec2-type = var.t3a-medium-amd-4gib-2vcpu aws-ec2-type = var.t3a-medium-amd-4gib-2vcpu
# subnet-ids = [module.aws-network-from-scratch.subnet.id] # subnet-ids = [module.aws-network-from-scratch.subnet.id]
subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id] subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id]
num = 1 num = 1
num-disks = 1 num-disks = 1
zfs-disk-size = 10 zfs-disk-size = 10
}, },
"proxy" = { "proxy" = {
base-image = var.ubuntu-ami base-image = var.ubuntu-ami
aws-ec2-type = var.t2-micro-1gib-1vcpu aws-ec2-type = var.t2-micro-1gib-1vcpu
# subnet-ids = [module.aws-network-from-scratch.subnet.id] # subnet-ids = [module.aws-network-from-scratch.subnet.id]
subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id] subnet-ids = [module.aws-network-existing.subnet-by-name["subnet_4"].id]
private-ips = [var.aws-proxy-private-ip] private-ips = [var.aws-proxy-private-ip]
num = 1 num = 1
}, },
} }
@ -79,11 +80,21 @@ locals {
disk-group = "zfs-64g" disk-group = "zfs-64g"
# TODO also make sure that get drive letters or whetever still works. did # TODO also make sure that get drive letters or whetever still works. did
# it ever work? # 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 install-qemu-agent = false
# TODO remove after nfs mounts are figured out.
# nfs_home_dir_mount = true
# nfs_server =
} }
################################################################################ ################################################################################

@ -223,16 +223,16 @@ variable "c5a-xlarge-amd-8gib-4vcpu" {
variable "ubuntu-img" { variable "ubuntu-img" {
default = "https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64-disk-kvm.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" { variable "centos7-img" {
# Latest as of 2021-12-06. # Latest as of 2021-12-06.
default = "https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-2111.qcow2" 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" { variable "centos8-img" {
default = "https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2" 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."
} }

Loading…
Cancel
Save