forked from finn/tinyboard
Compare commits
8 Commits
3e351f925d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ee67739f7 | ||
|
|
39f8f64351 | ||
|
|
e924579b2e | ||
|
|
912e553e06 | ||
|
|
98986e615b | ||
|
|
0e792be751 | ||
|
|
835793d396 | ||
|
|
11f9586c5e |
29
README.md
29
README.md
@@ -16,14 +16,14 @@ On a fresh Debian/Ubuntu VPS or server:
|
||||
apt install git
|
||||
git clone https://gut.oily.dad/justin/tinyboard
|
||||
cd tinyboard
|
||||
./setup.sh # choose option 4
|
||||
./setup.sh # option 4 (setup new hub)
|
||||
```
|
||||
|
||||
### Setting up a new Spoke
|
||||
|
||||
On a fresh Armbian device:
|
||||
|
||||
1. Modify `spoke/armbian.not_logged_in_yet` accordingly, then drop it onto the SD card as `/root/.not_logged_in_yet` before first boot (WiFi credentials)
|
||||
1. Modify `spoke/armbian.not_logged_in_yet` accordingly, then drop it onto the SD card as `/root/.not_logged_in_yet` before first boot (WiFi credentials) — see [Armbian Autoconfig docs](https://docs.armbian.com/User-Guide_Autoconfig/)
|
||||
2. Boot, SSH in as root
|
||||
3. Run:
|
||||
|
||||
@@ -31,8 +31,8 @@ On a fresh Armbian device:
|
||||
apt install git
|
||||
git clone https://gut.oily.dad/justin/tinyboard
|
||||
cd tinyboard
|
||||
./spoke/setup-network.sh # configure static IP — SSH session will drop, reconnect
|
||||
./setup.sh # choose option 1
|
||||
./setup.sh # option 0 (configure network)
|
||||
./setup.sh # option 1 (configure new spoke)
|
||||
```
|
||||
|
||||
### Onboarding a Spoke from the Hub
|
||||
@@ -41,14 +41,14 @@ Once the spoke tunnel is up, run on the hub:
|
||||
|
||||
```bash
|
||||
cd tinyboard
|
||||
./setup.sh # choose option 2
|
||||
./setup.sh # option 2 (onboard spoke)
|
||||
```
|
||||
|
||||
### Offboarding a Spoke from the Hub
|
||||
|
||||
```bash
|
||||
cd tinyboard
|
||||
./setup.sh # choose option 3
|
||||
./setup.sh # option 3 (offboard spoke)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -76,8 +76,8 @@ Spokes initiate outbound SSH connections to the hub, creating reverse tunnels. T
|
||||
```
|
||||
tinyboard/
|
||||
├── setup.sh ← entry point
|
||||
│ ├── setup-network.sh ← configure static IP before setup
|
||||
├── spoke/
|
||||
│ ├── setup-network.sh ← configure static IP before setup
|
||||
│ ├── setup-spoke.sh ← automated spoke setup
|
||||
│ ├── compose.yaml ← Docker Compose for autossh + syncthing
|
||||
│ ├── Dockerfile ← autossh container
|
||||
@@ -94,6 +94,7 @@ tinyboard/
|
||||
|
||||
### `setup.sh`
|
||||
Entry point. Presents a menu:
|
||||
0. Reconfigure network (static IP via netplan — SSH session will drop, reconnect)
|
||||
1. Set up this device as a new spoke
|
||||
2. Onboard a new spoke from the hub
|
||||
3. Offboard a spoke from the hub
|
||||
@@ -172,6 +173,20 @@ Before committing, ensure the following do not contain real credentials:
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### `apt update` fails with beta.armbian.com error
|
||||
|
||||
On some Armbian images, a beta apt repository is enabled by default and may cause `apt update` to fail. Comment it out:
|
||||
|
||||
```bash
|
||||
grep -r "beta.armbian" /etc/apt/sources.list /etc/apt/sources.list.d/
|
||||
```
|
||||
|
||||
Open the file that contains it (usually `/etc/apt/sources.list.d/armbian.sources`) and comment out or remove the line referencing `beta.armbian.com`, then run `apt update` again.
|
||||
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
**Spoke:** Armbian (Debian-based), ARM device, Docker, autossh, git
|
||||
|
||||
8
setup.sh
8
setup.sh
@@ -15,14 +15,20 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
header "TinyBoard Setup"
|
||||
echo ""
|
||||
echo " 0) Reconfigure network"
|
||||
echo " 1) Set up this device as a new spoke"
|
||||
echo " 2) Onboard a new spoke from the hub"
|
||||
echo " 3) Offboard a spoke from the hub"
|
||||
echo " 4) Set up this device as a new hub"
|
||||
echo ""
|
||||
read -rp "Choose [1/2/3/4]: " CHOICE
|
||||
read -rp "Choose [0/1/2/3/4]: " CHOICE
|
||||
|
||||
case "$CHOICE" in
|
||||
0)
|
||||
[ "$(id -u)" -eq 0 ] || die "Network reconfiguration must be run as root"
|
||||
info "Starting network reconfiguration..."
|
||||
exec "$SCRIPT_DIR/spoke/setup-network.sh"
|
||||
;;
|
||||
1)
|
||||
[ "$(id -u)" -eq 0 ] || die "Spoke setup must be run as root"
|
||||
info "Starting spoke setup..."
|
||||
|
||||
Reference in New Issue
Block a user