# Geo database replication
> 原文:[https://docs.gitlab.com/ee/administration/geo/replication/database.html](https://docs.gitlab.com/ee/administration/geo/replication/database.html)
* [PostgreSQL replication](#postgresql-replication)
* [Step 1\. Configure the **primary** server](#step-1-configure-the-primary-server)
* [Step 2\. Configure the **secondary** server](#step-2-configure-the-secondary-server)
* [Step 3\. Initiate the replication process](#step-3-initiate-the-replication-process)
* [PgBouncer support (optional)](#pgbouncer-support-optional)
* [Troubleshooting](#troubleshooting)
# Geo database replication[](#geo-database-replication-premium-only "Permalink")
**注意:**如果您的 GitLab 安裝使用外部(不受 Omnibus 管理)PostgreSQL 實例,則 Omnibus 角色將無法執行所有必要的配置步驟. 在這種情況下,請[改用 Geo with external PostgreSQL instances 文檔](external_database.html) .**Note:** The stages of the setup process must be completed in the documented order. Before attempting the steps in this stage, [complete all prior stages](index.html#using-omnibus-gitlab).
本文檔介紹了將**主** GitLab 數據庫復制到**輔助**節點的數據庫時必須執行的最少步驟. 您可能需要根據數據庫設置,數據庫大小等來更改一些值.
我們鼓勵您先閱讀所有步驟,然后再在測試/生產環境中執行這些步驟.
## PostgreSQL replication[](#postgresql-replication "Permalink")
進行寫操作的 GitLab **主**節點將連接到**主**數據庫服務器, **輔助**節點將連接到他們自己的數據庫服務器(也是只讀的).
我們建議使用[PostgreSQL 復制插槽,](https://medium.com/@tk512/replication-slots-in-postgresql-b4b03d277c75)以確保**主**節點保留恢復**次**節點所需的所有數據. 請參閱下面的更多細節.
The following guide assumes that:
* 您使用的是 Omnibus,因此使用的是 PostgreSQL 11 或更高版本,其中包括[`pg_basebackup`工具](https://s0www0postgresql0org.icopy.site/docs/11/app-pgbasebackup.html)和改進的[Foreign Data Wrapper](https://s0www0postgresql0org.icopy.site/docs/11/postgres-fdw.html)支持.
* 您已經設置了一個**主**節點(您要從中復制的 GitLab 服務器),并且正在運行 Omnibus 的 PostgreSQL(或等效版本),并且已經設置了一個新的**輔助**服務器,并且具有相同版本的 OS,PostgreSQL 和 GitLab.所有節點.
**警告:** Geo 可用于流復制. 目前不支持邏輯復制. 在[討論支持問題](https://gitlab.com/gitlab-org/gitlab/-/issues/7420) .
### Step 1\. Configure the **primary** server[](#step-1-configure-the-primary-server "Permalink")
1. SSH 到您的 GitLab **主**服務器并以 root 用戶身份登錄:
```
sudo -i
```
2. 編輯`/etc/gitlab/gitlab.rb`并為您的節點添加一個**唯一的**名稱:
```
# The unique identifier for the Geo node.
gitlab_rails['geo_node_name'] = '<node_name_here>'
```
3. 重新配置**主**節點以使更改生效:
```
gitlab-ctl reconfigure
```
4. 執行以下命令以將節點定義**為主**節點:
```
gitlab-ctl set-geo-primary-node
```
該命令將使用您在`/etc/gitlab/gitlab.rb`定義的`external_url` .
5. 僅限于 GitLab 10.4 及更高版本:執行以下操作以確保`gitlab`數據庫用戶已定義密碼:
生成所需密碼的 MD5 哈希值:
```
gitlab-ctl pg-password-md5 gitlab
# Enter password: <your_password_here>
# Confirm password: <your_password_here>
# fca0b89a972d69f00eb3ec98a5838484
```
Edit `/etc/gitlab/gitlab.rb`:
```
# Fill with the hash generated by `gitlab-ctl pg-password-md5 gitlab`
postgresql['sql_user_password'] = '<md5_hash_of_your_password>'
# Every node that runs Puma or Sidekiq needs to have the database
# password specified as below. If you have a high-availability setup, this
# must be present in all application nodes.
gitlab_rails['db_password'] = '<your_password_here>'
```
6. Omnibus GitLab 已經有一個名為`gitlab_replicator`的[復制用戶](https://wiki.postgresql.org/wiki/Streaming_Replication) . 您必須手動設置該用戶的密碼. 系統將提示您輸入密碼:
```
gitlab-ctl set-replication-password
```
如果您已將`gitlab_replicator`用戶名更改為其他名稱,則此命令還將讀取`postgresql['sql_replication_user']` Omnibus 設置.
如果您使用的不是由 Omnibus GitLab 管理的外部數據庫,則需要創建復制器用戶并手動為其定義密碼:
```
--- Create a new user 'replicator'
CREATE USER gitlab_replicator;
--- Set/change a password and grants replication privilege
ALTER USER gitlab_replicator WITH REPLICATION ENCRYPTED PASSWORD '<replication_password>';
```
7. 配置 PostgreSQL 以偵聽網絡接口:
出于安全原因,PostgreSQL 默認情況下不偵聽任何網絡接口. 但是,Geo 要求**輔助**節點能夠連接到**主**節點的數據庫. 因此,我們需要每個節點的地址.
**注意:**對于外部 PostgreSQL 實例,請參見[其他說明](external_database.html) .
如果使用的是云提供商,則可以通過云提供商的管理控制臺查找每個地理節點的地址.
要查找 Geo 節點的地址,請 SSH 到 Geo 節點并執行:
```
##
## Private address
##
ip route get 255.255.255.255 | awk '{print "Private address:", $NF; exit}'
##
## Public address
##
echo "External address: $(curl --silent ipinfo.io/ip)"
```
在大多數情況下,以下地址將用于配置 GitLab Geo:
| Configuration | Address |
| --- | --- |
| `postgresql['listen_address']` | **主**節點的公用或 VPC 專用地址. |
| `postgresql['md5_auth_cidr_addresses']` | **輔助**節點的公用或 VPC 專用地址. |
如果您使用的是 Google Cloud Platform,SoftLayer 或提供虛擬私有云(VPC)的任何其他供應商,則可以將**主**節點和**輔助**節點的私有地址(對應于 Google Cloud Platform 的"內部地址")用于`postgresql['md5_auth_cidr_addresses']`和`postgresql['listen_address']` .
`listen_address`選項打開 PostgreSQL 直至與給定地址對應的接口的網絡連接. 有關更多詳細信息,請參見[PostgreSQL 文檔](https://s0www0postgresql0org.icopy.site/docs/11/runtime-config-connection.html) .
根據您的網絡配置,建議的地址可能不正確. 如果您的**主**節點和**輔助**節點通過局域網或連接可用性區域的虛擬網絡(例如[Amazon 的 VPC](https://aws.amazon.com/vpc/)或[Google 的 VPC)進行連接](https://cloud.google.com/vpc/) ,則應將**輔助**節點的私有地址用于`postgresql['md5_auth_cidr_addresses']` .
編輯`/etc/gitlab/gitlab.rb`并添加以下內容,將 IP 地址替換為適合您的網絡配置的地址:
```
##
## Geo Primary role
## - configure dependent flags automatically to enable Geo
##
roles ['geo_primary_role']
##
## Primary address
## - replace '<primary_node_ip>' with the public or VPC address of your Geo primary node
##
postgresql['listen_address'] = '<primary_node_ip>'
##
# Allow PostgreSQL client authentication from the primary and secondary IPs. These IPs may be
# public or VPC addresses in CIDR format, for example ['198.51.100.1/32', '198.51.100.2/32']
##
postgresql['md5_auth_cidr_addresses'] = ['<primary_node_ip>/32', '<secondary_node_ip>/32']
##
## Replication settings
## - set this to be the number of Geo secondary nodes you have
##
postgresql['max_replication_slots'] = 1
# postgresql['max_wal_senders'] = 10
# postgresql['wal_keep_segments'] = 10
##
## Disable automatic database migrations temporarily
## (until PostgreSQL is restarted and listening on the private address).
##
gitlab_rails['auto_migrate'] = false
```
8. 可選:如果要添加另一個**輔助**節點,則相關設置應如下所示:
```
postgresql['md5_auth_cidr_addresses'] = ['<primary_node_ip>/32', '<secondary_node_ip>/32', '<another_secondary_node_ip>/32']
```
您可能還需要編輯`wal_keep_segments`和`max_wal_senders`以匹配您的數據庫復制要求. 有關更多信息,請查閱[PostgreSQL-復制文檔](https://s0www0postgresql0org.icopy.site/docs/11/runtime-config-replication.html) .
9. 保存文件并重新配置 GitLab,以進行數據庫偵聽更改和要應用的復制插槽更改:
```
gitlab-ctl reconfigure
```
重新啟動 PostgreSQL 以使其更改生效:
```
gitlab-ctl restart postgresql
```
10. 現在,重新啟動 PostgreSQL 并重新偵聽私有地址,即可重新啟用遷移.
編輯`/etc/gitlab/gitlab.rb`并將配置**更改**為`true` :
```
gitlab_rails['auto_migrate'] = true
```
保存文件并重新配置 GitLab:
```
gitlab-ctl reconfigure
```
11. 現在,PostgreSQL 服務器已設置為接受遠程連接,請運行`netstat -plnt | grep 5432` `netstat -plnt | grep 5432` ,以確保 PostgreSQL 在端口`5432`上偵聽**主**服務器的私有地址.
12. 重新配置 GitLab 時會自動生成一個證書. 這將自動用于保護 PostgreSQL 流量免遭竊聽,但是為了防止主動(中間人)攻擊者, **輔助**節點需要證書的副本. 通過運行以下命令,在**主**節點上復制 PostgreSQL `server.crt`文件:
```
cat ~gitlab-psql/data/server.crt
```
將輸出復制到剪貼板或本地文件中. 設置**輔助**節點時將需要它! 證書不是敏感數據.
### Step 2\. Configure the **secondary** server[](#step-2-configure-the-secondary-server "Permalink")
1. SSH 到您的 GitLab **輔助**服務器并以 root 用戶身份登錄:
```
sudo -i
```
2. 停止應用程序服務器和 Sidekiq
```
gitlab-ctl stop puma
gitlab-ctl stop sidekiq
```
**注意:**此步驟很重要,因此在完全配置節點之前,我們不要嘗試執行任何操作.
3. [檢查](../../raketasks/maintenance.html)與**主**節點的 PostgreSQL 服務器的[TCP 連接](../../raketasks/maintenance.html) :
```
gitlab-rake gitlab:tcp_check[<primary_node_ip>,5432]
```
**注意:**如果此步驟失敗,則可能是您使用了錯誤的 IP 地址,或者防火墻可能阻止了對服務器的訪問. 檢查 IP 地址,并密切注意公用地址和專用地址之間的區別,并確保(如果存在防火墻)允許**次**節點連接到端口 5432 上的**主**節點.
4. 在**輔助**服務器上創建文件`server.crt` ,其中包含在**主**節點設置的最后一步中獲得的內容:
```
editor server.crt
```
5. 在**輔助**節點上設置 PostgreSQL TLS 驗證:
安裝`server.crt`文件:
```
install \
-D \
-o gitlab-psql \
-g gitlab-psql \
-m 0400 \
-T server.crt ~gitlab-psql/.postgresql/root.crt
```
現在,PostgreSQL 將僅在驗證 TLS 連接時識別該確切證書. 只能由有權訪問私鑰的人復制證書,該私鑰**僅存**在于**主**節點上.
6. 測試`gitlab-psql`用戶可以連接到**主**節點的數據庫(默認的 Omnibus 數據庫名稱為`gitlabhq_production` ):
```
sudo \
-u gitlab-psql /opt/gitlab/embedded/bin/psql \
--list \
-U gitlab_replicator \
-d "dbname=gitlabhq_production sslmode=verify-ca" \
-W \
-h <primary_node_ip>
```
出現提示時,輸入您在第一步中為`gitlab_replicator`用戶設置的密碼. 如果所有方法均正常工作,則應該看到**主**節點數據庫的列表.
此處連接失敗表示 TLS 配置不正確. 確保**主**節點上`~gitlab-psql/data/server.crt`的內容與**輔助**節點上`~gitlab-psql/.postgresql/root.crt`的內容匹配.
7. 配置 PostgreSQL 以啟用 FDW 支持:
此步驟類似于我們配置**主**實例的方式. 我們需要啟用它,以啟用 FDW 支持,即使使用單個節點也是如此.
編輯`/etc/gitlab/gitlab.rb`并添加以下內容,將 IP 地址替換為適合您的網絡配置的地址:
```
##
## Geo Secondary role
## - configure dependent flags automatically to enable Geo
##
roles ['geo_secondary_role']
##
## Secondary address
## - replace '<secondary_node_ip>' with the public or VPC address of your Geo secondary node
##
postgresql['listen_address'] = '<secondary_node_ip>'
postgresql['md5_auth_cidr_addresses'] = ['<secondary_node_ip>/32']
##
## Database credentials password (defined previously in primary node)
## - replicate same values here as defined in primary node
##
postgresql['sql_user_password'] = '<md5_hash_of_your_password>'
gitlab_rails['db_password'] = '<your_password_here>'
##
## Enable FDW support for the Geo Tracking Database (improves performance)
##
geo_secondary['db_fdw'] = true
```
對于外部 PostgreSQL 實例,請參見[其他說明](external_database.html) . 如果您使以前的**主**節點重新聯機以用作**輔助**節點,則還需要刪除`roles ['geo_primary_role']`或`geo_primary_role['enable'] = true` .
8. 重新配置 GitLab,以使更改生效:
```
gitlab-ctl reconfigure
```
9. 重新啟動 PostgreSQL 以使 IP 更改生效并再次重新配置:
```
gitlab-ctl restart postgresql
gitlab-ctl reconfigure
```
最后的重新配置將提供 FDW 配置并啟用它.
### Step 3\. Initiate the replication process[](#step-3-initiate-the-replication-process "Permalink")
在下面,我們提供了一個腳本,該腳本將**輔助**節點上的數據庫連接到**主要**節點上的數據庫,復制數據庫,并創建流復制所需的文件.
使用的目錄是在 Omnibus 中設置的默認目錄. 如果更改了任何默認值,請根據需要配置它,替換目錄和路徑.
**警告:**確保在**輔助**服務器上運行此命令,因為它會在運行`pg_basebackup`之前刪除所有 PostgreSQL 的數據.
1. SSH 到您的 GitLab **輔助**服務器并以 root 用戶身份登錄:
```
sudo -i
```
2. 選擇一個數據庫友好名稱,以供您的**輔助**節點用作復制插槽名稱. 例如,如果您的域是`secondary.geo.example.com` ,則可以使用`secondary_example`作為插槽名稱,如以下命令所示.
3. 執行以下命令以開始備份/還原并開始復制
**警告:**每個 Geo **輔助**節點必須具有自己的唯一復制插槽名稱. 在兩個輔助節點之間使用相同的插槽名稱將破壞 PostgreSQL 復制.
```
gitlab-ctl replicate-geo-database \
--slot-name=<secondary_node_name> \
--host=<primary_node_ip>
```
**注意:**復制插槽名稱只能包含小寫字母,數字和下劃線字符.
出現提示時,輸入第一步中為`gitlab_replicator`用戶設置的*純文本*密碼.
此命令還帶有許多其他選項. 您可以使用`--help`列出所有內容,但是這里有一些提示:
* 如果 PostgreSQL 在非標準端口上偵聽,則還要添加`--port=` .
* 如果數據庫太大而無法在 30 分鐘內傳輸,則需要增加超時,例如`--backup-timeout=3600`如果您希望初始復制花費一個小時以下的話.
* 通過`--sslmode=disable`可以完全跳過 PostgreSQL TLS 身份驗證(例如,您知道網絡路徑是安全的,或者您使用的是站點到站點 VPN). 這**不是**通過公共互聯網安全!
* 您可以在[PostgreSQL 文檔中](https://s0www0postgresql0org.icopy.site/docs/11/libpq-ssl.html)閱讀有關每個`sslmode`更多詳細信息; 上面的說明均經過精心編寫,以確保既能防御被動的竊聽者,又能防御主動的"中間人"攻擊者.
* 將`--slot-name`更改為要在**主**數據庫上使用的復制插槽的名稱. 該腳本將嘗試自動創建復制插槽(如果不存在).
* If you’re repurposing an old server into a Geo **secondary** node, you’ll need to add `--force` to the command line.
* 如果不在生產機器中,則可以通過添加`--skip-backup`確保確實`--skip-backup`從而禁用備份步驟
復制過程現已完成.
## PgBouncer support (optional)[](#pgbouncer-support-optional "Permalink")
[PgBouncer](https://www.pgbouncer.org/)可以與 GitLab Geo 一起使用來合并 PostgreSQL 連接. 如果您在高可用性配置中使用 GitLab,且該群集的節點集群支持 Geo **主**節點,而另一個節點集群支持 Geo **輔助**節點,則建議使用 PgBouncer. 有關更多信息,請參見[Omnibus GitLab 的高可用性](../../postgresql/replication_and_failover.html) .
為了使 Geo **輔助**節點能夠與數據庫前面的 PgBouncer 一起正常使用,它將需要一個單獨的只讀用戶才能使[PostgreSQL FDW 查詢](https://s0www0postgresql0org.icopy.site/docs/11/postgres-fdw.html)起作用:
1. 在**主要的**地理數據庫上,以管理員用戶身份在控制臺上輸入 PostgreSQL. 如果使用的是 Omnibus 管理的數據庫,請登錄到運行 PostgreSQL 數據庫的**主**節點(默認的 Omnibus 數據庫名稱為`gitlabhq_production` ):
```
sudo \
-u gitlab-psql /opt/gitlab/embedded/bin/psql \
-h /var/opt/gitlab/postgresql gitlabhq_production
```
2. 然后創建只讀用戶:
```
-- NOTE: Use the password defined earlier
CREATE USER gitlab_geo_fdw WITH password 'mypassword';
GRANT CONNECT ON DATABASE gitlabhq_production to gitlab_geo_fdw;
GRANT USAGE ON SCHEMA public TO gitlab_geo_fdw;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO gitlab_geo_fdw;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO gitlab_geo_fdw;
-- Tables created by "gitlab" should be made read-only for "gitlab_geo_fdw"
-- automatically.
ALTER DEFAULT PRIVILEGES FOR USER gitlab IN SCHEMA public GRANT SELECT ON TABLES TO gitlab_geo_fdw;
ALTER DEFAULT PRIVILEGES FOR USER gitlab IN SCHEMA public GRANT SELECT ON SEQUENCES TO gitlab_geo_fdw;
```
3. 在**輔助**節點上,更改`/etc/gitlab/gitlab.rb` :
```
geo_postgresql['fdw_external_user'] = 'gitlab_geo_fdw'
```
4. 保存文件并重新配置 GitLab 以應用更改:
```
gitlab-ctl reconfigure
```
## Troubleshooting[](#troubleshooting "Permalink")
閱讀[故障排除文檔](troubleshooting.html) .
- GitLab Docs
- Installation
- Requirements
- GitLab cloud native Helm Chart
- Install GitLab with Docker
- Installation from source
- Install GitLab on Microsoft Azure
- Installing GitLab on Google Cloud Platform
- Installing GitLab on Amazon Web Services (AWS)
- Analytics
- Code Review Analytics
- Productivity Analytics
- Value Stream Analytics
- Kubernetes clusters
- Adding and removing Kubernetes clusters
- Adding EKS clusters
- Adding GKE clusters
- Group-level Kubernetes clusters
- Instance-level Kubernetes clusters
- Canary Deployments
- Cluster Environments
- Deploy Boards
- GitLab Managed Apps
- Crossplane configuration
- Cluster management project (alpha)
- Kubernetes Logs
- Runbooks
- Serverless
- Deploying AWS Lambda function using GitLab CI/CD
- Securing your deployed applications
- Groups
- Contribution Analytics
- Custom group-level project templates
- Epics
- Manage epics
- Group Import/Export
- Insights
- Issues Analytics
- Iterations
- Public access
- SAML SSO for GitLab.com groups
- SCIM provisioning using SAML SSO for GitLab.com groups
- Subgroups
- Roadmap
- Projects
- GitLab Secure
- Security Configuration
- Container Scanning
- Dependency Scanning
- Dependency List
- Static Application Security Testing (SAST)
- Secret Detection
- Dynamic Application Security Testing (DAST)
- GitLab Security Dashboard
- Offline environments
- Standalone Vulnerability pages
- Security scanner integration
- Badges
- Bulk editing issues and merge requests at the project level
- Code Owners
- Compliance
- License Compliance
- Compliance Dashboard
- Create a project
- Description templates
- Deploy Keys
- Deploy Tokens
- File finder
- Project integrations
- Integrations
- Atlassian Bamboo CI Service
- Bugzilla Service
- Custom Issue Tracker service
- Discord Notifications service
- Enabling emails on push
- GitHub project integration
- Hangouts Chat service
- Atlassian HipChat
- Irker IRC Gateway
- GitLab Jira integration
- Mattermost Notifications Service
- Mattermost slash commands
- Microsoft Teams service
- Mock CI Service
- Prometheus integration
- Redmine Service
- Slack Notifications Service
- Slack slash commands
- GitLab Slack application
- Webhooks
- YouTrack Service
- Insights
- Issues
- Crosslinking Issues
- Design Management
- Confidential issues
- Due dates
- Issue Boards
- Issue Data and Actions
- Labels
- Managing issues
- Milestones
- Multiple Assignees for Issues
- Related issues
- Service Desk
- Sorting and ordering issue lists
- Issue weight
- Associate a Zoom meeting with an issue
- Merge requests
- Allow collaboration on merge requests across forks
- Merge Request Approvals
- Browser Performance Testing
- How to create a merge request
- Cherry-pick changes
- Code Quality
- Load Performance Testing
- Merge Request dependencies
- Fast-forward merge requests
- Merge when pipeline succeeds
- Merge request conflict resolution
- Reverting changes
- Reviewing and managing merge requests
- Squash and merge
- Merge requests versions
- Draft merge requests
- Members of a project
- Migrating projects to a GitLab instance
- Import your project from Bitbucket Cloud to GitLab
- Import your project from Bitbucket Server to GitLab
- Migrating from ClearCase
- Migrating from CVS
- Import your project from FogBugz to GitLab
- Gemnasium
- Import your project from GitHub to GitLab
- Project importing from GitLab.com to your private GitLab instance
- Import your project from Gitea to GitLab
- Import your Jira project issues to GitLab
- Migrating from Perforce Helix
- Import Phabricator tasks into a GitLab project
- Import multiple repositories by uploading a manifest file
- Import project from repo by URL
- Migrating from SVN to GitLab
- Migrating from TFVC to Git
- Push Options
- Releases
- Repository
- Branches
- Git Attributes
- File Locking
- Git file blame
- Git file history
- Repository mirroring
- Protected branches
- Protected tags
- Push Rules
- Reduce repository size
- Signing commits with GPG
- Syntax Highlighting
- GitLab Web Editor
- Web IDE
- Requirements Management
- Project settings
- Project import/export
- Project access tokens (Alpha)
- Share Projects with other Groups
- Snippets
- Static Site Editor
- Wiki
- Project operations
- Monitor metrics for your CI/CD environment
- Set up alerts for Prometheus metrics
- Embedding metric charts within GitLab-flavored Markdown
- Embedding Grafana charts
- Using the Metrics Dashboard
- Dashboard YAML properties
- Metrics dashboard settings
- Panel types for dashboards
- Using Variables
- Templating variables for metrics dashboards
- Prometheus Metrics library
- Monitoring AWS Resources
- Monitoring HAProxy
- Monitoring Kubernetes
- Monitoring NGINX
- Monitoring NGINX Ingress Controller
- Monitoring NGINX Ingress Controller with VTS metrics
- Alert Management
- Error Tracking
- Tracing
- Incident Management
- GitLab Status Page
- Feature Flags
- GitLab CI/CD
- GitLab CI/CD pipeline configuration reference
- GitLab CI/CD include examples
- Introduction to CI/CD with GitLab
- Getting started with GitLab CI/CD
- How to enable or disable GitLab CI/CD
- Using SSH keys with GitLab CI/CD
- Migrating from CircleCI
- Migrating from Jenkins
- Auto DevOps
- Getting started with Auto DevOps
- Requirements for Auto DevOps
- Customizing Auto DevOps
- Stages of Auto DevOps
- Upgrading PostgreSQL for Auto DevOps
- Cache dependencies in GitLab CI/CD
- GitLab ChatOps
- Cloud deployment
- Docker integration
- Building Docker images with GitLab CI/CD
- Using Docker images
- Building images with kaniko and GitLab CI/CD
- GitLab CI/CD environment variables
- Predefined environment variables reference
- Where variables can be used
- Deprecated GitLab CI/CD variables
- Environments and deployments
- Protected Environments
- GitLab CI/CD Examples
- Test a Clojure application with GitLab CI/CD
- Using Dpl as deployment tool
- Testing a Phoenix application with GitLab CI/CD
- End-to-end testing with GitLab CI/CD and WebdriverIO
- DevOps and Game Dev with GitLab CI/CD
- Deploy a Spring Boot application to Cloud Foundry with GitLab CI/CD
- How to deploy Maven projects to Artifactory with GitLab CI/CD
- Testing PHP projects
- Running Composer and NPM scripts with deployment via SCP in GitLab CI/CD
- Test and deploy Laravel applications with GitLab CI/CD and Envoy
- Test and deploy a Python application with GitLab CI/CD
- Test and deploy a Ruby application with GitLab CI/CD
- Test and deploy a Scala application to Heroku
- GitLab CI/CD for external repositories
- Using GitLab CI/CD with a Bitbucket Cloud repository
- Using GitLab CI/CD with a GitHub repository
- GitLab Pages
- GitLab Pages
- GitLab Pages domain names, URLs, and baseurls
- Create a GitLab Pages website from scratch
- Custom domains and SSL/TLS Certificates
- GitLab Pages integration with Let's Encrypt
- GitLab Pages Access Control
- Exploring GitLab Pages
- Incremental Rollouts with GitLab CI/CD
- Interactive Web Terminals
- Optimizing GitLab for large repositories
- Metrics Reports
- CI/CD pipelines
- Pipeline Architecture
- Directed Acyclic Graph
- Multi-project pipelines
- Parent-child pipelines
- Pipelines for Merge Requests
- Pipelines for Merged Results
- Merge Trains
- Job artifacts
- Pipeline schedules
- Pipeline settings
- Triggering pipelines through the API
- Review Apps
- Configuring GitLab Runners
- GitLab CI services examples
- Using MySQL
- Using PostgreSQL
- Using Redis
- Troubleshooting CI/CD
- GitLab Package Registry
- GitLab Container Registry
- Dependency Proxy
- GitLab Composer Repository
- GitLab Conan Repository
- GitLab Maven Repository
- GitLab NPM Registry
- GitLab NuGet Repository
- GitLab PyPi Repository
- API Docs
- API resources
- .gitignore API
- GitLab CI YMLs API
- Group and project access requests API
- Appearance API
- Applications API
- Audit Events API
- Avatar API
- Award Emoji API
- Project badges API
- Group badges API
- Branches API
- Broadcast Messages API
- Project clusters API
- Group clusters API
- Instance clusters API
- Commits API
- Container Registry API
- Custom Attributes API
- Dashboard annotations API
- Dependencies API
- Deploy Keys API
- Deployments API
- Discussions API
- Dockerfiles API
- Environments API
- Epics API
- Events
- Feature Flags API
- Feature flag user lists API
- Freeze Periods API
- Geo Nodes API
- Group Activity Analytics API
- Groups API
- Import API
- Issue Boards API
- Group Issue Boards API
- Issues API
- Epic Issues API
- Issues Statistics API
- Jobs API
- Keys API
- Labels API
- Group Labels API
- License
- Licenses API
- Issue links API
- Epic Links API
- Managed Licenses API
- Markdown API
- Group and project members API
- Merge request approvals API
- Merge requests API
- Project milestones API
- Group milestones API
- Namespaces API
- Notes API
- Notification settings API
- Packages API
- Pages domains API
- Pipeline schedules API
- Pipeline triggers API
- Pipelines API
- Project Aliases API
- Project import/export API
- Project repository storage moves API
- Project statistics API
- Project templates API
- Projects API
- Protected branches API
- Protected tags API
- Releases API
- Release links API
- Repositories API
- Repository files API
- Repository submodules API
- Resource label events API
- Resource milestone events API
- Resource weight events API
- Runners API
- SCIM API
- Search API
- Services API
- Application settings API
- Sidekiq Metrics API
- Snippets API
- Project snippets
- Application statistics API
- Suggest Changes API
- System hooks API
- Tags API
- Todos API
- Users API
- Project-level Variables API
- Group-level Variables API
- Version API
- Vulnerabilities API
- Vulnerability Findings API
- Wikis API
- GraphQL API
- Getting started with GitLab GraphQL API
- GraphQL API Resources
- API V3 to API V4
- Validate the .gitlab-ci.yml (API)
- User Docs
- Abuse reports
- User account
- Active sessions
- Deleting a User account
- Permissions
- Personal access tokens
- Profile preferences
- Threads
- GitLab and SSH keys
- GitLab integrations
- Git
- GitLab.com settings
- Infrastructure as code with Terraform and GitLab
- GitLab keyboard shortcuts
- GitLab Markdown
- AsciiDoc
- GitLab Notification Emails
- GitLab Quick Actions
- Autocomplete characters
- Reserved project and group names
- Search through GitLab
- Advanced Global Search
- Advanced Syntax Search
- Time Tracking
- GitLab To-Do List
- Administrator Docs
- Reference architectures
- Reference architecture: up to 1,000 users
- Reference architecture: up to 2,000 users
- Reference architecture: up to 3,000 users
- Reference architecture: up to 5,000 users
- Reference architecture: up to 10,000 users
- Reference architecture: up to 25,000 users
- Reference architecture: up to 50,000 users
- Troubleshooting a reference architecture set up
- Working with the bundled Consul service
- Configuring PostgreSQL for scaling
- Configuring GitLab application (Rails)
- Load Balancer for multi-node GitLab
- Configuring a Monitoring node for Scaling and High Availability
- NFS
- Working with the bundled PgBouncer service
- Configuring Redis for scaling
- Configuring Sidekiq
- Admin Area settings
- Continuous Integration and Deployment Admin settings
- Custom instance-level project templates
- Diff limits administration
- Enable and disable GitLab features deployed behind feature flags
- Geo nodes Admin Area
- GitLab Pages administration
- Health Check
- Job logs
- Labels administration
- Log system
- PlantUML & GitLab
- Repository checks
- Repository storage paths
- Repository storage types
- Account and limit settings
- Service templates
- System hooks
- Changing your time zone
- Uploads administration
- Abuse reports
- Activating and deactivating users
- Audit Events
- Blocking and unblocking users
- Broadcast Messages
- Elasticsearch integration
- Gitaly
- Gitaly Cluster
- Gitaly reference
- Monitoring GitLab
- Monitoring GitLab with Prometheus
- Performance Bar
- Usage statistics
- Object Storage
- Performing Operations in GitLab
- Cleaning up stale Redis sessions
- Fast lookup of authorized SSH keys in the database
- Filesystem Performance Benchmarking
- Moving repositories managed by GitLab
- Run multiple Sidekiq processes
- Sidekiq MemoryKiller
- Switching to Puma
- Understanding Unicorn and unicorn-worker-killer
- User lookup via OpenSSH's AuthorizedPrincipalsCommand
- GitLab Package Registry administration
- GitLab Container Registry administration
- Replication (Geo)
- Geo database replication
- Geo with external PostgreSQL instances
- Geo configuration
- Using a Geo Server
- Updating the Geo nodes
- Geo with Object storage
- Docker Registry for a secondary node
- Geo for multiple nodes
- Geo security review (Q&A)
- Location-aware Git remote URL with AWS Route53
- Tuning Geo
- Removing secondary Geo nodes
- Geo data types support
- Geo Frequently Asked Questions
- Geo Troubleshooting
- Geo validation tests
- Disaster Recovery (Geo)
- Disaster recovery for planned failover
- Bring a demoted primary node back online
- Automatic background verification
- Rake tasks
- Back up and restore GitLab
- Clean up
- Namespaces
- Maintenance Rake tasks
- Geo Rake Tasks
- GitHub import
- Import bare repositories
- Integrity check Rake task
- LDAP Rake tasks
- Listing repository directories
- Praefect Rake tasks
- Project import/export administration
- Repository storage Rake tasks
- Generate sample Prometheus data
- Uploads migrate Rake tasks
- Uploads sanitize Rake tasks
- User management
- Webhooks administration
- X.509 signatures
- Server hooks
- Static objects external storage
- Updating GitLab
- GitLab release and maintenance policy
- Security
- Password Storage
- Custom password length limits
- Restrict allowed SSH key technologies and minimum length
- Rate limits
- Webhooks and insecure internal web services
- Information exclusivity
- How to reset your root password
- How to unlock a locked user from the command line
- User File Uploads
- How we manage the TLS protocol CRIME vulnerability
- User email confirmation at sign-up
- Security of running jobs
- Proxying assets
- CI/CD Environment Variables
- Contributor and Development Docs
- Contribute to GitLab
- Community members & roles
- Implement design & UI elements
- Issues workflow
- Merge requests workflow
- Code Review Guidelines
- Style guides
- GitLab Architecture Overview
- CI/CD development documentation
- Database guides
- Database Review Guidelines
- Database Review Guidelines
- Migration Style Guide
- What requires downtime?
- Understanding EXPLAIN plans
- Rake tasks for developers
- Mass inserting Rails models
- GitLab Documentation guidelines
- Documentation Style Guide
- Documentation structure and template
- Documentation process
- Documentation site architecture
- Global navigation
- GitLab Docs monthly release process
- Telemetry Guide
- Usage Ping Guide
- Snowplow Guide
- Experiment Guide
- Feature flags in development of GitLab
- Feature flags process
- Developing with feature flags
- Feature flag controls
- Document features deployed behind feature flags
- Frontend Development Guidelines
- Accessibility & Readability
- Ajax
- Architecture
- Axios
- Design Patterns
- Frontend Development Process
- DropLab
- Emojis
- Filter
- Frontend FAQ
- GraphQL
- Icons and SVG Illustrations
- InputSetter
- Performance
- Principles
- Security
- Tooling
- Vuex
- Vue
- Geo (development)
- Geo self-service framework (alpha)
- Gitaly developers guide
- GitLab development style guides
- API style guide
- Go standards and style guidelines
- GraphQL API style guide
- Guidelines for shell commands in the GitLab codebase
- HTML style guide
- JavaScript style guide
- Migration Style Guide
- Newlines style guide
- Python Development Guidelines
- SCSS style guide
- Shell scripting standards and style guidelines
- Sidekiq debugging
- Sidekiq Style Guide
- SQL Query Guidelines
- Vue.js style guide
- Instrumenting Ruby code
- Testing standards and style guidelines
- Flaky tests
- Frontend testing standards and style guidelines
- GitLab tests in the Continuous Integration (CI) context
- Review Apps
- Smoke Tests
- Testing best practices
- Testing levels
- Testing Rails migrations at GitLab
- Testing Rake tasks
- End-to-end Testing
- Beginner's guide to writing end-to-end tests
- End-to-end testing Best Practices
- Dynamic Element Validation
- Flows in GitLab QA
- Page objects in GitLab QA
- Resource class in GitLab QA
- Style guide for writing end-to-end tests
- Testing with feature flags
- Translate GitLab to your language
- Internationalization for GitLab
- Translating GitLab
- Proofread Translations
- Merging translations from CrowdIn
- Value Stream Analytics development guide
- GitLab subscription
- Activate GitLab EE with a license