fi
done
+ # Make sure jinja2 is installed
+ for python_pkg in jinja2; do
+ if ! python3.4 -c "import $python_pkg"; then
+ echo "$python_pkg package not found for python3.4, attempting to install..."
+ if ! sudo easy_install-3.4 $python_pkg; then
+ echo -e "Failed to install $python_pkg package for python3.4"
+ exit 1
+ fi
+ fi
+ done
+
+ # Make sure ipxe-roms-qemu package is updated to latest.
+ # This package is needed for multi virtio nic PXE boot in virtual environment.
+ sudo yum update -y ipxe-roms-qemu
+
if [ -z ${PYTHONPATH:-} ]; then
export PYTHONPATH=${WORKSPACE}/lib/python
else
NETWORK_FILE="/root/network/network_settings.yaml"
INVENTORY_FILE="/root/inventory/pod_settings.yaml"
- if [ ! -e "$INVENTORY_FILE" ]; then
+ if ! sudo test -e "$INVENTORY_FILE"; then
echo "ERROR: Required settings file missing: Inventory settings file ${INVENTORY_FILE}"
+ exit 1
fi
# include inventory file for bare metal deployment
DEPLOY_CMD="${DEPLOY_CMD} -i ${INVENTORY_FILE}"
fi
# Check that network settings file exists
-if [ ! -e "$NETWORK_FILE" ]; then
- echo "ERROR: Required settings file missing for Network Settings"
- echo "Network settings file: ${NETWORK_FILE}"
+if ! sudo test -e "$NETWORK_FILE"; then
+ echo "ERROR: Required settings file missing: Network Settings file ${NETWORK_FILE}"
exit 1
fi