Files
microdao-daarion/scripts/prepare_cluster.sh
Apple ef3473db21 snapshot: NODE1 production state 2026-02-09
Complete snapshot of /opt/microdao-daarion/ from NODE1 (144.76.224.179).
This represents the actual running production code that has diverged
significantly from the previous main branch.

Key changes from old main:
- Gateway (http_api.py): expanded from ~40KB to 164KB with full agent support
- Router: new /v1/agents/{id}/infer endpoint with vision + DeepSeek routing
- Behavior Policy: SOWA v2.2 (3-level: FULL/ACK/SILENT)
- Agent Registry: config/agent_registry.yml as single source of truth
- 13 agents configured (was 3)
- Memory service integration
- CrewAI teams and roles

Excluded from snapshot: venv/, .env, data/, backups, .tgz archives

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 08:46:46 -08:00

54 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Prepare NODE1 for cluster mode
set -e
echo "=== Preparing NODE1 for Multi-Node Cluster ==="
# 1. Configure PostgreSQL for replication
echo "Configuring PostgreSQL..."
docker exec dagi-postgres psql -U postgres -c "ALTER SYSTEM SET wal_level = replica;"
docker exec dagi-postgres psql -U postgres -c "ALTER SYSTEM SET max_wal_senders = 10;"
docker exec dagi-postgres psql -U postgres -c "ALTER SYSTEM SET max_replication_slots = 10;"
# 2. Configure NATS for cluster
echo "Configuring NATS cluster..."
cat > /opt/microdao-daarion/nats-cluster.conf << EOF
port: 4222
http_port: 8222
jetstream {
store_dir: /data/jetstream
max_mem: 1G
max_file: 10G
}
cluster {
name: daarion-core
listen: 0.0.0.0:6222
routes: []
}
EOF
# 3. Export node configuration
echo "Creating node config..."
cat > /opt/microdao-daarion/node_config.yaml << EOF
node_id: node1
node_role: primary
services:
- gateway
- router
- swapper
- memory-service
- crewai
data_stores:
- postgresql (primary)
- qdrant (shard1)
- neo4j (core)
- redis (master)
EOF
echo "✅ NODE1 prepared for clustering"
echo ""
echo "Next: Deploy NODE2 and configure as replica"