I’d love to get some input on my ideas on running GitLab alongside OS X Server on Yosemite. I would like to use GitLab together with Xcode server, and I am pretty sure that there are a lot of other iOS or Mac developers out there who would love to do this in a clean way. I researched quite a bit, but I think I need the help of people who understand the system a lot better.
I know there is an installation guide available but it is flawed and wrong in some places imho. (more on that later)
In general I think there are two ways to go about it:
- Install GitLab directly on the system
- Install GitLab in a virtual machine that is started when the computer boots
The main concerns are:
- integration with other tools
- restrictions that apply with each installation method
Installing directly within OS X seems to be the most efficient way, but I am concerned about how to upgrade the system/GitLab installation later on.
The unofficial installation guide uses mostly
homebrew packages for the various components, but it uses them wrong, as the daemons only start when someone is logged into the system, and not at boot time as it would suggest. That could be overcome of course (by actually configuring them right).
Furthermore, the whole setting up users and then hiding them from the login interface is flawed imho. GitLab’s home directory should reside in
/Library/GitLab and the users should only be shell/ssh users. I think the last thing could be accomplished something like this for users/groups:
User: dseditgroup -o edit -n /Local/Default -u localadmin -p -a username -t user com.apple.access_ssh Group: dseditgroup -o edit -n /Local/Default -u localadmin -p -a groupname -t group com.apple.access_ssh
This should only add the users to have ssh access without log-in through the interface.
The other thing where I hit a snag was using
rbenv of course. Not sure how to solve this yet, but I had it running correctly already in a Yosemite virtual machine once. The problem is, that the daemons need to use the right version of ruby and gems, and that can be a pain to set up (with my limited knowledge I admit)
Now concerning upgradabliity, I have no idea how the process works so far.
To me it seems that this would be the far easier solution. It would be possible I guess to set up an Ubuntu VM in VirtualBox or Parallels or VMware that completely houses GitLab. Installation could be done via official installers, and upgrading should be trivial iirc.
The downside would be, aside from an extra 4GB of Linux, that it probably takes quite a lot of resources to run the vm, and it just seems ‘unclean’ to me to run a separate OS just for one application. Of course, if I wanted to install Taiga.io as well, I could do it in the same vm I guess.
Not sure how backing up would work. I don’t want to back up the entire vm but only the data.
I’d be happy to hear if I am thinking in the right direction and if I missed anything (I am sure I did).