openstack-helm/nova/templates/bin/_bootstrap.sh.tpl
Cliff Parsons 58291db1a6 Add capability to wait on compute nodes
This patchset adds the capability to the Nova chart to be able to wait
for a percentage of the compute nodes/hypervisors to become ready/available
before continuing on with the deployment. It will be disabled by default,
because this is a feature that may or may not be needed in production
deployments.

Change-Id: I971151a663afc87e7d62efa4ab3723c5472a3736
2019-12-17 02:48:49 +00:00

40 lines
1.2 KiB
Smarty

#!/bin/bash
{{/*
Copyright 2017 The Openstack-Helm Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
set -ex
export HOME=/tmp
{{ if .Values.bootstrap.structured.flavors.enabled }}
{{ range .Values.bootstrap.structured.flavors.options }}
openstack flavor show {{ .name }} || \
openstack flavor create {{ .name }} \
--id {{ .id }} \
--ram {{ .ram }} \
--disk {{ .disk }} \
--vcpus {{ .vcpus }}
{{ end }}
{{ end }}
{{ if .Values.bootstrap.wait_for_computes.enabled }}
{{ .Values.bootstrap.wait_for_computes.scripts.wait_script }}
{{ else }}
echo 'Wait for Computes script not enabled'
{{ end }}
{{ .Values.bootstrap.script | default "echo 'No other bootstrap customizations found.'" }}