Has anyone set up macOS GitLab Runners on an EC2 instance?
macos - Gitlab Runner on mac pro - Stack Overflow
Siloed MacOS Gitlab runner
Running GitLab locally on Apple Silicon
Hi everyone,
Has anyone set up a GitLab Runner using a macOS EC2 instance? I understand that launching a macOS instance requires a dedicated host, but I'm curious if anyone has successfully configured it based on the documentation here: https://docs.gitlab.com/runner/install/osx.html.
There isn't much information available online beyond the GitLab docs, so I'd love to hear about any challenges you faced during the setup, especially with installing Xcode. I read that 2FA is required to download and install Xcode, so I'm interested in how you handled this in your user data script. What executor was used to set up the runner?
Thanks in advance for any insights!
Your runner is registered and your tag settings are correct. However, it appears that your runner is not running based on the "Last Contact Time" being stated as "Never".
Runner registration and running your runner are two separate steps. Just because your runner is registered doesn't mean it will pick up jobs. You need to run gitlab-runner run as the user you want to use for the executor on the runner host.
Verify that your runner is running (you should see a gitlab-runner process) and that there are no obvious errors in its logs.
I ran into this issue recently and it was because gitlab-runner is trying to log to a location that it does not have permission to. There's no error message so it just sits silently.
The solution was to set the logging locations inside the ~/Library/LaunchAgents/gitlab-runner.plist
I just ran
touch ~/.gitlab-runner/out.log
touch ~/.gitlab-runner/err.log
And then set the logging locations in the plist to those files.
A more thorough explanation can be found here