Configure Jetson Orin with Tailscale client connecting to Headscale coordination server at tailscale.vayrette.com:8180. Device registers as 'saltylab-orin' with persistent auth key for unattended login. Features: - systemd auto-start and restart on WiFi drops - Persistent auth key storage at /opt/saltybot/tailscale-auth.key - SSH + HTTP access over Tailscale tailnet (encrypted WireGuard) - IP forwarding enabled for relay/exit node capability - WiFi resilience with aggressive restart policy - MQTT reporting of VPN status, IP, and connection type Components added: - jetson/scripts/setup-tailscale.sh: Tailscale package installation - jetson/scripts/headscale-auth-helper.sh: Auth key management utility - jetson/systemd/tailscale-vpn.service: systemd service unit - jetson/docs/headscale-vpn-setup.md: Comprehensive setup documentation - saltybot_cellular/vpn_status_node.py: ROS2 node for MQTT reporting Updated: - jetson/systemd/install_systemd.sh: Include tailscale-vpn.service - jetson/scripts/setup-jetson.sh: Add Tailscale setup steps Access patterns: - SSH: ssh user@saltylab-orin.tail12345.ts.net - HTTP: http://saltylab-orin.tail12345.ts.net:port - Direct IP: 100.x.x.x (Tailscale allocated address) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
38 lines
1.2 KiB
Bash
38 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
# install_systemd.sh — Install saltybot systemd services on Orin
|
|
# Run as root: sudo ./systemd/install_systemd.sh
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_DIR="$(dirname "${SCRIPT_DIR}")"
|
|
SYSTEMD_DIR="/etc/systemd/system"
|
|
DEPLOY_DIR="/opt/saltybot/jetson"
|
|
|
|
log() { echo "[install_systemd] $*"; }
|
|
|
|
[[ "$(id -u)" == "0" ]] || { echo "Run as root"; exit 1; }
|
|
|
|
# Deploy repo to /opt/saltybot/jetson
|
|
log "Deploying to ${DEPLOY_DIR}..."
|
|
mkdir -p "${DEPLOY_DIR}"
|
|
rsync -a --exclude='.git' --exclude='__pycache__' \
|
|
"${REPO_DIR}/" "${DEPLOY_DIR}/"
|
|
|
|
# Install service files
|
|
log "Installing systemd units..."
|
|
cp "${SCRIPT_DIR}/saltybot.target" "${SYSTEMD_DIR}/"
|
|
cp "${SCRIPT_DIR}/saltybot-social.service" "${SYSTEMD_DIR}/"
|
|
cp "${SCRIPT_DIR}/tailscale-vpn.service" "${SYSTEMD_DIR}/"
|
|
|
|
# Reload and enable
|
|
systemctl daemon-reload
|
|
systemctl enable saltybot.target
|
|
systemctl enable saltybot-social.service
|
|
systemctl enable tailscale-vpn.service
|
|
|
|
log "Services installed. Start with:"
|
|
log " systemctl start saltybot-social"
|
|
log " systemctl start tailscale-vpn"
|
|
log " journalctl -fu saltybot-social"
|
|
log " journalctl -fu tailscale-vpn"
|