Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions examples/create-image-from-s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@ echo "[+] Target name: ${NAME}"


echo "[+] Creating new server in rescue mode with a secondary volume..."
SERVER=$(scw create --bootscript=rescue --volume="${VOLUME_SIZE}" --env="AUTHORIZED_KEY=${KEY}" --name="image-writer-${NAME}" 1GB)
SERVER=$(scw run -d --bootscript=rescue --volume="${VOLUME_SIZE}" --env="AUTHORIZED_KEY=${KEY}" --name="image-writer-${NAME}" 1GB)
echo "[+] Server created: ${SERVER}"


echo "[+] Booting..."
scw start --wait --timeout=600 "${SERVER}" >/dev/null
#IP=$(scw inspect -f .server.public_ip.address "${SERVER}")
#echo "[+] SSH is ready (${IP})"
scw exec -w "${SERVER}" 'uname -a'
echo "[+] Server is booted"
scw exec "${SERVER}" 'uname -a'


echo "[+] Formating and mounting /dev/nbd1..."
Expand Down