Enhance Stability - Create a staging system Sandbox=>Test=>Production

Hi all,

to enhance the stability of my HA system, I am thinking about a system, that consists of three PI’s, each with a running Home Assistant OS:

Sandbox:

  • Develop new integrations
  • Develop new configurations
  • Install every Update immediately
  • Environment, Database, and other things can be resetted as often as I need
  • User: Only me, as system developer
  • Release a versioned configuration set for the next stage, when I am fine with it

Test

  • Import the latest released configuration set
  • Test the configuration set withour developing anything in the test stage
    User: Me and the familty

Production

  • Import a released and tested configuration set
  • Use the configuration set as live environment
  • Backup all the historical data carefully
  • User: Me and the familty

My questions here are:

  1. Has anybody realized such a system?
  2. Which elements would be included in such a transferable configuration set?
  3. How could I release, store and import that transferable configuration set?

Any idea is welcomed.

1 Like

Were you able to find a solution for this? I’m also thinking about a similar set up

I do this, however I do it on docker.

I use it for two primary use cases:
A) testing an ha update
B) developing or enhancing new functionality.

The first, it pretty straightforward. Copy the config to a new container, disable the recorder and start it up.

For the second, I make extensive use of parameritized packages and shell scripts to create the actual HA config packages. As an example, every one of my temperature sensors runs through a filter, has high and low alarm limits, alerts, and input_booleans to enable/disable alerting, etc. When developing this I create a simulation package - in this example - an input_number for the temperature value and a template sensor for that input_number. So I’ll test that package. Once it’s working the config gets replicated for all my actual temperature sensors. When I find a problem or want an enhancement - change it in one place and rereplicate. I use private GitHub repos for my templates and the two target prod systems (we have two houses). GitHub is great for change control and I can see what has changed in the Config before deploying it to prod.

Using docker is nice, because you can have an unlimited number of containers. For example, I have one that I use to test hvac, etc.