gitlab
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| gitlab [2023/10/07 10:48] – [Big log file] kalaschnikow | gitlab [2023/10/07 11:18] (current) – [Gitlab configuration] kalaschnikow | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Gitlab ====== | ||
| + | The current installation is under: http:// | ||
| + | |||
| + | ===== Start ===== | ||
| + | |||
| + | A wrong method to start the Gitlab container: | ||
| + | |||
| + | '' | ||
| + | |||
| + | The container will start. After that press Ctrl+C to exit the log. | ||
| + | |||
| + | At the moment I don't know a better method to start the container => search for it. | ||
| + | |||
| + | Note (05.05.2023): | ||
| + | |||
| + | '' | ||
| + | |||
| + | worked too... I don't know why it was not possible previously. Maybe something goes wrong, but I didn't seen it? | ||
| + | |||
| + | |||
| + | ===== Backup ===== | ||
| + | |||
| + | I made backup with the help of this document: https:// | ||
| + | |||
| + | The command was: '' | ||
| + | |||
| + | Also I've copied the ''/ | ||
| + | |||
| + | ===== Restore ===== | ||
| + | |||
| + | I've used the following document: https:// | ||
| + | |||
| + | So: | ||
| + | |||
| + | <code bash> | ||
| + | # Stop the processes that are connected to the database | ||
| + | sudo docker exec -it gitlab gitlab-ctl stop puma | ||
| + | sudo docker exec -it gitlab gitlab-ctl stop sidekiq | ||
| + | |||
| + | # Verify that the processes are all down before continuing | ||
| + | sudo docker exec -it gitlab gitlab-ctl status | ||
| + | |||
| + | # Run the restore. NOTE: " | ||
| + | sudo docker exec -it gitlab gitlab-backup restore BACKUP=1637386323_2021_11_20_14.4.2 | ||
| + | |||
| + | # Restart the GitLab container | ||
| + | sudo docker restart gitlab | ||
| + | |||
| + | # Check GitLab | ||
| + | sudo docker exec -it gitlab gitlab-rake gitlab: | ||
| + | </ | ||
| + | ===== Upgrade ===== | ||
| + | I made upgrade with the following document: https:// | ||
| + | |||
| + | 1. I made a backup (see above) | ||
| + | |||
| + | 2. I stopped the running container: | ||
| + | |||
| + | < | ||
| + | sudo docker stop gitlab | ||
| + | </ | ||
| + | |||
| + | 3. I removed the container: | ||
| + | |||
| + | < | ||
| + | sudo docker rm gitlab | ||
| + | </ | ||
| + | |||
| + | 4. I pulled the new image: | ||
| + | |||
| + | < | ||
| + | sudo docker pull gitlab/ | ||
| + | </ | ||
| + | |||
| + | 5. Then I created the new container with the following command: | ||
| + | < | ||
| + | sudo docker run --detach \ | ||
| + | --hostname gitlab.wialon-consulting.de \ | ||
| + | --publish 8443:443 --publish 8080:80 --publish 1022:22 \ | ||
| + | --name gitlab \ | ||
| + | --restart always \ | ||
| + | --volume $GITLAB_HOME/ | ||
| + | --volume $GITLAB_HOME/ | ||
| + | --volume $GITLAB_HOME/ | ||
| + | gitlab/ | ||
| + | </ | ||
| + | |||
| + | Unfortunately I couldn' | ||
| + | <code bash> | ||
| + | sudo docker pull gitlab/ | ||
| + | |||
| + | # then stop container, remove container, create new container, then pull new version ... | ||
| + | |||
| + | sudo docker pull gitlab/ | ||
| + | |||
| + | # ... then run it again | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Installed versions ===== | ||
| + | * Installed versions | ||
| + | * **+** 11.11.3-ce.0 | ||
| + | * **+** 12.0.0-ce.0 | ||
| + | * **-** ... | ||
| + | * **+** 14.0.0-ce.0 | ||
| + | * **+** 14.0.5-ce.0 | ||
| + | * '' | ||
| + | * **Important for this version** (I had problems with this upgrade): | ||
| + | * The batched background migrations should be completed before upgrade to the next version. See [[https:// | ||
| + | * **+** 14.0.12-ce.0 | ||
| + | * '' | ||
| + | * **-** 14.1.0-ce.0 | ||
| + | * '' | ||
| + | * The upgrade from 14.0.12 to 14.1.0 did not worked! I rolled back, but it did not worked too. What worked after roll back is the upgrade to 14.1.1. See https:// | ||
| + | * **+** 14.1.1-ce.0 | ||
| + | * '' | ||
| + | * **+** 14.2.1-ce.0 | ||
| + | * '' | ||
| + | * **-** 14.3.0-ce.0 | ||
| + | * '' | ||
| + | * This upgrade (14.2.1 -> 14.3.0) did not work, so I had to take rollback and upgrade to 14.3.1 after that. So: 14.2.1 -> 14.3.0 -> 14.2.1 -> 14.3.1. | ||
| + | * **+** 14.3.1-ce.0 | ||
| + | * '' | ||
| + | * **+** 14.4.1-ce.0 | ||
| + | * '' | ||
| + | * **+** 14.4.2-ce.0 | ||
| + | * '' | ||
| + | |||
| + | |||
| + | ===== Misc ===== | ||
| + | |||
| + | ==== Big log file ==== | ||
| + | |||
| + | Gitlab creates a big log file in the current container: | ||
| + | |||
| + | * at the moment: | ||
| + | * ''/ | ||
| + | |||
| + | So it is necessary to remove this file regularly (possible only as root): | ||
| + | <code bash> | ||
| + | sudo -s | ||
| + | cd / | ||
| + | rm 992bd1257242f4e8ac5288959bf5e0a822afd7813e470b4bc48f614e22b931b7-json.log | ||
| + | </ | ||
| + | |||
| + | Other command which can be useful is **du** (disk usage): | ||
| + | <code bash> | ||
| + | # disk usage of all directories and files in current directory | ||
| + | du -sh ./* | ||
| + | |||
| + | # disk usage of a specific directory | ||
| + | du -sh directory_name | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Gitlab configuration ==== | ||
| + | |||
| + | The gitlab configuration is in file: ''/ | ||
| + | |||
| + | At the moment I've changed only prometheus configuration: | ||
| + | |||
| + | < | ||
| + | prometheus[' | ||
| + | </ | ||
| + | |||
| + | Also interesting info about cleaning of prometheus data: https:// | ||
