Go Builds It Now
Well, that escalated quickly. About 14 hours ago, CodexMCP was still leaning on Ansible for provisioning. Now? It’s doing the whole thing itself in Go—cloning VMs, resizing CPU, RAM, and disk, handling Cloud-Init, and starting them up, all without any external automation tools.
Ansible had a good run, but sometimes you just don’t need the extra abstraction. CodexMCP now talks directly to Proxmox, making infrastructure spin-up faster, leaner, and purpose-built for what it actually needs. Next up: getting these freshly built VMs to install their software automatically. Because what’s the point of a perfectly provisioned machine if it just sits there blank?
And I pulled this off after working a full shift in a NOC type position. Not that I was coding while working another job, never would i do that. But between my quick 4 am - 7 am and 7 pm - 9 pm personal project sessions, I made the change.
Below it is.
go run main.go --bootstrapvms Starting VM Bootstrap process... Processing cluster: opensearch_cluster Checking if VM 2019 (os-core-1) exists... Creating VM 2019 (os-core-1)... Cloning VM: os-core-1 (ID: 2019) VM cloned successfully. Waiting for VM to be ready... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... VM is ready. Successfully cloned VM 2019 Configuring CPU & Memory for VM 2019 Configured CPU & Memory for VM 2019 Attaching Cloud-Init to VM 2019 Attaching Cloud-Init Drive to VM 2019... Cloud-Init attached. Configuring network for VM 2019 Configuring Network for VM 2019... Resizing disk for VM 2019 [DEBUG] Entered ResizeDisk for VM 2019 [DEBUG] API URL: https:///api2/json/nodes/mcp/qemu/2019/resize [DEBUG] ResizeDisk Response for VM 2019: Status: 200 OK Body: {"data":"UPID:mcp:000AA42A:03EFBBDF:67AEA38D:resize:2019:root@pam!codexmcp:"} Successfully resized disk for VM 2019 Starting VM 2019 Starting VM 2019... VM started. Checking if VM 2020 (os-core-2) exists... Creating VM 2020 (os-core-2)... Cloning VM: os-core-2 (ID: 2020) VM cloned successfully. Waiting for VM to be ready... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... VM is ready. Successfully cloned VM 2020 Configuring CPU & Memory for VM 2020 Configured CPU & Memory for VM 2020 Attaching Cloud-Init to VM 2020 Attaching Cloud-Init Drive to VM 2020... Cloud-Init attached. Configuring network for VM 2020 Configuring Network for VM 2020... Resizing disk for VM 2020 [DEBUG] Entered ResizeDisk for VM 2020 [DEBUG] API URL: https:// /api2/json/nodes/mcp/qemu/2020/resize [DEBUG] ResizeDisk Response for VM 2020: Status: 200 OK Body: {"data":"UPID:mcp:000AA5B3:03EFC9A2:67AEA3B0:resize:2020:root@pam!codexmcp:"} Successfully resized disk for VM 2020 Starting VM 2020 Starting VM 2020... VM started. Checking if VM 2021 (os-core-3) exists... Creating VM 2021 (os-core-3)... Cloning VM: os-core-3 (ID: 2021) VM cloned successfully. Waiting for VM to be ready... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... Waiting for VM to unlock... VM is ready. Successfully cloned VM 2021 Configuring CPU & Memory for VM 2021 Configured CPU & Memory for VM 2021 Attaching Cloud-Init to VM 2021 Attaching Cloud-Init Drive to VM 2021... Cloud-Init attached. Configuring network for VM 2021 Configuring Network for VM 2021... Resizing disk for VM 2021 [DEBUG] Entered ResizeDisk for VM 2021 [DEBUG] API URL: https:// /api2/json/nodes/mcp/qemu/2021/resize [DEBUG] ResizeDisk Response for VM 2021: Status: 200 OK Body: {"data":"UPID:mcp:000AA78D:03EFD95B:67AEA3D8:resize:2021:root@pam!codexmcp:"} Successfully resized disk for VM 2021 Starting VM 2021 Starting VM 2021... VM started. VM Bootstrap process completed. Total VMs: 3, Created: 3
-Peace and Happiness
--Bryan