demo / network-computer
Public
Copy of github.com/askrobots/network-computer (MIT): a desk you reach from anything. The original lives on GitHub.
GitStable demo
README: say this is a copy and where the original is
cde82c2
13 hours, 36 minutes ago
History
create-linode.sh · 860 bytes · 17 lines
| 1 | #!/bin/sh |
| 2 | # Create a Linode (Akamai) in Dallas (us-central) and provision it. |
| 3 | # Needs: linode-cli (brew install linode-cli), configured with a token |
| 4 | # (linode-cli configure). Token: https://cloud.linode.com/profile/tokens |
| 5 | # Usage: infra/create-linode.sh [name] [region] [type] |
| 6 | set -e |
| 7 | NAME=${1:-nc-dallas}; REGION=${2:-us-central}; TYPE=${3:-g6-standard-2} |
| 8 | DIR=$(dirname "$0") |
| 9 | command -v linode-cli >/dev/null || { echo "install linode-cli: brew install linode-cli && linode-cli configure"; exit 1; } |
| 10 | KEY=$(cat ~/.ssh/id_ed25519.pub) |
| 11 | |
| 12 | echo "creating $NAME in $REGION ($TYPE)..." |
| 13 | IP=$(linode-cli linodes create --label "$NAME" --region "$REGION" --type "$TYPE" \ |
| 14 | --image linode/ubuntu24.04 --root_pass "$(head -c16 /dev/urandom | base64)" \ |
| 15 | --authorized_keys "$KEY" --text --no-headers --format ipv4) |
| 16 | echo "ip: $IP" |
| 17 | sh "$DIR/provision-host.sh" "$IP" "$NAME" |