Fix For Self Hosting Gitlab Pipelines Section Documentation

Aperta
#552 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
docker, gitlab

Direzione di ricerca

Esamina prima la documentazione delle GitLab Pipelines self-hosted e il comando di registrazione del runner mostrato nell’issue. Verifica il comportamento dell’executor shell rispetto a quello docker e di ubuntu:latest in base alle esecuzioni riportate, quindi aggiorna il testo e lo script se la verifica è confermata; il lavoro è completato quando la configurazione documentata non è più in conflitto con quella funzionante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
MDX
Stelle
247
Fork
133
Merge medio
1h 28m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di game-ci/documentation

Tutte le issue di game-ci/documentation

Issue simili

Altre issue su DevOps

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.