New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration management in Github #1220
Comments
That sounds like a cool feature. With OH 2.5 I also stored my config files under /etc/openhab2/ (e.g. items, things, rules & Co.) in a free gitlab repository. With OH 3.0 I learned there are more files in different folders to be considered. Not sure but as far as I understood, all the new cool stuff like equipments points, properties, models, pages with all their details are stored in the jsondb files under /var/lib/openhab/. (sorry there was a comment from rlkoshak in one of his oh3-wiki-preparation threads but I can't find it anymore). As far as I remember, all files under /var/lib/openhab/ except tmp, backup and persistance might be relevant. I was also searching for a possiblity to replace/remove/hide/surpress passwords and other non-public data before syncing to git but it seems, that it is not so easy to solve. Might be considered as well or at least a big warning to the user should appear. btw: Thank you very much for the efforts you have spend so far. Great job. Cheers thefechner |
I have been playing with this concept and love the idea My take on it from the users input perspective.
As per the idea of #1214 the openhabian.conf could be downloaded from this repo before install like Then after openHAB is installed pull the config files before starting. I went looking for a project with similar goals and found etckeeper |
Hmm, for etckeeper I haven't looked at so far but it has been part of openHABian in a long time, see |
Yes I will take this onboard. I did install etckeeper and the parent git is in the /etc/ folder which will need to be moved to the root directory to be able to keep all the configs. |
Did you mean to say you work on this ? Can we hope for a PR ? |
@mstormi Yes I have taken some time to learn how to get this all up and running. I taking the time to do it properly and would like to use the gh cli. ITs been a crazy week here we had to go into lockdown for 3 whole days because 1 person 1.853 million km² had the UK strain of covid and work that pays the bills got crazy. |
@JAMESBOWLER Is there any reason why you retracted your PR that I should be aware of ? |
FWIW about every 2nd reply in https://community.openhab.org/t/benefit-of-your-experience-what-have-you-learned-that-you-wish-you-had-known-at-the-start/121422/36 says they store their config in Github so I guess this would be a highly welcome feature. |
@JAMESBOWLER could you please provide me with your failed coding attempt ? |
@JAMESBOWLER would you mind to provide me with your failed coding attempt ? |
@JAMESBOWLER any input from your side ? |
I was recently thinking how as an operator to centrally manage an items+rules subset for users, similar to the rules and widgets distributed via OH marketplace. any thoughts anyone? @ecdye @JAMESBOWLER anyone willing to take the ball on this ? |
I don't think that we could safely implement a proper central storage solution like that. I think that if we were going to do it we would need to start small and scale up. So do what the original plan was with the GitHub repo and then if that works implement tools or API keys for a bot to update it or something. |
[contribute your ideas here, please]
Let's store the whole openHAB configuration in a Github repo.
(note: this is about storing openHAB config, not any other data, that's what the Backup/Restore tools in menu 50 are for.)
Rough idea is to add a
store_to_github
routine (=git add+push) andrestore_from_github
(= git pull+checkout) routines in openHABian to run unattended to store/retrieve the current config so they can be automatically triggered e.g. viasystemd
timer, too.Let's take care we properly handle multiple OH instances:
use case can be one "operator" [or "installer"] operating OH for multiple customers. In this case every customer (= end user) needs his own Github repo. He can assign maintainer rights to the operator's Github user.
AFAIK private Github repos are free now and can have up to 3 collaborators.
We should use one branch per location.
TBD: also store 3rd party tool config (mosquitto? what else?)
Related: #1214
The text was updated successfully, but these errors were encountered: