airshipctl/manifests/function/ironic-deployment/v0.5.0/entrypoint/init-bootstrap
SirishaGopigiri c7e5c76642 CAPM3, BMO and Ironic manifests
The below PS has manifests files related to
capm3, bmo and ironic for v0.5.0 versions.

Relates-To: #518 #558 #560
Change-Id: Id9240320bc8dec32d5e5384c39e26ba04f55f9bd
2021-10-13 13:26:24 -05:00

37 lines
892 B
Bash

#!/usr/bin/env bash
set -xe
#Configure vars for rendering
pushd /ironic-vars
rm -f /shared/sed_commands
for var_name in $( ls ) ; do
echo -n s!\$\($var_name\)! >> /shared/sed_commands
cat $var_name >> /shared/sed_commands
echo !g >> /shared/sed_commands
export $var_name=$(cat $var_name)
done
popd
while ! ip -br addr show | grep -q "$PROVISIONING_IP/"; do
echo 'Waiting for provisioning ip'
sleep 5;
done
mkdir -p /shared/{tftpboot,ironic_prometheus_exporter,html/{images,pxelinux.cfg},log/{dnsmasq,httpd,ironic,ironic-inspector/ramdisk,mariadb}/}
# Remove log files from last deployment
rm -rf /shared/log/httpd/*
rm -rf /shared/log/ironic/*
rm -rf /shared/log/ironic-inspector/*
# Rendering files to shared mount
pushd /cfg
for f in $( ls ); do
sed -f /shared/sed_commands $f > /shared/$f
done
popd
chmod -R 0777 /shared/html
touch /shared/init_finished