Skip to content

Fix For Self Hosting Gitlab Pipelines Section Documentation #552

@Wdankjahe

Description

@Wdankjahe

Context
So currently i am trying to do some experiments with doing gitlab CI/CD, using a runner that is not hosted on gitlab.
Following the steps on the docs proved to be successful however i ran into some issues due to some configurations suggested by the docs resulting in the process not able to run properly.
The docs suggested the following:

Gitlab pipeline runners support multiple installation and runtime configurations. This guide will create a very basic runner using the shell executor in order to avoid running docker-in-docker. This guide provides both manual and automated setup instructions, skip to the bottom of the page for the automation script.

Meanwhile the script below includes this section for the runner:
sudo gitlab-runner register \ --non-interactive \ --name "gameci-runner" \ --url "$GITLAB_URL" \ --token "$TOKEN" \ --executor "shell" \ --docker-image ubuntu:latest

After trying the script as well i ran into some issues with it, but managed to fix it after reading through.
So the conclusion was that there is likely an incorrect information given on the documentation.

Sorry if there is some incorrect things mentioned here, i hardly ever open an issue however i feel the need to mention this so that others would not run into a similar issue and get confused for a few days like i did.

Suggested solution
I would suggest fixing some parts of this docs so that there is no misinformation on the self-hosting docs.

One suggestion i would give is to change the executor type on the gitlab part from shell to docker as that is what works and is the one used in the gitlab hosted runner (Evidence of this below) , and additionally mentioning that the default image would need to be ubuntu:latest following the script provided below.

Subsequently also changing part of the script from mentioned above to have the executor as docker as well:
sudo gitlab-runner register \ --non-interactive \ --name "gameci-runner" \ --url "$GITLAB_URL" \ --token "$TOKEN" \ --executor "docker" \ --docker-image ubuntu:latest

Attached below is what i did during my attempts.

Considered alternatives
There isn't much alternatives, and since i'm quite new to this it's not easy to find what i had needed.

Additional details

Gitlab pipelines step for setting up runner, folowing this the runner i set up on a private vps resulted in a failure.

Image

Here is the gitlab hosted runner for comparison, executor is set to docker+machine, the job run correctly and stopped after a while (i limited the time because i just needed to know if it can run):
Image

Here is the self hosted runner using "shell" :
Image

The result of this is here, the runner locks itself with retrying to run a command that would not succeed because there is no unity editor and the image is not being used similar to what the gitlab hosted runner would do:
Image

Then here is after i modified the steps a bit so that it runs exactly like what the gitlab hosted runner does:
Image

Reason for me doing a self hosted runner is due to a limitation of the free plan for specification and given credits, so i opted to test out doing it on a cheap vps hosting to see how to set this up for my needs and other things that i might need to consider later when i use this as a reference for doing it myself later on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions