create cluster in 3 regions

master
Jeff Moe 4 years ago
parent 60ec0f392d
commit c6d5047910

@ -18,11 +18,13 @@
# Set static variables here
EQXIPXEURL="https://code.forksand.com/forksand/eqx/raw/branch/master/ipxe-install-debian-10"
EQXFACILITY="da11"
EQXFACILITY2="am6"
EQXFACILITY3="sg1"
#EQXOS="debian_10"
EQXOS="custom_ipxe"
EQXPLAN="c3.small.x86"
EQXPLAN="m3.large.x86"
EQXTAGS="cluster"
EQXSPOTOVER=".00"
EQXSPOTOVER=".05"
# Probably leave these variables alone
# Set max price at current spot plus EQXSPOTOVER from above
@ -34,7 +36,7 @@ if [[ $1 == "" ]]
else eqx-create-project "$EQXPROJECT"
fi
EQXHOSTNAME=`dd bs=12 count=1 if=/dev/random 2>/dev/null | base64 | tr [:upper:] [:lower:] | tr -dc [:alpha:]`
#EQXHOSTNAME=`dd bs=12 count=1 if=/dev/random 2>/dev/null | base64 | tr [:upper:] [:lower:] | tr -dc [:alpha:]`
EQXPROJECTID=`eqx-get-project-uuid $EQXPROJECT`
echo "Spot: $EQXSPOT"
@ -43,7 +45,7 @@ echo "Project: $EQXPROJECT"
echo "ProjectID: $EQXPROJECTID"
echo "Facility: $EQXFACILITY"
echo "Plan: $EQXPLAN"
echo "Hostname: $EQXHOSTNAME"
#echo "Hostname: $EQXHOSTNAME"
echo "OS: $EQXOS"
echo "Tag: $EQXTAGS"
@ -53,7 +55,29 @@ packet device create \
--spot-price-max="$EQXSPOTMAX" \
--project-id "$EQXPROJECTID" \
--facility "$EQXFACILITY" \
--hostname "$EQXHOSTNAME" \
--hostname "$EQXHPROJECT-$EQXFACILITY" \
--operating-system "$EQXOS" \
--ipxe-script-url "$EQXIPXEURL" \
--tags "$EQXTAGS"
packet device create \
--plan "$EQXPLAN" \
--spot-instance \
--spot-price-max="$EQXSPOTMAX" \
--project-id "$EQXPROJECTID" \
--facility "$EQXFACILITY2" \
--hostname "$EQXHPROJECT-$EQXFACILITY2" \
--operating-system "$EQXOS" \
--ipxe-script-url "$EQXIPXEURL" \
--tags "$EQXTAGS"
packet device create \
--plan "$EQXPLAN" \
--spot-instance \
--spot-price-max="$EQXSPOTMAX" \
--project-id "$EQXPROJECTID" \
--facility "$EQXFACILITY3" \
--hostname "$EQXHPROJECT-$EQXFACILITY3" \
--operating-system "$EQXOS" \
--ipxe-script-url "$EQXIPXEURL" \
--tags "$EQXTAGS"

Loading…
Cancel
Save