My installation is getting a wider footprint with components being down due to upgrades having a bigger impact. While in general very stable it does happen that things break - not complaining about that btw; it’s open source and everybody does their best to provide a great experience which it is.
To strengthen my home automation environment I’m considering setting up a second instance. So I have a production and test environment.
Production runs on a KVM VM (Fedora server) so I simply spin up a second VM and then with updates coming take a copy of the current production (VM file), test the updates and if ok apply it at the production instance.
Given I have hardware components (e.g. serial connect to Elk-M1) I can’t run both KVM instances at the same time as these resources can’t be shared. This means production is down while I test which can be an issue.
Not sure whether there’s another option to do this more elegantly.
How do you guys deal with this - especially with bigger installations that control large parts of the home? Do you have a second instance? Are you simply pulling a full backup you can revert to if things break?
I do have 2 instances, one running the 2023.8 beta at the moment, but I don’t have anything serial connected, and Zigbee2MQTT runs on a different server.
With about 700 MQTT entities, yes. Don’t know about the performance difference, but I guess running docker on an old Pi 2 with 512 Mb ram is not advisable, even if it does not use a sd card.
I have a separate VM running the MQTT broker. My 10+ year old Dell OptiPlex has 20GB of RAM so I had the option of separating the MQTT broker (as well as running another VM for the LMS server (Daphile).
But the fact I have a serial adapter for Elk-M1 is an issue if I want to run both test and prod (VM won’t start if the device is mounted on another VM). However I just thought about something else. There’s a Linux component called ser2net which makes serial devices available on the network. Maybe I could run another VM dedicated to the serial device, run ser2net on it and then test and prod can utilise this device…
hmm … back to the drawing board or I simply apply @MaxK’s solution of backups
I use a spare computer I have around for my test instance. It isn’t perfect since there’s some hardware that only my prod instance has (Z-Wave dongle, etc.), but it works pretty well.
I actually have an Ansible playbook that does a full host OS and HAOS VM install.
It reboots the computer into a flash drive that does a (autoinstall) clean install of the host OS (Ubuntu) and then it downloads and spins up a VM image running HAOS. Afterwards I manually restore my most recent backup (always good to test your backups) and then maybe make a few tweaks such as disabling Nabu Casa cloud (otherwise it conflicts with prod).
I’ll eventually have it completely automated where the backups are restored automatically.
Let me know if you have a similar setup and if this is something you’d be interested in by thumbs-upping or commenting on this issue:
This is a personal setup right now, but I can break this off into something more generic fairly easily if there’s enough interest!