docker wait ipa-downloader
+ if [ ! -e "$IRONIC_DATA_DIR/html/images/ironic-python-agent.kernel" ] ||
+ [ ! -e "$IRONIC_DATA_DIR/html/images/ironic-python-agent.initramfs" ]; then
+ echo "Failed to get ironic-python-agent"
+ exit 1
+ fi
+
# Start dnsmasq, http, mariadb, and ironic containers using same image
# See this file for env vars you can set, like IP, DHCP_RANGE, INTERFACE
docker run -d --net host --privileged --name dnsmasq \
fi
}
-function install_dhcp {
- if [ ! -d $BS_DHCP_DIR ]; then
- mkdir -p $BS_DHCP_DIR
- fi
-
- #make sure the dhcp conf sample are configured
- if [ ! -f $BS_DHCP_DIR/dhcpd.conf ]; then
- cp $PWD/05_dhcp.conf.sample $BS_DHCP_DIR/dhcpd.conf
- fi
-
- kubectl create -f $PWD/04_dhcp.yaml
-}
-
-function reset_dhcp {
- kubectl delete -f $PWD/04_dhcp.yaml
- if [ -d $BS_DHCP_DIR ]; then
- rm -rf $BS_DHCP_DIR
- fi
-}
-
function create_ironic_env {
cat <<EOF > ${PWD}/ironic.env
PROVISIONING_INTERFACE=provisioning
install online
elif [ "$1" == "-o" ]; then
install offline
-elif [ "$1" == "--dhcp-start" ]; then
- install_dhcp
- echo "wait for 320s for nodes to be assigned"
- sleep 6m
-elif [ "$1" == "--dhcp-reset" ]; then
- reset_dhcp
- echo "wait for 320s for nodes to be re-assigned"
- sleep 6m
else
exit 1
fi