Initial commit — OpenClaw VM infrastructure
- ansible/: VM provisioning playbooks and roles - provision-vm.yml: create KVM VM from Ubuntu cloud image - install.yml: install OpenClaw on guest (upstream) - customize.yml: swappiness, virtiofs fstab, linger - roles/vm/: libvirt domain XML, cloud-init templates - inventory.yml + host_vars/zap.yml: zap instance config - backup-openclaw-vm.sh: daily rsync + MinIO upload - restore-openclaw-vm.sh: full redeploy from scratch - README.md: full operational documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
30
ansible/playbooks/provision-vm.yml
Normal file
30
ansible/playbooks/provision-vm.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
# Provision a new OpenClaw VM from scratch on the hypervisor host.
|
||||
#
|
||||
# This playbook runs on localhost (the hypervisor) and:
|
||||
# 1. Downloads the Ubuntu cloud image (cached)
|
||||
# 2. Creates the VM disk image
|
||||
# 3. Builds a cloud-init seed ISO for first-boot configuration
|
||||
# 4. Defines the VM XML (EFI, memfd, virtiofs, TPM, watchdog)
|
||||
# 5. Configures a static DHCP reservation
|
||||
# 6. Enables autostart and starts the VM
|
||||
# 7. Waits for SSH
|
||||
#
|
||||
# After this playbook completes, run:
|
||||
# ansible-playbook -i inventory.yml playbooks/install.yml --limit <instance>
|
||||
# ansible-playbook -i inventory.yml playbooks/customize.yml --limit <instance>
|
||||
# ~/lab/swarm/restore-openclaw-vm.sh <instance> # to restore config from backup
|
||||
#
|
||||
# Usage:
|
||||
# ansible-playbook -i inventory.yml playbooks/provision-vm.yml --limit zap
|
||||
|
||||
- name: Provision OpenClaw VM
|
||||
hosts: openclaw_servers
|
||||
connection: local
|
||||
become: true
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
||||
roles:
|
||||
- vm
|
||||
Reference in New Issue
Block a user