Skip to content

Commit

Permalink
libvirt: Add Terraform variables for memory/CPU, bump master to 4GiB
Browse files Browse the repository at this point in the history
My main dev environment is a Lenovo P50 with 64GB of RAM - I got
it specifically to run some large VMs (and/or many VMs) specifically
with OpenShift in mind.

First, default masters to 4096.

And for me, increasing RAM on my master to 8GB is a *very* noticeable speed improvement
and I think reliabilty; before I saw the apiserver be `OOMKilled`
sometimes, and `kswapd0` was constantly doing writeback.

These variables aren't bubbled all the way up to the documented
installer config, but one can now do e.g.:

```
$ env TF_VAR_tectonic_libvirt_memory=8192 TF_VAR_tectonic_libvirt_vcpu=4 ./bin/openshift-install create cluster --dir=osiris
```

Previously:

 - openshift#408
 - openshift#163
  • Loading branch information
cgwalters committed Dec 4, 2018
1 parent 4ec4ca6 commit f9afd06
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/data/libvirt/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ resource "libvirt_domain" "master" {

name = "${var.tectonic_cluster_name}-master-${count.index}"

memory = "3072"
vcpu = "2"
memory = "${var.tectonic_libvirt_memory}"
vcpu = "${var.tectonic_libvirt_vcpu}"

coreos_ignition = "${libvirt_ignition.master.id}"

Expand Down
12 changes: 12 additions & 0 deletions data/data/libvirt/variables-libvirt.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,15 @@ variable "tectonic_libvirt_master_ips" {
type = "list"
description = "the list of desired master ips. Must match tectonic_master_count"
}

variable "tectonic_libvirt_memory" {
type = "string"
description = "RAM in MiB allocated to master and nodes"
default = "4096"
}

variable "tectonic_libvirt_vcpu" {
type = "string"
description = "CPUs allocated to master and nodes"
default = "2"
}

0 comments on commit f9afd06

Please sign in to comment.