Skip to content

Commit 615d948

Browse files
committed
📚 Sync docs from alaudadevops/gitlab-ce-operator on f880be8bb2a4ab4c1407e1b3a1530fc68a37b9a9
Source: doc: add note on migration duration (#232) Author: nanjingfm Ref: refs/heads/release-17.11 Commit: f880be8bb2a4ab4c1407e1b3a1530fc68a37b9a9 This commit automatically syncs documentation changes from the source-docs repository. 🔗 View source commit: AlaudaDevops/gitlab-ce-operator@f880be8 🤖 Synced on 2025-09-29 12:52:55 UTC
1 parent 7da9878 commit 615d948

File tree

2 files changed

+52
-13
lines changed

2 files changed

+52
-13
lines changed

‎.github/SYNC_INFO.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Documentation Sync Information
22

3-
- **Last synced**: 2025-09-23 07:23:24 UTC
3+
- **Last synced**: 2025-09-29 12:52:55 UTC
44
- **Source repository**: alaudadevops/gitlab-ce-operator
5-
- **Source commit**: [37f1770d53f86cd2f558d741d2948a2ad6bcd5dc](https://github.com/alaudadevops/gitlab-ce-operator/commit/37f1770d53f86cd2f558d741d2948a2ad6bcd5dc)
6-
- **Triggered by**: edge-katanomi-app2[bot]
7-
- **Workflow run**: [#32](https://github.com/alaudadevops/gitlab-ce-operator/actions/runs/17938739932)
5+
- **Source commit**: [f880be8bb2a4ab4c1407e1b3a1530fc68a37b9a9](https://github.com/alaudadevops/gitlab-ce-operator/commit/f880be8bb2a4ab4c1407e1b3a1530fc68a37b9a9)
6+
- **Triggered by**: nanjingfm
7+
- **Workflow run**: [#36](https://github.com/alaudadevops/gitlab-ce-operator/actions/runs/18097629127)
88

99
## Files synced:
1010
- docs/

‎docs/en/upgrade/02_14_upgrade_to_17.md‎

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ Versions 3.16 and 3.18 support GitLab versions that lag behind the official vers
1919

2020
## Process Overview
2121

22-
:::warning
23-
The time required for the upgrade varies significantly depending on the size of the GitLab data. It may take several days to complete the upgrade, **so it's necessary to evaluate the maintenance window in advance**.
24-
25-
Test data: Includes 3 projects (one large project of 666MB, 2 empty projects), backup file size of 668MB, upgrade time of 8 hours.
26-
:::
27-
2822
### Data Migration Path
2923

3024
According to the [official upgrade path](https://gitlab-com.gitlab.io/support/toolbox/upgrade-path/?current=14.0.12&target=17.8.1&distro=docker&edition=ce) documentation, the data migration path is as follows:
@@ -58,6 +52,28 @@ Back up the `platform-deployed` GitLab and restore it to an `all-in-one` image d
5852
For the latest GitLab instance and operator versions, please refer to the [Release Note](../overview/release_notes.mdx).
5953
:::
6054

55+
:::tip Migration Duration
56+
The migration process involves database and repository backup/restore operations:
57+
58+
- Larger databases increase migration time.
59+
- A higher number of repositories or larger single repositories significantly extends the duration.
60+
- Storage performance also impacts efficiency — using topolvm is recommended for better performance.
61+
62+
Test setup:
63+
64+
- One large repository (~600 MB), others are small initial repositories
65+
- GitLab instance: 6,700 issues, 3,600 merge requests
66+
67+
|Migration Step | Key Factor | 1,000 Repos |10,000 Repos|
68+
|----|---|---|---|
69+
|Back up platform-deployed GitLab 14.0.12 | Repo size & count | 10 min | 30 min|
70+
|Restore to all-in-one GitLab 14.0.12 |Repo size & count | 20 min | 1 hr|
71+
|Rolling upgrade to GitLab 17.8.1 | Database size | 1 hr 30 min | 1 hr 40 min|
72+
|Back up all-in-one GitLab 17.8.1 | Repo size & count | 3 min | 10 min|
73+
|Restore to platform-deployed GitLab | Repo size & count | 30 min | 1 hr|
74+
75+
:::
76+
6177

6278
## Prerequisites
6379

@@ -262,7 +278,14 @@ For the latest GitLab instance and operator versions, please refer to the [Relea
262278
263279
echo "Waiting for migrations to finish..."
264280
kubectl -n $GITLAB_NAMESPACE cp finalize_migrations.sql $new_pod_name:/tmp/finalize_migrations.sql
265-
kubectl -n $GITLAB_NAMESPACE exec -ti $new_pod_name -- bash -c "gitlab-psql -t -A -f /tmp/finalize_migrations.sql > /tmp/run_migration_tasks.sh && bash -x /tmp/run_migration_tasks.sh"
281+
for i in {1..3}; do
282+
echo "Running migration tasks (attempt $i/3)..."
283+
if kubectl -n $GITLAB_NAMESPACE exec -ti $new_pod_name -- bash -c "gitlab-psql -t -A -f /tmp/finalize_migrations.sql > /tmp/run_migration_tasks.sh && xargs -d \"\n\" -P 3 -I {} bash -c \"{}\" < /tmp/run_migration_tasks.sh"; then
284+
echo "Migration tasks completed successfully"
285+
break
286+
fi
287+
sleep 20
288+
done
266289
bash monitor_gitlab.sh $new_pod_name
267290
echo "Upgraded to ${version} successfully"
268291
done
@@ -478,10 +501,10 @@ For the latest GitLab instance and operator versions, please refer to the [Relea
478501
protocol: TCP
479502
resources:
480503
limits:
481-
cpu: "4"
504+
cpu: "8"
482505
memory: 8Gi
483506
requests:
484-
cpu: 2
507+
cpu: 4
485508
memory: "4Gi"
486509
securityContext:
487510
privileged: true
@@ -554,6 +577,22 @@ For the latest GitLab instance and operator versions, please refer to the [Relea
554577
kubectl -n $GITLAB_NAMESPACE cp all-in-one-gitlab-secrets.json $pod_name:/etc/gitlab/gitlab-secrets.json
555578
```
556579
580+
Disable unnecessary components.
581+
582+
```bash
583+
cat <<EOF >> gitlab.rb
584+
prometheus['enable'] = false
585+
gitlab_kas['enable'] = false
586+
redis_exporter['enable'] = false
587+
gitlab_exporter['enable'] = false
588+
postgres_exporter['enable'] = false
589+
sidekiq['enable'] = false
590+
EOF
591+
592+
# Copy the gitlab.rb to the pod
593+
kubectl -n $GITLAB_NAMESPACE cp gitlab.rb $pod_name:/etc/gitlab/gitlab.rb
594+
```
595+
557596
Restart the pod and wait for it to start up.
558597
559598
```bash

0 commit comments

Comments
 (0)