refactor: restructure into hermes/ and openclaw/ directories
- Split cloudinit.tf into cloudinit-hermes.tf and cloudinit-openclaw.tf - Split variables.tf into variables-common.tf, variables-hermes.tf, variables-openclaw.tf - Move templates into hermes/templates/ and openclaw/templates/ - Move models/ into openclaw/models/ - Move hermes-openclaw.json to openclaw/openclaw-reference.json - Move hermes docs to hermes/docs/ - OpenClaw cloudinit now uses variables instead of hardcoded values - All 48 variable references verified against definitions
This commit is contained in:
parent
8a94313bd3
commit
ea73745147
21 changed files with 277 additions and 216 deletions
59
cloudinit-openclaw.tf
Normal file
59
cloudinit-openclaw.tf
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# Cloud-init Configuration — OpenClaw Gateway
|
||||
# Only active when agent_framework = "openclaw"
|
||||
|
||||
# OpenClaw cloud-init
|
||||
data "cloudinit_config" "openclaw" {
|
||||
count = var.agent_framework == "openclaw" ? 1 : 0
|
||||
|
||||
gzip = false
|
||||
base64_encode = true
|
||||
|
||||
part {
|
||||
filename = "cloud-config.yaml"
|
||||
content_type = "text/cloud-config"
|
||||
content = templatefile("${path.module}/openclaw/templates/userdata-openclaw.tpl", {
|
||||
# Server configuration
|
||||
server_name = var.server_name
|
||||
admin_user = local.effective_admin_user
|
||||
|
||||
# SSH configuration
|
||||
ssh_port = var.ssh_port
|
||||
ssh_allowed_ips = var.ssh_allowed_ips
|
||||
admin_ssh_keys = var.admin_ssh_keys
|
||||
|
||||
# OpenClaw configuration
|
||||
openclaw_version = var.openclaw_version
|
||||
node_version = var.node_version
|
||||
agent_name = var.agent_name
|
||||
agent_timezone = var.agent_timezone
|
||||
|
||||
# System configuration
|
||||
enable_swap = var.enable_swap
|
||||
swap_size = var.swap_size
|
||||
enable_fail2ban = var.enable_fail2ban
|
||||
enable_unattended_upgrades = var.enable_unattended_upgrades
|
||||
|
||||
# Tailscale
|
||||
enable_tailscale = var.enable_tailscale
|
||||
tailscale_auth_key = var.tailscale_auth_key
|
||||
|
||||
# API keys
|
||||
venice_api_key = var.venice_api_key
|
||||
default_model = var.primary_model
|
||||
brave_search_api_key = var.brave_search_api_key
|
||||
|
||||
# Discord
|
||||
discord_bot_token = var.discord_bot_token
|
||||
discord_server_id = var.discord_server_id
|
||||
discord_user_id = var.discord_user_id
|
||||
discord_home_channel = var.discord_home_channel
|
||||
discord_allowed_users = var.discord_allowed_users
|
||||
discord_auto_thread = var.discord_auto_thread
|
||||
|
||||
# Inference models configuration
|
||||
primary_model = var.primary_model
|
||||
fallback_models = jsonencode(var.fallback_models)
|
||||
models_config = file("${path.module}/openclaw/models/venice.json")
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue