From 8f9945f6fde535f5383c58da354ff411e80968c0 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Sat, 29 Jul 2017 20:17:34 -0500 Subject: [PATCH] Nova: Update bootstrap job This PS updates the nova boostrap job, both bringing it inline with other services and also adding the default flavours from Mitaka. By setting the m1.tiny size to match the upstream it is expected that the majority of gate failures will be solved - as many of the VMs in nodepool do not have 20GB of free space on the rootfs. Change-Id: I767795015422a1b326a6f34b5a3f50bf41a0ca4b --- nova/templates/bin/_bootstrap.sh.tpl | 7 +++-- nova/templates/job-bootstrap.yaml | 2 ++ nova/values.yaml | 39 +++++++++++++++++++++++----- 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/nova/templates/bin/_bootstrap.sh.tpl b/nova/templates/bin/_bootstrap.sh.tpl index 0d31fb312d..8f1c8872ca 100644 --- a/nova/templates/bin/_bootstrap.sh.tpl +++ b/nova/templates/bin/_bootstrap.sh.tpl @@ -17,9 +17,8 @@ set -ex export HOME=/tmp -{{ if .Values.bootstrap.enabled }} - -{{ range .Values.bootstrap.flavors }} +{{ if .Values.bootstrap.flavors.enabled }} +{{ range .Values.bootstrap.flavors.options }} openstack flavor show {{ .name }} || \ openstack flavor create {{ .name }} \ --id {{ .id }} \ @@ -27,7 +26,7 @@ openstack flavor show {{ .name }} || \ --disk {{ .disk }} \ --vcpus {{ .vcpus }} {{ end }} - {{ end }} +{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }} exit 0 diff --git a/nova/templates/job-bootstrap.yaml b/nova/templates/job-bootstrap.yaml index 194d270c63..780d5730a0 100644 --- a/nova/templates/job-bootstrap.yaml +++ b/nova/templates/job-bootstrap.yaml @@ -13,6 +13,7 @@ # limitations under the License. {{- $envAll := . }} +{{- if .Values.bootstrap.enabled }} {{- $dependencies := .Values.dependencies.bootstrap }} {{- $mounts_nova_bootstrap := .Values.pod.mounts.nova_bootstrap.nova_bootstrap }} {{- $mounts_nova_bootstrap_init := .Values.pod.mounts.nova_bootstrap.init_container }} @@ -60,3 +61,4 @@ spec: name: nova-bin defaultMode: 0555 {{- if $mounts_nova_bootstrap.volumes }}{{ toYaml $mounts_nova_bootstrap.volumes | indent 8 }}{{ end }} +{{- end }} diff --git a/nova/values.yaml b/nova/values.yaml index 1cbd58b3b2..76bc7d57cc 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -67,13 +67,40 @@ images: bootstrap: enabled: true + script: null flavors: - m1_tiny: - name: "m1.tiny" - id: "auto" - ram: 512 - disk: 20 - vcpus: 1 + enabled: true + options: + m1_tiny: + name: "m1.tiny" + id: "auto" + ram: 512 + disk: 1 + vcpus: 1 + m1_small: + name: "m1.small" + id: "auto" + ram: 2048 + disk: 20 + vcpus: 1 + m1_medium: + name: "m1.medium" + id: "auto" + ram: 4096 + disk: 40 + vcpus: 2 + m1_large: + name: "m1.large" + id: "auto" + ram: 8192 + disk: 80 + vcpus: 4 + m1_xlarge: + name: "m1.xlarge" + id: "auto" + ram: 16384 + disk: 160 + vcpus: 8 network: dns: