Skip to content

Instantly share code, notes, and snippets.

@Mudpuppy12
Created September 27, 2016 16:24
Show Gist options
  • Save Mudpuppy12/99c0a19985336f49edcaa0e4a4f96fbc to your computer and use it in GitHub Desktop.
Save Mudpuppy12/99c0a19985336f49edcaa0e4a4f96fbc to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Just a note, if your running this on a mac, sed sux, use gsed as it's not the same on ubuntu
if [ -z "$LAB_NAME" ]; then
echo "Need to set LAB_NAME before using."
exit
fi
UPPER_NAME="${LAB_NAME^^}"
./f5_config-old.py -f $1 -e ./data/$LAB_NAME.f5
# Strip out the external monitor and use TCP half open for lab environments
sed "s/ monitor \/$UPPER_NAME\/RPC-MON-EXT-ENDPOINT/ monitor \/Common\/tcp_half_open/g" -i ./data/$LAB_NAME.f5
# Lets not use the GALERA monitor either, in lab upgrades, use half open
sed "s/ monitor \/$UPPER_NAME\/${UPPER_NAME}_MON_GALERA/ monitor \/Common\/tcp_half_open/g" -i ./data/$LAB_NAME.f5
./f5_tmsh.py -f ./data/$LAB_NAME.f5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment