4 SCRIPTDIR="$(readlink -f $(dirname ${BASH_SOURCE[0]}))"
5 LIBDIR="$(dirname $(dirname ${SCRIPTDIR}))/env/lib"
7 source $LIBDIR/logging.sh
8 source $LIBDIR/common.sh
14 kubectl get all -n ${NAMEPREFIX}-system
17 # This may be used to update the in-place Ironic YAML files from the
18 # upstream project. We cannot use the upstream sources directly as
19 # they require an envsubst step before kustomize build.
20 function build_source {
21 clone_baremetal_operator_repository
23 KUSTOMIZATION_FILES=$(find ${BMOPATH}/ironic-deployment/{default,ironic} -type f)
24 for src in ${KUSTOMIZATION_FILES}; do
25 dst=${src/${BMOPATH}\/ironic-deployment/${SCRIPTDIR}\/base}
26 mkdir -p $(dirname ${dst})
27 envsubst <${src} >${dst}
33 kustomize build ${SCRIPTDIR}/icn | kubectl apply -f -
34 kubectl wait --for=condition=Available --timeout=600s deployment/${NAMEPREFIX}-ironic -n ${NAMEPREFIX}-system
38 kustomize build ${SCRIPTDIR}/icn | kubectl delete -f -
42 "build-source") build_source ;;
46 Usage: $(basename $0) COMMAND
49 build-source - Rebuild the in-tree Ironic YAML files
51 deploy - Deploy Ironic