From 5b8077f3bd8dae018a05b8622ff7d5e37405bf60 Mon Sep 17 00:00:00 2001 From: Michiel de Jong Date: Tue, 10 Mar 2015 14:18:34 +0100 Subject: [PATCH] fix ./script/ -> ./scripts/ and add verbosity --- README.md | 4 ++-- scripts/create_vultr.sh | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a09be90..01e716d 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ There is a script that provision 2 VMs on Vutlr for tests purpose. /!\ This is still in dev, use it at your own risk /!\ ``` -export VULTR_API_KEY= -./script/start.sh #need root access to modify your /etc/hosts +#need root access to modify your /etc/hosts: +sudo export VULTR_API_KEY= abcd ./scripts/start.sh ssh root@server.test cd /data/indiehosters ./tests/start.sh diff --git a/scripts/create_vultr.sh b/scripts/create_vultr.sh index 45b9c77..eeff000 100755 --- a/scripts/create_vultr.sh +++ b/scripts/create_vultr.sh @@ -18,9 +18,14 @@ function valid_ip() LABEL=$1 +echo Label: $LABEL +echo API key: $VULTR_API_KEY + 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` +echo Got your SUB ID $SUBID: while : do -- GitLab