Skip to content

Instantly share code, notes, and snippets.

@Norcoen
Last active January 15, 2022 19:59
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Norcoen/4dd53fe4d347912627dbcec2a438e354 to your computer and use it in GitHub Desktop.
Save Norcoen/4dd53fe4d347912627dbcec2a438e354 to your computer and use it in GitHub Desktop.
gitlab on LXC Container (proxmox)
Um gitlab auf ubuntu 16.04 oder debian 8.5 zu installieren
(und wohl auch auf anderen ubuntus, debian hat noch zusätliche Probleme, dafür funktioniert aber z.B. top, htop, usw...)
müssen folgende Einstellungen in /etc/gitlab/gitlab.rb gesetzt sein:
postgresql['shared_buffers'] = "512MB" # recommend value is 1/4 of total RAM, up to 14GB.
postgresql['effective_cache_size'] = "128MB"
Beim ersten wird in der Config zum Start 256MB angeboten, reicht ggf. auch
Beim zweiten ist in der Config nur 1MB eingetragen, das kommt mir ggü. dem Standardwert von postgresql (128MB) zu wenig vor.
Debian hat außerdem noch ein Problem damit, dass /sys read-only ist
Man muss daher die entsprechenden Werte auslesen (im LXC Container) mit:
root@gitlab:~# cat /opt/gitlab/embedded/etc/90-omnibus-gitlab-*
kernel.sem = 250 32000 32 262
kernel.shmall = 4194304
kernel.shmmax = 17179869184
net.core.somaxconn = 1024
Und diese dann in der /etc/sysctl.conf im Host (proxmox) eintragen und via
> cat /etc/sysctl.conf /etc/sysctl.d/*.conf | sysctl -e -p -
aktivieren (oder halt rebooten)
AppArmor (für LXC in Proxmox) verhindert Zugriff auf den Socket von Gitlab Workhorse für die Generierung der Oberfläche.
Abhilfe schafft die Verschiebung des Sockets an einen anderen Ort.
In /etc/gitlab/gitlab.rb folgende Zeile hinzufügen
gitlab_git_http_server['listen_addr'] = '/tmp/gitlab-workhorse.socket'
Danach dann gitlab-ctl reconfigure
https://github.com/gitlabhq/gitlabhq/issues/9936
https://gist.github.com/datenimperator/48a92edf035c37511ce2
https://forum.proxmox.com/threads/permission-error-w-sockets-inside-ct-since-migration-to-pve-4-1.25244/page-3
Man kann noch in /opt/gitlab wechseln und dann
> gitlab-rake gitlab:check
ausführen um auf Probleme zu testen. Es schien z.B. die interne API nicht zu laufen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment