Copy of github.com/askrobots/network-computer (MIT): a desk you reach from anything. The original lives on GitHub.

2 downloads

network-computer/infra/create-vultr.sh
Download zip
Clone
Clone with git
git clone https://gitstable.com/git/demo/network-computer.git
HTTPS
https://gitstable.com/git/demo/network-computer.git
SSH
ssh://git@gitstable.com:2222/demo/network-computer.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

GitStable demo README: say this is a copy and where the original is cde82c2 13 hours, 36 minutes ago History
create-vultr.sh · 1.3 KB · 26 lines
1#!/bin/sh
2# Create a Vultr instance in Dallas (dfw) and provision it.
3# Needs: vultr-cli (brew install vultr-cli) and VULTR_API_KEY set,
4# or ~/.vultr-cli.yaml. Get a key at https://my.vultr.com/settings/#settingsapi
5# Usage: infra/create-vultr.sh [name] [region] [plan]
6set -e
7NAME=${1:-nc-dallas}; REGION=${2:-dfw}; PLAN=${3:-vc2-2c-4gb}
8DIR=$(dirname "$0")
9command -v vultr-cli >/dev/null || { echo "install vultr-cli: brew install vultr-cli"; exit 1; }
10
11# newest Ubuntu 24.04 image id, and an SSH key id (upload your key if none)
12OS=$(vultr-cli os list | awk '/Ubuntu 24.04/{print $1; exit}')
13[ -n "$OS" ] || { echo "could not find Ubuntu 24.04 OS id"; exit 1; }
14KEY=$(vultr-cli ssh-key list | awk 'NR==2{print $1}')
15[ -n "$KEY" ] || { echo "no SSH key in Vultr. Add one:"; echo " vultr-cli ssh-key create --name mac --key \"\$(cat ~/.ssh/id_ed25519.pub)\""; exit 1; }
16
17echo "creating $NAME in $REGION ($PLAN)..."
18ID=$(vultr-cli instance create --region "$REGION" --plan "$PLAN" --os "$OS" --host "$NAME" --ssh-keys "$KEY" | awk '/^ID/{print $2}')
19echo "instance $ID, waiting for IP..."
20IP=""
21for i in $(seq 1 40); do
22 IP=$(vultr-cli instance get "$ID" | awk '/^MAIN IP/{print $3}')
23 [ -n "$IP" ] && [ "$IP" != "0.0.0.0" ] && break; sleep 5
24done
25echo "ip: $IP"
26sh "$DIR/provision-host.sh" "$IP" "$NAME"