Gitlab安装文档

ZhuYuanxiang 2022-09-26 00:00:00
Categories: Tags:

总览

安装

重启

安装软件包

1
2
gitlab-ctl reconfigure
gitlab-ctl restart

更换国内源

sudo vim /etc/apt/sources.list

1
# ToDo

更换完成后:

1
# ToDo

问题

Gitlab Bundle CPU 消耗过大问题

修改配置文件: gitlab.rb

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# /etc/gitlab/gitlab.rb
# 关闭电子邮件相关功能
gitlab_rails['smtp_enable'] = false
gitlab_rails['gitlab_email_enabled'] = false
gitlab_rails['incoming_email_enabled'] = false

# Terraform
gitlab_rails['terraform_state_enabled'] = false

# Usage Statistics
gitlab_rails['usage_ping_enabled'] = false
gitlab_rails['sentry_enabled'] = false
grafana['reporting_enabled'] = false

# 关闭容器仓库功能
gitlab_rails['gitlab_default_projects_features_container_registry'] = false
gitlab_rails['registry_enabled'] = false
registry['enable'] = false
registry_nginx['enable'] = false

# 包仓库
gitlab_rails['packages_enabled'] = false
gitlab_rails['dependency_proxy_enabled'] = false

# GitLab KAS
gitlab_kas['enable'] = false
gitlab_rails['gitlab_kas_enabled'] = false

# Mattermost
mattermost['enable'] = false
mattermost_nginx['enable'] = false

# Kerberos
gitlab_rails['kerberos_enabled'] = false
sentinel['enable'] = false

# GitLab Pages
gitlab_pages['enable'] = false
pages_nginx['enable'] = false

# 禁用 PUMA 集群模式
puma['worker_processes'] = 0
puma['min_threads'] = 1
puma['max_threads'] = 2

# 降低后台守护进程并发数
sidekiq['max_concurrency'] = 5

gitlab_ci['gitlab_ci_all_broken_builds'] = false
gitlab_ci['gitlab_ci_add_pusher'] = false

# 关闭监控
prometheus_monitoring['enable'] = false
alertmanager['enable'] = false
node_exporter['enable'] = false
redis_exporter['enable'] = false
postgres_exporter['enable'] = false
pgbouncer_exporter['enable'] = false
gitlab_exporter['enable'] = false
grafana['enable'] = false
sidekiq['metrics_enabled'] = false

参考资料

  1. Upgrading GitLab | GitLab
  2. Gitlab备份、迁移、恢复和升级 - SSgeek - 博客园 (cnblogs.com)
  3. 记一次 GitLab 的迁移过程 - 程序员自由之路 - 博客园 (cnblogs.com)
  4. (61条消息) 关于Gitlab10迁移用户_gitlab迁移用户_moxiaomomo的博客-CSDN博客
  5. (61条消息) 项目源代码迁移到另一个gitlab的方法(保留原来的提交记录)_gitlab迁移项目_拒绝冗余的博客-CSDN博客
  6. Download and install GitLab | GitLab
  7. GitLab 14 轻量化运行方案