I’d like to use GitLab as repo for keeping /etc files under VCS control. We are not a team of programmers, just sys admins so are new to git/GitLab. To goal is: I’d like our admins to know what, when and by whom the system configuration (/etc files) was changed. This information should be easy to access (git diff is not in this category for us). This is where GitLab could be used with its nice web interface.
Now I’d like to ask for advice how to do it the right way.
So far GitLab is working on our infrastructure, git on the managed server is working and talking to GitLab.
The problem is how to set up the procedure the most optimal way. My doubts:
- We have 10 servers, should I setup 10 repos for them? I’d like to see all the changes on all servers grouped together, just as an overview of what is going, without the need to search through 10 repos. I’m a new GitLab user so maybe there is an easy way to achieve the same goal with separated repos?
- does it make sense to use separate branch for each server (I’v googled this suggestion)?
- on the server side git needs root access, is it safe to run git as root?
- I need to run git as root to read the configs in /etc (and write git data), so root will be the author of the changes (visible in the logs), how to make the real user to be logged as an commiter? I’d like to know who really blow up the system
- not really GitLab specific, but does it make sense to ‘git add .’ in /etc (so all files in /etc lands in repo)? What is the best practise here?
Regards
Piotr