Code source wiki de GitLab

Version 8.1 par Kevin FRICK le 2024/11/20 03:28

Masquer les derniers auteurs
Kevin FRICK 6.1 1 = Utilisation (pour tous) =
2
Kevin FRICK 2.1 3 == Accès ==
Kevin FRICK 1.1 4
Kevin FRICK 2.1 5 L'URL du GitLab est : [[https:~~/~~/gitlab.atilla.org>>https://gitlab.atilla.org]]
6
7 Il est nécessaire de se connecter avec le [[Portail de connexion Atilla>>Services.LemonLDAP\:\:NG (llng).WebHome]].
8
Kevin FRICK 3.1 9 == CI/CD et runners ==
10
11 Pour utiliser les fonctionnalités de CI/CD, il faut créer un fichier .gitlab-ci.yml à la racine du projet. [[Doc GitLab correspondante>>https://docs.gitlab.com/ee/ci/yaml/]]
12
Kevin FRICK 6.1 13 Les runners lancent chaque test d'une pipeline dans un conteneur Docker.
14
15
16 = Maintenance (admin sys) =
17
Kevin FRICK 2.1 18 == Emplacement ==
19
20 Le GitLab se trouve dans la VM gitlab-prod sur [[Odie>>Infrastructure.Serveurs_physiques.Odie.WebHome]].
21
Kevin FRICK 1.1 22 Il y a une deuxième VM qui contient les runners de la CI/CD GitLab : gitlab-runners-prod sur [[Odie>>Infrastructure.Serveurs_physiques.Odie.WebHome]] aussi.
Kevin FRICK 4.1 23
24 == Mise à jour ==
25
26 Checker les checkpoints versions [[ici>>https://docs.gitlab.com/17.4/ee/update/index.html#upgrade-paths]]
27
Kevin FRICK 5.1 28 Sur la VM GitLab :
29
Kevin FRICK 4.1 30 {{code language="bash"}}
31 # touch /etc/gitlab/skip-auto-backup
32 apt update
33 apt install gitlab-ce
34 {{/code}}
35
Kevin FRICK 5.1 36 Sur la VM Gitlab runners :
37
38 {{code language="bash"}}
39 apt update
40 apt install gitlab-runner
41 {{/code}}
Kevin FRICK 6.1 42
43 == Cronjob des runners ==
44
45 Docker peut accumuler les images et rapidement remplir le disque. Pour éviter cela il y a un cronjob qui fait du nettoyage :
46
47 {{code language="bash"}}
48 # Prune old images:
49 0 0 * * * docker image prune -a --filter "until=96h" -f
50
51 # Prune volumes:
52 0 0 * * * docker volume prune -f
53
54 # Prune containers older than 48 hours:
55 0 0 * * * docker container prune --filter "until=48h" -f
56
57 # Prune build cache:
58 0 0 * * * docker buildx prune --force
59 {{/code}}
Kevin FRICK 8.1 60
61 La config des runners se trouvent dans le fichier {{code language="none"}}/etc/gitlab-runner/config.toml{{/code}} de leur VM.