Merge "Select addons namespace with kubectl in e2e tests"
[icn.git] / env / metal3 / 03_launch_prereq.sh
index 8b2b056..7559f2f 100755 (executable)
@@ -87,6 +87,12 @@ function install_ironic_container {
 
     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 \
@@ -148,7 +154,7 @@ function install_dhcp {
 }
 
 function reset_dhcp {
-    kubectl delete -f $PWD/04_dhcp.yaml
+    kubectl delete --ignore-not-found=true -f $PWD/04_dhcp.yaml
     if [ -d $BS_DHCP_DIR ]; then
         rm -rf $BS_DHCP_DIR
     fi
@@ -158,6 +164,7 @@ function create_ironic_env {
     cat <<EOF > ${PWD}/ironic.env
 PROVISIONING_INTERFACE=provisioning
 DHCP_RANGE=172.22.0.10,172.22.0.100
+IPA_BASEURI=https://images.rdoproject.org/train/rdo_trunk/current-tripleo
 DEPLOY_KERNEL_URL=http://172.22.0.1/images/ironic-python-agent.kernel
 DEPLOY_RAMDISK_URL=http://172.22.0.1/images/ironic-python-agent.initramfs
 IRONIC_ENDPOINT=http://172.22.0.1:6385/v1/