diff --git a/scripts/create_vultr.sh b/scripts/create_vultr.sh index ebafc81f847187fd06c4f6281ea97d9e8aeb76d6..c2a1d38138ae5233c5da549df64604aeb3d6aac8 100755 --- a/scripts/create_vultr.sh +++ b/scripts/create_vultr.sh @@ -20,10 +20,12 @@ LABEL=$1 echo Label: $LABEL echo API key: $VULTR_API_KEY +VPSPLANID=${2:-29} + SSHKEYID=`curl -s https://api.vultr.com/v1/sshkey/list\?api_key\=$VULTR_API_KEY | cut -d\" -f2` echo Got your ssh key ID $SSHKEYID: -SUBID=`curl -s -d "DCID=24&VPSPLANID=29&OSID=179&label=$LABEL&SSHKEYID=$SSHKEYID" https://api.vultr.com/v1/server/create\?api_key\=$VULTR_API_KEY | cut -d\" -f4` +SUBID=`curl -s -d "DCID=24&VPSPLANID=$VPSPLANID&OSID=179&label=$LABEL&SSHKEYID=$SSHKEYID" https://api.vultr.com/v1/server/create\?api_key\=$VULTR_API_KEY | cut -d\" -f4` echo Got your SUB ID $SUBID: while : diff --git a/scripts/start.sh b/scripts/start.sh index cddbe18deb9e836759a9ba983de7334d6aafb9e2..b0548db67fe027667511f5811bb6e449e9702ccf 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -19,7 +19,7 @@ BACKUP_IP=`cat /etc/hosts | grep backup.test | cut -d" " -f1` # Create server for tests -$ROOT_DIR/scripts/create_vultr.sh server.test +$ROOT_DIR/scripts/create_vultr.sh server.test 30 cat $ROOT_DIR/configs/server.config | sed s/##BACKUP_IP##/$BACKUP_IP/g > /tmp/server.config scp /tmp/server.config root@server.test:/var/lib/coreos-install/user_data scp $ROOT_DIR/scripts/install.sh root@server.test:/tmp/install.sh