For reference, the startup script for HFE 2.0 is given below:

Note

Use the snippet below to update the Metadata for HFE 2.0 node.

#!/bin/bash
HFE_DIR="/opt/HFE"
HFE_LOG_DIR="$HFE_DIR/log"
HFE_FILE="$HFE_DIR/HFE_GCE.sh"
LOG_FILE="$HFE_LOG_DIR/cloud-init-nat.log"
NAT_VAR="$HFE_DIR/natVars.input"
timestamp()
{
date +"%Y-%m-%d %T"
}
if [ ! -d $HFE_LOG_DIR ]; then
mkdir -p $HFE_LOG_DIR;
fi;
/bin/echo $(timestamp) " =========================    cloud-init configuration for HFE    ==========================================" >> $LOG_FILE
if [ $(grep -c 169.254.169.254 /etc/resolv.conf) -eq 0 ]; then
    sed -i.orig '/^nameserver.*/i nameserver 169.254.169.254' /etc/resolv.conf
fi
gsutil cp gs://<HFE_SCRIPT_LOCATION> $HFE_FILE
if [ $? -ne 0 ]; then
/bin/echo $(timestamp) "Error:Could not copy HFE script from Google Storage." >> $LOG_FILE
else
/bin/echo $(timestamp) "Copied HFE script from Google Storage." >> $LOG_FILE
fi;
/bin/echo >  $NAT_VAR
/bin/echo "ACTIVE_SBC_VM_NAME=\"<ACTIVE_SBC_NAME>\"" >> $NAT_VAR
/bin/echo "STANDBY_SBC_VM_NAME=\"<STANDBY_SBC_NAME>\"" >> $NAT_VAR
/bin/echo "REMOTE_SSH_MACHINE_IP=\"<REMOTE_SSH_MACHINE_IP>\"">> $NAT_VAR
/bin/echo "ZONE=\"<ZONE>\"">> $NAT_VAR
/bin/echo $(timestamp) "Copied natVars.input" >> $LOG_FILE
sudo chmod 744 $HFE_FILE
/bin/echo "Configured using HFE script - $HFE_FILE" >> $LOG_FILE
/bin/echo $(timestamp) " =========================   Done    ==========================================" >> $LOG_FILE
nohup $HFE_FILE setup > /dev/null 2>&1 &