Download Game! Currently 82 players and visitors. Last logged in:GlaurungDescadGileonPazi

Blitzer's Blog >> 72369

Back to blogs index
Posted: 14 Sep 2026 17:27 [ permalink ]
This is the perfect UNIX philosophy approach. Instead of bloating the core
AST-COMPILER with multi-tenant routing and complex namespace management, you
freeze it as a lightweight, single-purpose Hauki OS Node.
It becomes an "appliance." You can clone it into a dozen different LXC
containers, run a quick configuration script, and suddenly you have an entire
fleet of specialized compilers sitting on your network.
By pushing the namespace management up to a separate "Service Registry" layer
later, you keep the edge nodes incredibly fast and completely decoupled.
Here is exactly how we package the current V2 node for seamless LXC
deployment:
1. The Environment Standard (.env)
Instead of hardcoding PORT = 3030, the node needs to be dynamically
configurable. The monitor.js and CLI will look for an .env file containing:
 * HAUKI_INSTANCE_NAME (e.g., "my_games", "data_parsers")
 * HAUKI_PORT (e.g., 3030, 3031)
 * DEEPSEEK_API_KEY
2. The LXC Deployment Script (configure.sh)
We build an interactive shell script that you can run immediately after
extracting the folder into a fresh container. It will ask for the port and
namespace, generate the .env file, andcrucially for a headless
containerautomatically generate a systemd service daemon so the OS Monitor
boots on startup.
#!/bin/bash
# configure.sh - Hauki OS Node Setup

# configure.sh - Hauki OS Node Setup Initializing Hauki OS Node
Configuration..."

read -p "Enter Instance Namespace (e.g., 'games', 'core'): " INSTANCE_NAME
read -p "Enter Monitor API Port (default 3030): " PORT
PORT=${PORT:-3030}

# Generate .env
cat > .env << EOF
HAUKI_INSTANCE_NAME=$INSTANCE_NAME
HAUKI_PORT=$PORT
EOF
echo "[+] Created .env configuration."

# Generate systemd daemon for persistent LXC background execution
SERVICE_FILE="/etc/systemd/system/hauki-$INSTANCE_NAME.service"
CURRENT_DIR=$(pwd)

cat > hauki-node.service.tmp << EOF
[Unit]
Description=Hauki OS API Node ($INSTANCE_NAME)
After=network.target

[Service]
Type=simple
User=$USER
WorkingDirectory=$CURRENT_DIR
ExecStart=/usr/bin/node $CURRENT_DIR/monitor.js
Restart=on-failure
EnvironmentFile=$CURRENT_DIR/.env

[Install]
WantedBy=multi-user.target
EOF

echo "[+] Run 'sudo mv hauki-node.service.tmp $SERVICE_FILE' to install the
daemon."
echo "[+] Run 'sudo systemctl enable --now hauki-$INSTANCE_NAME' to boot the
node."
echo -e "n Node '$INSTANCE_NAME' configured on port $PORT.
"

3. Swaggerizing the Node (openapi.json)
To make this node truly plug-and-play on a mesh network, it needs to
self-document. We drop an openapi.json file into the /public directory.
When the future "Registry Node" pings this LXC container, it will fetch
http://<node-ip>:<port>/openapi.json. The Registry will instantly know exactly
what REST endpoints are available, what parameters they take, and how to
trigger a remote compilation.
The Future Mesh Architecture
Once these nodes are stamped out, your next project simply becomes a Mesh
Arbiter.
It is a lightweight proxy that holds a map (e.g., games -> 10.0.0.15:3030,
parsers -> 10.0.0.16:3030). When you ask the Mesh Arbiter to list all
routines, it fires off parallel fetch() requests to the /api/routines endpoint
of every registered LXC container, consolidates the JSON arrays, and hands you
a single, unified view of the entire mesh network.