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

0 downloads

dbbasic-object-primitive/stop_cluster.sh
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
stop_cluster.sh · 766 bytes · 30 lines
1#!/bin/bash
2# Stop the entire cluster
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 "=== Stopping ${WORKER_COUNT}-Station Cluster ==="
10echo
11
12echo "Stopping workers..."
13
14# Stop worker 1
15if [ -n "$WORKER1_SSH" ]; then
16 ssh "$WORKER1_SSH" 'killall python3' && echo "✓ $WORKER1_ID stopped" || echo "⚠ $WORKER1_ID not running"
17fi
18
19# Stop worker 2
20if [ -n "$WORKER2_SSH" ]; then
21 ssh "$WORKER2_SSH" 'killall python3' && echo "✓ $WORKER2_ID stopped" || echo "⚠ $WORKER2_ID not running"
22fi
23
24echo
25
26echo "Master ($MASTER_ID) still running on this machine"
27echo "Stop manually with Ctrl+C in terminal or: killall python"
28echo
29
30echo "=== Cluster Stopped ==="