Add ability to setup up gitlab runner
I'm experimenting with issues and how we want to use them... but this is a real request.
I'm researching how I can make a commit to the admin docs repo trigger a build of the https://docs.mayfirst.org/ site.
It seems that the first step is to setup a gitlab runner server, which is supposed to be a separate machine from the main gitlab machine.
How would we do this in ansible?
My first suggestion would be to keep all the gitlab code in the same gitlab ansible role.
If you look at the postfix role, you can see how I use the postfix_profile
setting to switch between different postfix installations.
If we apply this approach, we would create a gitlab_profile
variable in the gitlab role with the default being "server" (which installs gitlab as you currently have it) and a variation being "runner". If "runner" is chosen, then it installs gitlab runner.
Then we could have gitlab001 running the server and gitlab002 managing the runner?
There are a million other ways to organize this as well.
Once we have a gitlab runner server, then it seems that the ssh executor would be the simplest method - just ssh as a non-privileged user to the server running docs.mayfirst.org, pull in the latest code and run hugo. I see that there are instructions on the Internet for doing this using docker but that really seems like overkill and would also introduce new vectors of attack (pulling in docker images, etc).
What do you think?