summaryrefslogtreecommitdiffstats
path: root/bin/helpers/launch-tozt
blob: 006cc1dfe24f7884ff1fbf3c8b4aa65217c99347 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
set -eu
set -o pipefail

# shellcheck source=functions.sh
. "$(dirname "$0")/functions.sh"

create_droplet tozt 4206344e-cf4f-11e8-a5a7-0a58ac1465db

echo "Assigning floating ip to tozt..."
# XXX this returns an error for some reason, but actually succeeds:
# Error: could not assign IP to droplet: json: cannot unmarshal number
# 2328181259 into Go struct field Action.resource_id of type int
doctl \
    -t "$(cat /mnt/digitalocean)" \
    compute floating-ip-action assign \
    138.197.58.11 \
    "$id" || true
echo "Done assigning floating ip"

provision_droplet tozt

echo "Done"