Python functions as REST objects, with clustering, load balancing and state replication; no containers or orchestration.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-primitive.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-primitive.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-primitive.git

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

Dan Q Consolidate duplicate QUICKSTARTs on the top-level file 503f830 7 months ago History
deploy.sh · 1.0 KB · 32 lines
1#!/bin/bash
2# Deploy code to all stations
3# Run this from the master station
4# Reads configuration from cluster.tsv
5
6# Load cluster configuration
7eval "$(python cluster_shell_helper.py)"
8
9echo "=== Deploying to All Stations ==="
10echo
11
12# Deploy to worker 1
13if [ -n "$WORKER1_SSH" ]; then
14 echo "Deploying to $WORKER1_ID ($WORKER1_HOST)..."
15 rsync -av --exclude='.venv' --exclude='data' --exclude='__pycache__' --exclude='.git' --exclude='_to_move' --exclude='cluster.tsv' \
16 ./ ${WORKER1_SSH}:~/multiplexing/
17 echo "✓ $WORKER1_ID deployed"
18 echo
19fi
20
21# Deploy to worker 2
22if [ -n "$WORKER2_SSH" ]; then
23 echo "Deploying to $WORKER2_ID ($WORKER2_HOST)..."
24 rsync -av --exclude='.venv' --exclude='data' --exclude='__pycache__' --exclude='.git' --exclude='_to_move' --exclude='cluster.tsv' \
25 ./ ${WORKER2_SSH}:~/multiplexing/
26 echo "✓ $WORKER2_ID deployed"
27 echo
28fi
29
30echo "=== Deployment Complete ==="
31echo "Servers will auto-reload (uvicorn --reload=True)"
32echo "Run ./restart_cluster.sh to restart heartbeat daemons with new version"