Commit 3fb5952e authored by Evan Read's avatar Evan Read Committed by Achilleas Pipinellis

Fix markdown for HA topic

parent 858d1fa7
...@@ -106,13 +106,14 @@ deploy the bundled PostgreSQL. ...@@ -106,13 +106,14 @@ deploy the bundled PostgreSQL.
### High Availability with GitLab Omnibus **[PREMIUM ONLY]** ### High Availability with GitLab Omnibus **[PREMIUM ONLY]**
> Important notes: > Important notes:
>
> - This document will focus only on configuration supported with [GitLab Premium](https://about.gitlab.com/pricing/), using the Omnibus GitLab package. > - This document will focus only on configuration supported with [GitLab Premium](https://about.gitlab.com/pricing/), using the Omnibus GitLab package.
> - If you are a Community Edition or Starter user, consider using a cloud hosted solution. > - If you are a Community Edition or Starter user, consider using a cloud hosted solution.
> - This document will not cover installations from source. > - This document will not cover installations from source.
> >
> - If HA setup is not what you were looking for, see the [database configuration document](http://docs.gitlab.com/omnibus/settings/database.html) > - If HA setup is not what you were looking for, see the [database configuration document](http://docs.gitlab.com/omnibus/settings/database.html)
> for the Omnibus GitLab packages. > for the Omnibus GitLab packages.
>
> Please read this document fully before attempting to configure PostgreSQL HA > Please read this document fully before attempting to configure PostgreSQL HA
> for GitLab. > for GitLab.
> >
...@@ -171,13 +172,10 @@ Similarly, PostgreSQL access is controlled based on the network source. ...@@ -171,13 +172,10 @@ Similarly, PostgreSQL access is controlled based on the network source.
This is why you will need: This is why you will need:
> IP address of each nodes network interface - IP address of each nodes network interface. This can be set to `0.0.0.0` to
> - This can be set to `0.0.0.0` to listen on all interfaces. It cannot listen on all interfaces. It cannot be set to the loopack address `127.0.0.1`.
> be set to the loopack address `127.0.0.1` - Network Address. This can be in subnet (i.e. `192.168.0.0/255.255.255.0`)
> or CIDR (i.e. `192.168.0.0/24`) form.
> Network Address
> - This can be in subnet (i.e. `192.168.0.0/255.255.255.0`) or CIDR (i.e.
> `192.168.0.0/24`) form.
##### User information ##### User information
...@@ -220,8 +218,7 @@ the number of database nodes in the cluster. ...@@ -220,8 +218,7 @@ the number of database nodes in the cluster.
This is used to prevent replication from using up all of the This is used to prevent replication from using up all of the
available database connections. available database connections.
> Note: In this document we are assuming 3 database nodes, which makes this configuration:
> - In this document we are assuming 3 database nodes, which makes this configuration:
``` ```
postgresql['max_wal_senders'] = 4 postgresql['max_wal_senders'] = 4
...@@ -327,7 +324,7 @@ On each Consul node perform the following: ...@@ -327,7 +324,7 @@ On each Consul node perform the following:
Before moving on, make sure Consul is configured correctly. Run the following Before moving on, make sure Consul is configured correctly. Run the following
command to verify all server nodes are communicating: command to verify all server nodes are communicating:
``` ```sh
/opt/gitlab/embedded/bin/consul members /opt/gitlab/embedded/bin/consul members
``` ```
...@@ -401,14 +398,15 @@ check the [Troubleshooting section](#troubleshooting) before proceeding. ...@@ -401,14 +398,15 @@ check the [Troubleshooting section](#troubleshooting) before proceeding.
repmgr['master_on_initialization'] = false repmgr['master_on_initialization'] = false
``` ```
1. [Reconfigure GitLab] for te changes to take effect. 1. [Reconfigure GitLab] for the changes to take effect.
> Please note: > Please note:
>
> - If you want your database to listen on a specific interface, change the config: > - If you want your database to listen on a specific interface, change the config:
> `postgresql['listen_address'] = '0.0.0.0'` > `postgresql['listen_address'] = '0.0.0.0'`.
> - If your Pgbouncer service runs under a different user account, > - If your Pgbouncer service runs under a different user account,
> you also need to specify: `postgresql['pgbouncer_user'] = PGBOUNCER_USERNAME` in > you also need to specify: `postgresql['pgbouncer_user'] = PGBOUNCER_USERNAME` in
> your configuration > your configuration.
##### Database nodes post-configuration ##### Database nodes post-configuration
...@@ -449,7 +447,6 @@ Select one node as a primary node. ...@@ -449,7 +447,6 @@ Select one node as a primary node.
is not an IP address, it will need to be a resolvable name (via DNS or is not an IP address, it will need to be a resolvable name (via DNS or
`/etc/hosts`) `/etc/hosts`)
###### Secondary nodes ###### Secondary nodes
1. Set up the repmgr standby: 1. Set up the repmgr standby:
...@@ -500,7 +497,7 @@ Before moving on, make sure the databases are configured correctly. Run the ...@@ -500,7 +497,7 @@ Before moving on, make sure the databases are configured correctly. Run the
following command on the **primary** node to verify that replication is working following command on the **primary** node to verify that replication is working
properly: properly:
``` ```sh
gitlab-ctl repmgr cluster show gitlab-ctl repmgr cluster show
``` ```
...@@ -518,7 +515,7 @@ If the 'Role' column for any node says "FAILED", check the ...@@ -518,7 +515,7 @@ If the 'Role' column for any node says "FAILED", check the
Also, check that the check master command works successfully on each node: Also, check that the check master command works successfully on each node:
``` ```sh
su - gitlab-consul su - gitlab-consul
gitlab-ctl repmgr-check-master || echo 'This node is a standby repmgr node' gitlab-ctl repmgr-check-master || echo 'This node is a standby repmgr node'
``` ```
...@@ -665,13 +662,13 @@ can connect to each freely other on those addresses. ...@@ -665,13 +662,13 @@ can connect to each freely other on those addresses.
Here is a list and description of each machine and the assigned IP: Here is a list and description of each machine and the assigned IP:
* `10.6.0.11`: Consul 1 - `10.6.0.11`: Consul 1
* `10.6.0.12`: Consul 2 - `10.6.0.12`: Consul 2
* `10.6.0.13`: Consul 3 - `10.6.0.13`: Consul 3
* `10.6.0.21`: PostgreSQL master - `10.6.0.21`: PostgreSQL master
* `10.6.0.22`: PostgreSQL secondary - `10.6.0.22`: PostgreSQL secondary
* `10.6.0.23`: PostgreSQL secondary - `10.6.0.23`: PostgreSQL secondary
* `10.6.0.31`: GitLab application - `10.6.0.31`: GitLab application
All passwords are set to `toomanysecrets`, please do not use this password or derived hashes. All passwords are set to `toomanysecrets`, please do not use this password or derived hashes.
...@@ -735,7 +732,7 @@ consul['configuration'] = { ...@@ -735,7 +732,7 @@ consul['configuration'] = {
On secondary nodes, edit `/etc/gitlab/gitlab.rb` and add all the configuration On secondary nodes, edit `/etc/gitlab/gitlab.rb` and add all the configuration
added to primary node, noted above. In addition, append the following added to primary node, noted above. In addition, append the following
configuration configuration:
``` ```
# HA setting to specify if a node should attempt to be master on initialization # HA setting to specify if a node should attempt to be master on initialization
...@@ -839,10 +836,10 @@ In this example we start with all servers on the same 10.6.0.0/16 private networ ...@@ -839,10 +836,10 @@ In this example we start with all servers on the same 10.6.0.0/16 private networ
Here is a list and description of each machine and the assigned IP: Here is a list and description of each machine and the assigned IP:
* `10.6.0.21`: PostgreSQL master - `10.6.0.21`: PostgreSQL master
* `10.6.0.22`: PostgreSQL secondary - `10.6.0.22`: PostgreSQL secondary
* `10.6.0.23`: PostgreSQL secondary - `10.6.0.23`: PostgreSQL secondary
* `10.6.0.31`: GitLab application - `10.6.0.31`: GitLab application
All passwords are set to `toomanysecrets`, please do not use this password or derived hashes. All passwords are set to `toomanysecrets`, please do not use this password or derived hashes.
...@@ -853,6 +850,7 @@ Please note that after the initial configuration, if a failover occurs, the Post ...@@ -853,6 +850,7 @@ Please note that after the initial configuration, if a failover occurs, the Post
##### Example minimal configuration for database servers ##### Example minimal configuration for database servers
##### Primary node ##### Primary node
On primary database node edit `/etc/gitlab/gitlab.rb`: On primary database node edit `/etc/gitlab/gitlab.rb`:
```ruby ```ruby
...@@ -1047,7 +1045,6 @@ For example: ...@@ -1047,7 +1045,6 @@ For example:
repmgr['trust_auth_cidr_addresses'] = %w(192.168.1.44/32 db2.example.com) repmgr['trust_auth_cidr_addresses'] = %w(192.168.1.44/32 db2.example.com)
``` ```
##### MD5 Authentication ##### MD5 Authentication
If you are running on an untrusted network, repmgr can use md5 authentication If you are running on an untrusted network, repmgr can use md5 authentication
...@@ -1157,8 +1154,6 @@ If you're running into an issue with a component not outlined here, be sure to c ...@@ -1157,8 +1154,6 @@ If you're running into an issue with a component not outlined here, be sure to c
**Note**: We recommend that you follow the instructions here for a full [PostgreSQL cluster](#high-availability-with-gitlab-omnibus-premium-only). **Note**: We recommend that you follow the instructions here for a full [PostgreSQL cluster](#high-availability-with-gitlab-omnibus-premium-only).
If you are reading this section due to an old bookmark, you can find that old documentation [in the repository](https://gitlab.com/gitlab-org/gitlab-ce/blob/v10.1.4/doc/administration/high_availability/database.md#configure-using-omnibus). If you are reading this section due to an old bookmark, you can find that old documentation [in the repository](https://gitlab.com/gitlab-org/gitlab-ce/blob/v10.1.4/doc/administration/high_availability/database.md#configure-using-omnibus).
---
Read more on high-availability configuration: Read more on high-availability configuration:
1. [Configure Redis](redis.md) 1. [Configure Redis](redis.md)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment