diskimage-builder/elements/deploy-baremetal/init.d/80-deploy
Jon-Paul Sullivan 0f12d45a50 Use provides to note an element provides deploy
Use "deploy" to denote that an element provides the deploy
capability for a ramdisk for tripleo installation purposes.

This will be a 3-part change to enable renaming deploy to
deploy-baremetal so that the generic "deploy" capability can
be used for the provides file, as a dependant change will have to
be made in tripleo-incubator.

The tripleo-incubator change is
I1ff4bb98c99dfe87ccc4fb19767b93e27707d3a7 and that swaps to using
deploy-baremetal in place of deploy for ramdisk creation when using
baremetal.

Change-Id: Ibb4026e8fc8ba6378061461c4796a91ab2fa991f
2014-04-18 20:10:46 +01:00

38 lines
797 B
Plaintext

if [ -z "$ISCSI_TARGET_IQN" ]; then
err_msg "iscsi_target_iqn is not defined"
troubleshoot
fi
t=0
while ! target_disk=$(find_disk "$DISK"); do
if [ $t -eq 10 ]; then
break
fi
t=$(($t + 1))
sleep 1
done
if [ -z "$target_disk" ]; then
err_msg "Could not find disk to use."
troubleshoot
fi
echo "start iSCSI target on $target_disk"
start_iscsi_target "$ISCSI_TARGET_IQN" "$target_disk" ALL
if [ $? -ne 0 ]; then
err_msg "Failed to start iscsi target."
troubleshoot
fi
echo "request boot server to deploy image"
d="i=$DEPLOYMENT_ID&k=$DEPLOYMENT_KEY&a=$BOOT_IP_ADDRESS&n=$ISCSI_TARGET_IQN&e=$FIRST_ERR_MSG"
wget --post-data "$d" "http://$BOOT_SERVER:10000"
echo "waiting for notice of complete"
nc -l -p 10000
echo "stop iSCSI target on $target_disk"
stop_iscsi_target