8060aa9783
Updated configurations to point to openstack-helm-infra for reference to helm-toolkit as helm-toolkit has been removed from the openstack-helm repo [0] Also aligned with changes to the keystone user set up in OSH using Helm ToolKit so as to get pass Helm Lint. [0] https://review.openstack.org/#/c/558065/ Change-Id: I10645c907565df4fd7920ae6ef0615348517f969
68 lines
1.7 KiB
Bash
Executable File
68 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright 2017 AT&T Intellectual Property. All other rights reserved.
|
|
#
|
|
# 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 -eux
|
|
|
|
HELM=${1}
|
|
HELM_PIDFILE=${2}
|
|
SERVE_DIR=$(mktemp -d)
|
|
|
|
${HELM} init --client-only
|
|
|
|
if [[ -s ${HELM_PIDFILE} ]]; then
|
|
HELM_PID=$(cat "${HELM_PIDFILE}")
|
|
if ps "${HELM_PID}"; then
|
|
kill "${HELM_PID}"
|
|
sleep 0.5
|
|
if ps "${HELM_PID}"; then
|
|
echo Failed to terminate Helm, PID = "${HELM_PID}"
|
|
exit 1
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
${HELM} serve & > /dev/null
|
|
HELM_PID=${!}
|
|
echo Started Helm, PID = "${HELM_PID}"
|
|
echo "${HELM_PID}" > "${HELM_PIDFILE}"
|
|
|
|
set +x
|
|
if [[ -z $(curl -s 127.0.0.1:8879 | grep 'Helm Repository') ]]; then
|
|
while [[ -z $(curl -s 127.0.0.1:8879 | grep 'Helm Repository') ]]; do
|
|
sleep 1
|
|
echo "Waiting for Helm Repository"
|
|
done
|
|
else
|
|
echo "Helm serve already running"
|
|
fi
|
|
set -x
|
|
|
|
if ${HELM} repo list | grep -q "^stable" ; then
|
|
${HELM} repo remove stable
|
|
fi
|
|
|
|
${HELM} repo add local http://localhost:8879/charts
|
|
|
|
{
|
|
cd "${SERVE_DIR}"
|
|
git clone --depth 1 https://git.openstack.org/openstack/openstack-helm-infra.git || true
|
|
cd openstack-helm-infra
|
|
|
|
make helm-toolkit
|
|
}
|
|
|
|
rm -rf "${SERVE_DIR}"
|