gentoo:gitlab-ce
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
gentoo:gitlab-ce [2020/05/28 10:00] – barrachi | gentoo:gitlab-ce [2024/05/01 16:57] (actual) – [Upgrade the container] barrachi | ||
---|---|---|---|
Línea 54: | Línea 54: | ||
</ | </ | ||
- | To see the logs of the gitlab | + | To see the logs of a container while it is starting: |
+ | <code bash> | ||
+ | docker logs -f CONTAINER_ID | ||
+ | </ | ||
+ | |||
+ | To see the logs of the gitlab | ||
<code bash> | <code bash> | ||
docker exec gitlab gitlab-ctl tail | docker exec gitlab gitlab-ctl tail | ||
</ | </ | ||
- | To execute a bash inside the gitlab | + | To execute a bash inside the gitlab |
<code bash> | <code bash> | ||
docker exec -it gitlab /bin/bash | docker exec -it gitlab /bin/bash | ||
Línea 70: | Línea 75: | ||
- | ===== NFS caveats | + | More GitLab maintenance options in https:// |
+ | ===== Upgrade the container | ||
- | The NFS server and client can be fine tuned following | + | 1. Check the current GitLab version x.y.z in the Administration dashboard. |
- | If '''/ | ||
- | This change can be made permanent, patching '' | + | 2a. If it says that there is an update available, go to https://hub.docker.com/r/gitlab/gitlab-ce/tags and search the latest tag with the next subversion: x.y+1. |
- | <code diff> | + | 2b. Instead of going by one, check the migration path in https://gitlab-com.gitlab.io/support/toolbox/upgrade-path/?current=14.6.6& |
- | --- /opt/gitlab/ | + | |
- | +++ /opt/gitlab/embedded/cookbooks/gitlab/recipes/ | + | |
- | @@ -45,6 +45,11 @@ | + | |
- | | + | |
- | end | + | |
- | +directory "/ | ||
- | + owner " | ||
- | + action :create | ||
- | +end | ||
- | + | ||
- | | ||
- | path "/ | ||
- | owner " | ||
- | </ | ||
- | The '''/ | + | 3. Copy the pull command |
- | <code bash> | + | |
- | docker exec gitlab su - git -c "[ -w / | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | ===== Upgrade the container ===== | + | |
- | + | ||
- | 1. Check the digest number of the current version with: | + | |
<code bash> | <code bash> | ||
- | docker | + | docker |
</ | </ | ||
- | 2. Compare | + | 4. Optionally, tag the retrieved image as 'my-gitlab-ce' |
- | + | ||
- | 3. If there is a newer version, then pull the new version and continue | + | |
<code bash> | <code bash> | ||
- | docker | + | docker |
</ | </ | ||
- | 4. If an NFS mount point is used and the '''/ | ||
- | <code bash> | + | 5. Stop and delete the current |
- | # Run the image once using bash as entry point: | + | |
- | docker run -it --entrypoint bash gitlab/ | + | |
- | # Apply the previous patch on default.rb: | + | |
- | nano / | + | |
- | # Exit the image | + | |
- | exit | + | |
- | # Create new image from ID (it appears in the prompt, e.g. root@9ffa2bafe2bb:/# | + | |
- | docker commit 9ffa2bafe2bb my-gitlab-ce | + | |
- | </ | + | |
- | + | ||
- | 5. Stop and delete the current | + | |
<code bash> | <code bash> | ||
Línea 142: | Línea 111: | ||
--volume / | --volume / | ||
--volume / | --volume / | ||
- | my-gitlab-ce # or gitlab/ | + | my-gitlab-ce # or gitlab/ |
</ | </ | ||
- | 6. Cleanup | + | 6. Check that everything went Ok and monitor on the web interface the background migrations. **When all the background migrations have finished**, go to the Dashboard and check if there is a newer version available. If this is the caso, go again to the second step. |
+ | |||
+ | |||
+ | 7. Cleanup | ||
<code bash> | <code bash> | ||
- | docker | + | docker |
</ | </ | ||
- | 7. Check that the backup procedure is working with the new version an delete previous versions backups. | + | 7. Check that the backup procedure is working with the new version an delete |
Línea 217: | Línea 189: | ||
gitlab-ctl restart | gitlab-ctl restart | ||
gitlab-rake gitlab: | gitlab-rake gitlab: | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== NFS caveats ===== | ||
+ | |||
+ | **DO NOT USE NFS WITH GITLAB-CE CONTAINER** | ||
+ | |||
+ | If there are permission problems with your NFS configuration, | ||
+ | |||
+ | **DO NOT USE NFS WITH GITLAB-CE CONTAINER** | ||
+ | |||
+ | The NFS server and client can be fine tuned following the [[https:// | ||
+ | |||
+ | If '''/ | ||
+ | |||
+ | This change can be made permanent, patching ''/ | ||
+ | |||
+ | <code diff> | ||
+ | --- / | ||
+ | +++ / | ||
+ | @@ -45,6 +45,11 @@ | ||
+ | | ||
+ | end | ||
+ | |||
+ | +directory "/ | ||
+ | + owner " | ||
+ | + action :create | ||
+ | +end | ||
+ | + | ||
+ | | ||
+ | path "/ | ||
+ | owner " | ||
+ | </ | ||
+ | |||
+ | The '''/ | ||
+ | <code bash> | ||
+ | docker exec gitlab su - git -c "[ -w / | ||
+ | </ | ||
+ | |||
+ | If an NFS mount point is used and the '''/ | ||
+ | |||
+ | <code bash> | ||
+ | # Run the image once using bash as entry point: | ||
+ | docker run -it --entrypoint bash gitlab/ | ||
+ | # Apply the previous patch on default.rb: | ||
+ | nano / | ||
+ | # Exit the image | ||
+ | exit | ||
+ | # Create new image from ID (it appears in the prompt, e.g. root@9ffa2bafe2bb:/# | ||
+ | docker commit 9ffa2bafe2bb my-gitlab-ce | ||
</ | </ | ||
gentoo/gitlab-ce.1590660026.txt.gz · Última modificación: 2020/05/28 10:00 por barrachi