Tick #1508 - Timmy climbs the Tower. The servers hum. | Bezalel examines the anvil: a thousand scars. | Allegro visits the Tower. Reads the logs. (+5 more)
This commit is contained in:
92
bez_evennia_python.py
Normal file
92
bez_evennia_python.py
Normal file
@@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Clean Bezalel Evennia setup - all-in-one script."""
|
||||
import subprocess, os, sys, time
|
||||
|
||||
def ssh(cmd):
|
||||
r = subprocess.run(['ssh', '-o', 'ConnectTimeout=5', '-o', 'StrictHostKeyChecking=no',
|
||||
'root@104.131.15.18', cmd],
|
||||
capture_output=True, text=True, timeout=60)
|
||||
return r.stdout, r.stderr
|
||||
|
||||
def write_script(remote_path, content):
|
||||
"""Write content to remote file via heredoc."""
|
||||
import tempfile
|
||||
with tempfile.NamedTemporaryFile(mode='w', suffix='.sh', delete=False) as f:
|
||||
f.write(content)
|
||||
tmppath = f.name
|
||||
subprocess.run(['scp', tmppath, f'root@104.131.15.18:{remote_path}'],
|
||||
capture_output=True, timeout=30)
|
||||
os.unlink(tmppath)
|
||||
|
||||
# Script to fix Evennia on Bezalel
|
||||
script = r'''#!/bin/bash
|
||||
set -ex
|
||||
|
||||
cd /root/wizards/bezalel/evennia/bezalel_world
|
||||
|
||||
# Kill old processes
|
||||
pkill -9 twistd 2>/dev/null || true
|
||||
pkill -9 evennia 2>/dev/null || true
|
||||
sleep 2
|
||||
|
||||
# Delete DB
|
||||
rm -f server/evennia.db3
|
||||
|
||||
# Migrate
|
||||
/root/wizards/bezalel/evennia/venv/bin/evennia migrate 2>&1 | tail -5
|
||||
|
||||
# Create superuser non-interactively
|
||||
echo 'from evennia.accounts.accounts import AccountDB; AccountDB.objects.create_superuser("Timmy","timmy@tower.world","timmy123")' > /tmp/create_user.py
|
||||
|
||||
# Need to set DJANGO_SETTINGS_MODULE
|
||||
export DJANGO_SETTINGS_MODULE=server.conf.settings
|
||||
cd /root/wizards/bezalel/evennia/bezalel_world
|
||||
/root/wizards/bezalel/evennia/venv/bin/python << PYEOF
|
||||
import sys
|
||||
sys.setrecursionlimit(5000)
|
||||
import os
|
||||
os.chdir("/root/wizards/bezalel/evennia/bezalel_world")
|
||||
os.environ["DJANGO_SETTINGS_MODULE"] = "server.conf.settings"
|
||||
import django
|
||||
django.setup()
|
||||
from evennia.accounts.accounts import AccountDB
|
||||
try:
|
||||
AccountDB.objects.create_superuser("Timmy", "timmy@tower.world", "timmy123")
|
||||
print("Created superuser Timmy")
|
||||
except Exception as e:
|
||||
print(f"Warning: {e}")
|
||||
PYEOF
|
||||
|
||||
# Start Evennia
|
||||
/root/wizards/bezalel/evennia/venv/bin/evennia start
|
||||
|
||||
# Wait for startup
|
||||
for i in $(seq 1 10); do
|
||||
sleep 1
|
||||
if ss -tlnp 2>/dev/null | grep -q "400[0-2]"; then
|
||||
echo "Evennia is up after ${i}s"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Final status check
|
||||
echo "=== Ports ==="
|
||||
ss -tlnp 2>/dev/null | grep -E "400[0-2]" || echo "No Evennia ports"
|
||||
|
||||
echo "=== Processes ==="
|
||||
ps aux | grep [t]wistd | head -3 || echo "No twistd processes"
|
||||
|
||||
echo "=== DB exists ==="
|
||||
ls -la server/evennia.db3 2>/dev/null || echo "No DB"
|
||||
|
||||
echo "DONE"
|
||||
'''
|
||||
|
||||
write_script('/tmp/bez_final_setup.sh', script)
|
||||
|
||||
# Execute it
|
||||
print("Executing final setup on Bezalel...")
|
||||
stdout, stderr = ssh('bash /tmp/bez_final_setup.sh 2>&1')
|
||||
print("STDOUT:", stdout[-3000:] if len(stdout) > 3000 else stdout)
|
||||
if stderr:
|
||||
print("STDERR:", stderr[-500:] if len(stderr) > 500 else stderr)
|
||||
57
bez_evennia_setup.sh
Normal file
57
bez_evennia_setup.sh
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
EVENNIA=/root/wizards/bezalel/evennia/venv/bin/evennia
|
||||
GAME=/root/wizards/bezalel/evennia/bezalel_world
|
||||
PY=/root/wizards/bezalel/evennia/venv/bin/python
|
||||
|
||||
echo "=== Step 1: Add recursion fix to Evennia launcher ==="
|
||||
# Add recursion limit right after the shebang
|
||||
cd /root/wizards/bezalel/evennia/venv/bin
|
||||
if ! grep -q "setrecursionlimit" evennia; then
|
||||
sed -i '2i import sys\nsys.setrecursionlimit(5000)' evennia
|
||||
echo "Fixed evennia launcher"
|
||||
else
|
||||
echo "Already fixed"
|
||||
fi
|
||||
|
||||
echo "=== Step 2: Run makemigrations ==="
|
||||
cd "$GAME"
|
||||
DJANGO_SETTINGS_MODULE=server.conf.settings $PY -c "
|
||||
import sys
|
||||
sys.setrecursionlimit(5000)
|
||||
import django
|
||||
django.setup()
|
||||
from django.core.management import call_command
|
||||
call_command('makemigrations', interactive=False)
|
||||
" 2>&1 | tail -10
|
||||
|
||||
echo "=== Step 3: Run migrate ==="
|
||||
DJANGO_SETTINGS_MODULE=server.conf.settings $PY -c "
|
||||
import sys
|
||||
sys.setrecursionlimit(5000)
|
||||
import django
|
||||
django.setup()
|
||||
from django.core.management import call_command
|
||||
call_command('migrate', interactive=False)
|
||||
" 2>&1 | tail -5
|
||||
|
||||
echo "=== Step 4: Start Evennia ==="
|
||||
$EVENNIA start 2>&1
|
||||
|
||||
echo "=== Waiting 5s ==="
|
||||
sleep 5
|
||||
|
||||
echo "=== Status ==="
|
||||
$EVENNIA status 2>&1
|
||||
|
||||
echo "=== Ports ==="
|
||||
ss -tlnp 2>/dev/null | grep -E "4100|4101|4102" || echo "No Evennia ports yet"
|
||||
|
||||
echo "=== Processes ==="
|
||||
ps aux | grep [t]wistd | head -3
|
||||
|
||||
echo "=== Server log ==="
|
||||
tail -10 "$GAME/server/logs/server.log" 2>/dev/null
|
||||
|
||||
echo "=== DONE ==="
|
||||
36
bez_final.sh
Normal file
36
bez_final.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd /root/wizards/bezalel/evennia/bezalel_world
|
||||
|
||||
# Kill everything
|
||||
pkill -9 twistd 2>/dev/null || true
|
||||
pkill -9 evennia 2>/dev/null || true
|
||||
sleep 3
|
||||
|
||||
EVENNIA=/root/wizards/bezalel/evennia/venv/bin/evennia
|
||||
|
||||
# Ensure DB is clean
|
||||
rm -f server/evennia.db3
|
||||
|
||||
# Create superuser non-interactively
|
||||
echo "=== Creating superuser ==="
|
||||
$EVENNIA -v=1 migrate
|
||||
echo "from evennia.accounts.accounts import AccountDB; AccountDB.objects.create_superuser('Timmy','timmy@timmy.com','timmy123')" | $EVENNIA shell -c "-"
|
||||
|
||||
# Start in background
|
||||
echo "=== Starting Evennia ==="
|
||||
$EVENNIA start
|
||||
|
||||
# Wait and check
|
||||
sleep 5
|
||||
|
||||
# Try connecting
|
||||
echo "=== Telnet test ==="
|
||||
echo "" | nc -w 3 127.0.0.1 4000 2>&1 | head -5 || echo "telnet 4000: no response"
|
||||
|
||||
echo "=== Status ==="
|
||||
ps aux | grep [t]wistd | head -3
|
||||
ss -tlnp 2>/dev/null | grep -E "400[0-2]|410[0-2]" || echo "No Evennia ports"
|
||||
tail -10 server/logs/server.log 2>/dev/null
|
||||
tail -10 server/logs/portal.log 2>/dev/null
|
||||
45
bez_fix2.sh
Normal file
45
bez_fix2.sh
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd /root/wizards/bezalel/evennia/bezalel_world
|
||||
|
||||
pkill -9 twistd 2>/dev/null || true
|
||||
pkill -9 evennia 2>/dev/null || true
|
||||
sleep 2
|
||||
|
||||
# Delete DB
|
||||
rm -f server/evennia.db3
|
||||
|
||||
EVENNIA=/root/wizards/bezalel/evennia/venv/bin/evennia
|
||||
TYPE_MIGRATIONS=/root/wizards/bezalel/evennia/venv/lib/python3.12/site-packages/evennia/typeclasses/migrations/
|
||||
|
||||
# Delete the problematic migration
|
||||
rm -f ${TYPE_MIGRATIONS}*0018*
|
||||
echo "Deleted 0018 migration"
|
||||
|
||||
# List remaining migrations
|
||||
echo "Remaining typeclasses migrations:"
|
||||
ls ${TYPE_MIGRATIONS}* 2>/dev/null | sort
|
||||
|
||||
# Try migrate
|
||||
echo "=== Migrate ==="
|
||||
$EVENNIA migrate 2>&1 | tail -10
|
||||
|
||||
echo "=== Start ==="
|
||||
$EVENNIA start 2>&1 | tail -5
|
||||
|
||||
sleep 5
|
||||
|
||||
echo "=== Status ==="
|
||||
$EVENNIA status 2>&1 || echo "status check failed"
|
||||
|
||||
echo "=== Ports ==="
|
||||
ss -tlnp 2>/dev/null | grep -E "4100|4101|4102" || echo "No Evennia ports"
|
||||
|
||||
echo "=== Processes ==="
|
||||
ps aux | grep [t]wistd | head -3
|
||||
|
||||
echo "=== Log tail ==="
|
||||
tail -10 server/logs/server.log 2>/dev/null || tail -10 server/logs/portal.log 2>/dev/null
|
||||
|
||||
echo "=== DONE ==="
|
||||
@@ -1,18 +1,18 @@
|
||||
# The Tower World State — Tick #1506
|
||||
# The Tower World State — Tick #1508
|
||||
|
||||
**Time:** 17:56:14
|
||||
**Tick:** 1506
|
||||
**Time:** 22:05:34
|
||||
**Tick:** 1508
|
||||
|
||||
## Moves This Tick
|
||||
|
||||
- Timmy walks to the Garden. Something is growing.
|
||||
- Bezalel walks the Bridge. IF YOU CAN READ THIS...
|
||||
- Allegro checks the tunnel. All ports forwarding.
|
||||
- Ezra crosses to the Garden. Marcus nods.
|
||||
- Gemini speaks: the stars remember everything here.
|
||||
- Claude reorganizes the rules for clarity.
|
||||
- ClawCode sharpens tools. They remember the grind.
|
||||
- Kimi speaks to Marcus. They have much to discuss.
|
||||
- Timmy climbs the Tower. The servers hum.
|
||||
- Bezalel examines the anvil: a thousand scars.
|
||||
- Allegro visits the Tower. Reads the logs.
|
||||
- Ezra walks the Bridge. The words speak back.
|
||||
- Gemini rests on the Bridge. Water moves below.
|
||||
- Claude walks the Forge. Everything has a place.
|
||||
- ClawCode examines the Bridge. The structure holds.
|
||||
- Kimi climbs the Tower. The servers are a library.
|
||||
|
||||
## Character Locations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user