meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| git:gitlab:lxc [2020/07/09 08:54] – created niziak | git:gitlab:lxc [2023/02/13 12:49] (current) – ↷ Links adapted because of a move operation niziak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Gitlab in LXC ====== | ====== Gitlab in LXC ====== | ||
| - | Gitlab in unprivileged LXC. | + | Gitlab in unprivileged LXC (Proxmox). |
| ===== Installation ===== | ===== Installation ===== | ||
| * Install Debian Buster container | * Install Debian Buster container | ||
| + | * Install gitlab repo | ||
| + | |||
| + | * Create additional mount point for Gitlab runtime (database, artifacts, lfs, pages) (to SSD/NVM disks) | ||
| + | * 100GB (thin provisioning) for ''/ | ||
| + | * Create additional mount point for Gitlab repos (to SSD/NVM disks) | ||
| + | * 200GB (thin provisioning) for ''/ | ||
| + | * Configure mail agent: [[linux: | ||
| + | |||
| + | ====== Issues ====== | ||
| + | |||
| + | ===== setting key " | ||
| + | < | ||
| + | STDERR: sysctl: setting key " | ||
| + | ---- End output of sysctl -e -p / | ||
| + | </ | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | Gitlab installator puts own sysctl settings: | ||
| + | <code bash> | ||
| + | # ls -l / | ||
| + | total 11 | ||
| + | lrwxrwxrwx 1 root root 58 lip 9 16:24 90-omnibus-gitlab-kernel.sem.conf -> / | ||
| + | lrwxrwxrwx 1 root root 61 lip 9 06:36 90-omnibus-gitlab-kernel.shmall.conf -> / | ||
| + | lrwxrwxrwx 1 root root 61 lip 9 05:53 90-omnibus-gitlab-kernel.shmmax.conf -> / | ||
| + | lrwxrwxrwx 1 root root 14 kwi 27 17:02 99-sysctl.conf -> ../ | ||
| + | -rw-r--r-- 1 root root 324 maj 31 2018 protect-links.conf | ||
| + | -rw-r--r-- 1 root root 639 maj 31 2018 README.sysctl | ||
| + | </ | ||
| + | |||
| + | |||
| + | Problem is located in RO /sys filesystem, not in values itself. Host already has huge values set, enough to run Gitlab: | ||
| + | <code bah> | ||
| + | # sysctl kernel.shmmax | ||
| + | kernel.shmmax = 18446744073692774399 | ||
| + | </ | ||
| + | |||
| + | Solution is to configure gitlab again and again, to skip installator part. Gitlab reconfigure will detect that LXC host has correct variable: | ||
| + | <code bash> | ||
| + | dpkg --configure -a | ||
| + | gitlab-ctl reconfigure | ||
| + | </ | ||
| + | |||
| + | Some LXC configuration trick (can work with privileged containers) | ||
| + | |||
| + | <file / | ||
| + | lxc.apparmor.profile: | ||
| + | lxc.mount.auto: | ||
| + | </ | ||
| + | |||
| + | |||