Skip to content

Deployment

The project produces two Docker images:

ImageDockerfilePurpose
99xio/xianix-agentTheAgent/DockerfileThe .NET control plane
99xio/xianix-executorExecutor/DockerfileThe per-execution Python/Node container
Terminal window
# Agent
cd TheAgent/
docker build -t 99xio/xianix-agent:latest .
# Executor
cd Executor/
docker build -t 99xio/xianix-executor:latest .

Both images are published automatically via GitHub Actions when you push a version tag:

Terminal window
git tag v1.2.0
git push origin v1.2.0

Tags are derived from the version:

Git TagDocker Hub Tags
v1.2.31.2.3, 1.2, 1, latest
v2.0.0-beta.12.0.0-beta.1 (no latest)

CI builds multi-arch images (linux/amd64 + linux/arm64).

The production agent runs on an Azure Linux VM with:

  • No public IP — all traffic is outbound-only via NAT Gateway
  • Secrets in Key Vault — fetched at runtime via managed identity (no .env on disk)
  • Systemd service — auto-restarts on crash or reboot
Azure VNet (outbound-only via NAT Gateway)
└─ VM: xianix-agent-vm (Ubuntu 22.04, Standard_B2s)
├─ systemd: xianix-agent.service
│ └─ /etc/xianix/start-agent.sh
│ ├─ 1. Get token from Azure IMDS (managed identity)
│ ├─ 2. Fetch secrets from Key Vault
│ └─ 3. docker run xianix-agent (with secrets as env vars)
└─ Docker Engine
└─ xianix-executor containers (spawned per event)

Secret names mirror env var names with hyphens: XIANS-SERVER-URL, ANTHROPIC-API-KEY, etc.

Terminal window
az keyvault secret set --vault-name xianix-kv-agent \
--name XIANS-API-KEY --value "<your-key>"
Terminal window
# Define a shortcut (optional)
alias vmrun='az vm run-command invoke \
--resource-group xianix-agent-rg \
--name xianix-agent-vm \
--command-id RunShellScript --scripts'
# Start / restart / stop
vmrun "sudo systemctl start xianix-agent"
vmrun "sudo systemctl restart xianix-agent"
vmrun "sudo systemctl stop xianix-agent"
# Check logs
vmrun "docker logs --tail 50 xianix-agent 2>&1"
# Update images
vmrun "docker pull 99xio/xianix-agent:latest && sudo systemctl restart xianix-agent"
vmrun "docker pull 99xio/xianix-executor:latest"
# Rotate a secret
az keyvault secret set --vault-name xianix-kv-agent \
--name ANTHROPIC-API-KEY --value "<new-key>"
vmrun "sudo systemctl restart xianix-agent"

For live log tailing, connect via Azure Bastion (Developer SKU) through the Azure Portal.

See Contributing for branching conventions and PR guidelines.