diff options
Diffstat (limited to 'doc/administration/geo/replication')
10 files changed, 105 insertions, 105 deletions
diff --git a/doc/administration/geo/replication/configuration.md b/doc/administration/geo/replication/configuration.md index 44baab40153..58507d2c487 100644 --- a/doc/administration/geo/replication/configuration.md +++ b/doc/administration/geo/replication/configuration.md @@ -30,7 +30,7 @@ they must be manually replicated to the **secondary** node. 1. SSH into the **primary** node, and execute the command below: - ```sh + ```shell sudo cat /etc/gitlab/gitlab-secrets.json ``` @@ -38,20 +38,20 @@ they must be manually replicated to the **secondary** node. 1. SSH into the **secondary** node and login as the `root` user: - ```sh + ```shell sudo -i ``` 1. Make a backup of any existing secrets: - ```sh + ```shell mv /etc/gitlab/gitlab-secrets.json /etc/gitlab/gitlab-secrets.json.`date +%F` ``` 1. Copy `/etc/gitlab/gitlab-secrets.json` from the **primary** node to the **secondary** node, or copy-and-paste the file contents between nodes: - ```sh + ```shell sudo editor /etc/gitlab/gitlab-secrets.json # paste the output of the `cat` command you ran on the primary @@ -60,14 +60,14 @@ they must be manually replicated to the **secondary** node. 1. Ensure the file permissions are correct: - ```sh + ```shell chown root:root /etc/gitlab/gitlab-secrets.json chmod 0600 /etc/gitlab/gitlab-secrets.json ``` 1. Reconfigure the **secondary** node for the change to take effect: - ```sh + ```shell gitlab-ctl reconfigure gitlab-ctl restart ``` @@ -88,13 +88,13 @@ keys must be manually replicated to the **secondary** node. 1. SSH into the **secondary** node and login as the `root` user: - ```sh + ```shell sudo -i ``` 1. Make a backup of any existing SSH host keys: - ```sh + ```shell find /etc/ssh -iname ssh_host_* -exec cp {} {}.backup.`date +%F` \; ``` @@ -102,14 +102,14 @@ keys must be manually replicated to the **secondary** node. If you can access your **primary** node using the **root** user: - ```sh + ```shell # Run this from the secondary node, change `<primary_node_fqdn>` for the IP or FQDN of the server scp root@<primary_node_fqdn>:/etc/ssh/ssh_host_*_key* /etc/ssh ``` If you only have access through a user with **sudo** privileges: - ```sh + ```shell # Run this from your primary node: sudo tar --transform 's/.*\///g' -zcvf ~/geo-host-key.tar.gz /etc/ssh/ssh_host_*_key* @@ -120,20 +120,20 @@ keys must be manually replicated to the **secondary** node. 1. On your **secondary** node, ensure the file permissions are correct: - ```sh + ```shell chown root:root /etc/ssh/ssh_host_*_key* chmod 0600 /etc/ssh/ssh_host_*_key* ``` 1. To verify key fingerprint matches, execute the following command on both nodes: - ```sh + ```shell for file in /etc/ssh/ssh_host_*_key; do ssh-keygen -lf $file; done ``` You should get an output similar to this one and they should be identical on both nodes: - ```sh + ```shell 1024 SHA256:FEZX2jQa2bcsd/fn/uxBzxhKdx4Imc4raXrHwsbtP0M root@serverhostname (DSA) 256 SHA256:uw98R35Uf+fYEQ/UnJD9Br4NXUFPv7JAUln5uHlgSeY root@serverhostname (ECDSA) 256 SHA256:sqOUWcraZQKd89y/QQv/iynPTOGQxcOTIXU/LsoPmnM root@serverhostname (ED25519) @@ -142,7 +142,7 @@ keys must be manually replicated to the **secondary** node. 1. Verify that you have the correct public keys for the existing private keys: - ```sh + ```shell # This will print the fingerprint for private keys: for file in /etc/ssh/ssh_host_*_key; do ssh-keygen -lf $file; done @@ -155,7 +155,7 @@ keys must be manually replicated to the **secondary** node. 1. Restart sshd on your **secondary** node: - ```sh + ```shell # Debian or Ubuntu installations sudo service ssh reload @@ -167,7 +167,7 @@ keys must be manually replicated to the **secondary** node. 1. SSH into your GitLab **secondary** server and login as root: - ```sh + ```shell sudo -i ``` @@ -180,7 +180,7 @@ keys must be manually replicated to the **secondary** node. 1. Reconfigure the **secondary** node for the change to take effect: - ```sh + ```shell gitlab-ctl reconfigure ``` @@ -201,20 +201,20 @@ keys must be manually replicated to the **secondary** node. 1. Click the **Add node** button to add the **secondary** node. 1. SSH into your GitLab **secondary** server and restart the services: - ```sh + ```shell gitlab-ctl restart ``` Check if there are any common issue with your Geo setup by running: - ```sh + ```shell gitlab-rake gitlab:geo:check ``` 1. SSH into your **primary** server and login as root to verify the **secondary** node is reachable or there are any common issue with your Geo setup: - ```sh + ```shell gitlab-rake gitlab:geo:check ``` diff --git a/doc/administration/geo/replication/database.md b/doc/administration/geo/replication/database.md index bddd30dbb2a..0e6583741bc 100644 --- a/doc/administration/geo/replication/database.md +++ b/doc/administration/geo/replication/database.md @@ -49,7 +49,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o 1. SSH into your GitLab **primary** server and login as root: - ```sh + ```shell sudo -i ``` @@ -62,13 +62,13 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o 1. Reconfigure the **primary** node for the change to take effect: - ```sh + ```shell gitlab-ctl reconfigure ``` 1. Execute the command below to define the node as **primary** node: - ```sh + ```shell gitlab-ctl set-geo-primary-node ``` @@ -78,7 +78,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o Generate a MD5 hash of the desired password: - ```sh + ```shell gitlab-ctl pg-password-md5 gitlab # Enter password: <your_password_here> # Confirm password: <your_password_here> @@ -101,7 +101,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o called `gitlab_replicator`. You must set the password for this user manually. You will be prompted to enter a password: - ```sh + ```shell gitlab-ctl set-replication-password ``` @@ -134,7 +134,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o To lookup the address of a Geo node, SSH in to the Geo node and execute: - ```sh + ```shell ## ## Private address ## @@ -219,13 +219,13 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o 1. Save the file and reconfigure GitLab for the database listen changes and the replication slot changes to be applied: - ```sh + ```shell gitlab-ctl reconfigure ``` Restart PostgreSQL for its changes to take effect: - ```sh + ```shell gitlab-ctl restart postgresql ``` @@ -240,7 +240,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o Save the file and reconfigure GitLab: - ```sh + ```shell gitlab-ctl reconfigure ``` @@ -254,7 +254,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o the **secondary** node needs a copy of the certificate. Make a copy of the PostgreSQL `server.crt` file on the **primary** node by running this command: - ```sh + ```shell cat ~gitlab-psql/data/server.crt ``` @@ -266,13 +266,13 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o 1. SSH into your GitLab **secondary** server and login as root: - ```sh + ```shell sudo -i ``` 1. Stop application server and Sidekiq - ```sh + ```shell gitlab-ctl stop unicorn gitlab-ctl stop sidekiq ``` @@ -282,7 +282,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o 1. [Check TCP connectivity][rake-maintenance] to the **primary** node's PostgreSQL server: - ```sh + ```shell gitlab-rake gitlab:tcp_check[<primary_node_ip>,5432] ``` @@ -295,7 +295,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o 1. Create a file `server.crt` in the **secondary** server, with the content you got on the last step of the **primary** node's setup: - ```sh + ```shell editor server.crt ``` @@ -303,7 +303,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o Install the `server.crt` file: - ```sh + ```shell install \ -D \ -o gitlab-psql \ @@ -319,7 +319,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o 1. Test that the `gitlab-psql` user can connect to the **primary** node's database (the default Omnibus database name is gitlabhq_production): - ```sh + ```shell sudo \ -u gitlab-psql /opt/gitlab/embedded/bin/psql \ --list \ @@ -377,13 +377,13 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o 1. Reconfigure GitLab for the changes to take effect: - ```sh + ```shell gitlab-ctl reconfigure ``` 1. Restart PostgreSQL for the IP change to take effect and reconfigure again: - ```sh + ```shell gitlab-ctl restart postgresql gitlab-ctl reconfigure ``` @@ -405,7 +405,7 @@ data before running `pg_basebackup`. 1. SSH into your GitLab **secondary** server and login as root: - ```sh + ```shell sudo -i ``` @@ -419,7 +419,7 @@ data before running `pg_basebackup`. CAUTION: **Warning:** Each Geo **secondary** node must have its own unique replication slot name. Using the same slot name between two secondaries will break PostgreSQL replication. - ```sh + ```shell gitlab-ctl replicate-geo-database \ --slot-name=<secondary_node_name> \ --host=<primary_node_ip> @@ -471,7 +471,7 @@ work: admin user. If you are using an Omnibus-managed database, log onto the **primary** node that is running the PostgreSQL database (the default Omnibus database name is gitlabhq_production): - ```sh + ```shell sudo \ -u gitlab-psql /opt/gitlab/embedded/bin/psql \ -h /var/opt/gitlab/postgresql gitlabhq_production @@ -501,7 +501,7 @@ work: 1. Save the file and reconfigure GitLab for the changes to be applied: - ```sh + ```shell gitlab-ctl reconfigure ``` diff --git a/doc/administration/geo/replication/docker_registry.md b/doc/administration/geo/replication/docker_registry.md index 95db766e482..7d041d97ed2 100644 --- a/doc/administration/geo/replication/docker_registry.md +++ b/doc/administration/geo/replication/docker_registry.md @@ -36,7 +36,7 @@ We need to make Docker Registry send notification events to the 1. SSH into your GitLab **primary** server and login as root: - ```sh + ```shell sudo -i ``` @@ -70,7 +70,7 @@ We need to make Docker Registry send notification events to the 1. Reconfigure the **primary** node for the change to take effect: - ```sh + ```shell gitlab-ctl reconfigure ``` @@ -90,7 +90,7 @@ generate a short-lived JWT that is pull-only-capable to access the 1. SSH into the **secondary** node and login as the `root` user: - ```sh + ```shell sudo -i ``` @@ -105,7 +105,7 @@ generate a short-lived JWT that is pull-only-capable to access the 1. Reconfigure the **secondary** node for the change to take effect: - ```sh + ```shell gitlab-ctl reconfigure ``` diff --git a/doc/administration/geo/replication/external_database.md b/doc/administration/geo/replication/external_database.md index 6948dcc0c68..210c3a77128 100644 --- a/doc/administration/geo/replication/external_database.md +++ b/doc/administration/geo/replication/external_database.md @@ -13,13 +13,13 @@ developed and tested. We aim to be compatible with most external 1. SSH into a GitLab **primary** application server and login as root: - ```bash + ```shell sudo -i ``` 1. Execute the command below to define the node as **primary** node: - ```bash + ```shell gitlab-ctl set-geo-primary-node ``` @@ -100,7 +100,7 @@ To configure the connection to the external read-replica database and enable Log 1. SSH into a GitLab **secondary** application server and login as root: - ```bash + ```shell sudo -i ``` @@ -147,7 +147,7 @@ the tracking database on port 5432. 1. SSH into a GitLab **secondary** server and login as root: - ```bash + ```shell sudo -i ``` @@ -168,7 +168,7 @@ the tracking database on port 5432. 1. Run the tracking database migrations: - ```bash + ```shell gitlab-rake geo:db:create gitlab-rake geo:db:migrate ``` @@ -179,7 +179,7 @@ the tracking database on port 5432. Save the script below in a file, ex. `/tmp/geo_fdw.sh` and modify the connection params to match your environment. Execute it to set up the FDW connection. - ```bash + ```shell #!/bin/bash # Secondary Database connection params: @@ -213,6 +213,6 @@ the tracking database on port 5432. 1. Save the file and [restart GitLab](../../restart_gitlab.md#omnibus-gitlab-restart) 1. Populate the FDW tables: - ```bash + ```shell gitlab-rake geo:db:refresh_foreign_tables ``` diff --git a/doc/administration/geo/replication/high_availability.md b/doc/administration/geo/replication/high_availability.md index 19266a6b358..5c124e9c6dc 100644 --- a/doc/administration/geo/replication/high_availability.md +++ b/doc/administration/geo/replication/high_availability.md @@ -128,7 +128,7 @@ the **primary** database. Use the following as a guide. Note that the username (`gitlab` by default) is incorporated into the hash. - ```sh + ```shell gitlab-ctl pg-password-md5 gitlab # Enter password: <your_password_here> # Confirm password: <your_password_here> @@ -187,7 +187,7 @@ Configure the tracking database. Note that the username (`gitlab_geo` by default) is incorporated into the hash. - ```sh + ```shell gitlab-ctl pg-password-md5 gitlab_geo # Enter password: <your_password_here> # Confirm password: <your_password_here> diff --git a/doc/administration/geo/replication/remove_geo_node.md b/doc/administration/geo/replication/remove_geo_node.md index e24eb2bd428..c3ff0ef47c1 100644 --- a/doc/administration/geo/replication/remove_geo_node.md +++ b/doc/administration/geo/replication/remove_geo_node.md @@ -10,13 +10,13 @@ Once removed from the Geo admin page, you must stop and uninstall the **secondar 1. On the **secondary** node, stop GitLab: - ```bash + ```shell sudo gitlab-ctl stop ``` 1. On the **secondary** node, uninstall GitLab: - ```bash + ```shell # Stop gitlab and remove its supervision process sudo gitlab-ctl uninstall @@ -31,7 +31,7 @@ Once GitLab has been uninstalled from the **secondary** node, the replication sl 1. On the **primary** node, start a PostgreSQL console session: - ```bash + ```shell sudo gitlab-psql ``` diff --git a/doc/administration/geo/replication/troubleshooting.md b/doc/administration/geo/replication/troubleshooting.md index 46fd5eb7ca7..1a4c37dc709 100644 --- a/doc/administration/geo/replication/troubleshooting.md +++ b/doc/administration/geo/replication/troubleshooting.md @@ -40,7 +40,7 @@ health check manually to get this information as well as a few more details. This rake task can be run on an app node in the **primary** or **secondary** Geo nodes: -```sh +```shell sudo gitlab-rake gitlab:geo:check ``` @@ -73,7 +73,7 @@ Checking Geo ... Finished Current sync information can be found manually by running this rake task on any **secondary** app node: -```sh +```shell sudo gitlab-rake geo:status ``` @@ -127,7 +127,7 @@ This name is used to look up the node with the same **Name** in To check if the current machine has a node name that matches a node in the database, run the check task: -```sh +```shell sudo gitlab-rake gitlab:geo:check ``` @@ -151,7 +151,7 @@ This machine's Geo node name matches a database record ... no When running this rake task, you may see errors if the nodes are not properly configured: -```sh +```shell sudo gitlab-rake gitlab:geo:check ``` @@ -279,7 +279,7 @@ and indicates that your initial dataset is too large to be replicated in the def Re-run `gitlab-ctl replicate-geo-database`, but include a larger value for `--backup-timeout`: -```sh +```shell sudo gitlab-ctl \ replicate-geo-database \ --host=<primary_node_hostname> \ @@ -297,7 +297,7 @@ log data to build up in `pg_xlog`. Removing the unused slots can reduce the amou 1. Start a PostgreSQL console session: - ```sh + ```shell sudo gitlab-psql ``` @@ -348,7 +348,7 @@ postgresql['hot_standby_feedback'] = 'on' Then reconfigure GitLab: -```sh +```shell sudo gitlab-ctl reconfigure ``` @@ -370,7 +370,7 @@ gitlab_rails['gitlab_shell_git_timeout'] = 10800 Then reconfigure GitLab: -```sh +```shell sudo gitlab-ctl reconfigure ``` @@ -390,7 +390,7 @@ to start again from scratch, there are a few steps that can help you: You need to send a **SIGTSTP** kill signal for the first phase and them a **SIGTERM** when all jobs have finished. Otherwise just use the `gitlab-ctl stop` commands. - ```sh + ```shell gitlab-ctl status sidekiq # run: sidekiq: (pid 10180) <- this is the PID you will use kill -TSTP 10180 # change to the correct PID @@ -401,13 +401,13 @@ to start again from scratch, there are a few steps that can help you: You can watch Sidekiq logs to know when Sidekiq jobs processing have finished: - ```sh + ```shell gitlab-ctl tail sidekiq ``` 1. Rename repository storage folders and create new ones. If you are not concerned about possible orphaned directories and files, then you can simply skip this step. - ```sh + ```shell mv /var/opt/gitlab/git-data/repositories /var/opt/gitlab/git-data/repositories.old mkdir -p /var/opt/gitlab/git-data/repositories chown git:git /var/opt/gitlab/git-data/repositories @@ -432,7 +432,7 @@ to start again from scratch, there are a few steps that can help you: To rename all of them: - ```sh + ```shell gitlab-ctl stop mv /var/opt/gitlab/gitlab-rails/shared /var/opt/gitlab/gitlab-rails/shared.old @@ -447,13 +447,13 @@ to start again from scratch, there are a few steps that can help you: Reconfigure in order to recreate the folders and make sure permissions and ownership are correctly - ```sh + ```shell gitlab-ctl reconfigure ``` 1. Reset the Tracking Database - ```sh + ```shell gitlab-rake geo:db:drop gitlab-ctl reconfigure gitlab-rake geo:db:setup @@ -461,7 +461,7 @@ to start again from scratch, there are a few steps that can help you: 1. Restart previously stopped services - ```sh + ```shell gitlab-ctl start ``` @@ -537,7 +537,7 @@ To check the configuration: 1. SSH into an app node in the **secondary**: - ```sh + ```shell sudo -i ``` @@ -552,14 +552,14 @@ To check the configuration: If the tracking database is running on the same node: - ```sh + ```shell gitlab-geo-psql ``` Or, if the tracking database is running on a different node, you must specify the user and host when entering the database console: - ```sh + ```shell gitlab-geo-psql -U gitlab_geo -h <IP of tracking database> ``` @@ -646,7 +646,7 @@ To check the configuration: Make sure the password is correct. You can test that logins work by running `psql`: - ```sh + ```shell # Connect to the tracking database as the `gitlab_geo` user sudo \ -u git /opt/gitlab/embedded/bin/psql \ @@ -685,7 +685,7 @@ reload of the FDW schema. To manually reload the FDW schema: 1. On the node running the Geo tracking database, enter the PostgreSQL console via the `gitlab_geo` user: - ```sh + ```shell sudo \ -u git /opt/gitlab/embedded/bin/psql \ -h /var/opt/gitlab/geo-postgresql \ @@ -729,7 +729,7 @@ Geo database has an outdated FDW remote schema. It contains 229 of 236 expected To resolve this, run the following command: -```sh +```shell sudo gitlab-rake geo:db:refresh_foreign_tables ``` diff --git a/doc/administration/geo/replication/updating_the_geo_nodes.md b/doc/administration/geo/replication/updating_the_geo_nodes.md index fda0ebbbeac..426eb54c66a 100644 --- a/doc/administration/geo/replication/updating_the_geo_nodes.md +++ b/doc/administration/geo/replication/updating_the_geo_nodes.md @@ -42,7 +42,7 @@ everything is working correctly: 1. Run the Geo raketask on all nodes, everything should be green: - ```sh + ```shell sudo gitlab-rake gitlab:geo:check ``` diff --git a/doc/administration/geo/replication/using_a_geo_server.md b/doc/administration/geo/replication/using_a_geo_server.md index b814bcf8459..b1ba5b3e876 100644 --- a/doc/administration/geo/replication/using_a_geo_server.md +++ b/doc/administration/geo/replication/using_a_geo_server.md @@ -8,7 +8,7 @@ Pushing directly to a **secondary** node (for both HTTP, SSH including Git LFS) Example of the output you will see when pushing to a **secondary** node: -```bash +```shell $ git push remote: remote: You're pushing to a Geo secondary. We'll help you by proxying this diff --git a/doc/administration/geo/replication/version_specific_updates.md b/doc/administration/geo/replication/version_specific_updates.md index 772defe0191..5fb9391af99 100644 --- a/doc/administration/geo/replication/version_specific_updates.md +++ b/doc/administration/geo/replication/version_specific_updates.md @@ -16,7 +16,7 @@ This update will occur even if major PostgreSQL updates are disabled. Before [refreshing Foreign Data Wrapper during a Geo HA upgrade](https://docs.gitlab.com/omnibus/update/README.html#run-post-deployment-migrations-and-checks), restart the Geo tracking database: -```sh +```shell sudo gitlab-ctl restart geo-postgresql ``` @@ -31,7 +31,7 @@ for the recommended procedure. This can be temporarily disabled by running the following before updating: -```sh +```shell sudo touch /etc/gitlab/disable-postgresql-upgrade ``` @@ -41,7 +41,7 @@ Before 10.8, broadcast messages would not propagate without flushing the cache on the **secondary** nodes. This has been fixed in 10.8, but requires one last cache flush on each **secondary** node: -```sh +```shell sudo gitlab-rake cache:clear ``` @@ -55,7 +55,7 @@ authentication method. 1. **(primary)** Login to your **primary** node and run: - ```sh + ```shell gitlab-ctl pg-password-md5 gitlab # Enter password: <your_password_here> # Confirm password: <your_password_here> @@ -82,7 +82,7 @@ authentication method. 1. **(primary)** Reconfigure and restart: - ```sh + ```shell sudo gitlab-ctl reconfigure sudo gitlab-ctl restart ``` @@ -113,7 +113,7 @@ authentication method. 1. **(secondary)** Reconfigure and restart: - ```sh + ```shell sudo gitlab-ctl reconfigure sudo gitlab-ctl restart ``` @@ -129,7 +129,7 @@ contents of `/etc/gitlab/gitlab-secrets.json` on each **secondary** node with th contents of `/etc/gitlab/gitlab-secrets.json` on the **primary** node, then run the following command on each **secondary** node: -```sh +```shell sudo gitlab-ctl reconfigure ``` @@ -228,7 +228,7 @@ following to clean this up. On the **secondary** Geo nodes, run as root: -```sh +```shell mv /var/opt/gitlab/gitlab-rails/working /var/opt/gitlab/gitlab-rails/working.old mkdir /var/opt/gitlab/gitlab-rails/working chmod 700 /var/opt/gitlab/gitlab-rails/working @@ -240,7 +240,7 @@ You may delete `/var/opt/gitlab/gitlab-rails/working.old` any time. Once this is done, we advise restarting GitLab on the **secondary** nodes for the new working directory to be used: -```sh +```shell sudo gitlab-ctl restart ``` @@ -289,7 +289,7 @@ is prepended with the relevant node for better clarity: 1. **(secondary)** Make a backup of the `recovery.conf` file on **all** **secondary** nodes to preserve PostgreSQL's credentials: - ```sh + ```shell sudo cp /var/opt/gitlab/postgresql/data/recovery.conf /var/opt/gitlab/ ``` @@ -301,7 +301,7 @@ is prepended with the relevant node for better clarity: stop all services except `postgresql` as we will use it to re-initialize the **secondary** node's database: - ```sh + ```shell sudo gitlab-ctl stop sudo gitlab-ctl start postgresql ``` @@ -310,19 +310,19 @@ is prepended with the relevant node for better clarity: 1. **(secondary)** Stop all services: - ```sh + ```shell sudo gitlab-ctl stop ``` 1. **(secondary)** Prevent running database migrations: - ```sh + ```shell sudo touch /etc/gitlab/skip-auto-migrations ``` 1. **(secondary)** Move the old database to another directory: - ```sh + ```shell sudo mv /var/opt/gitlab/postgresql{,.bak} ``` @@ -331,33 +331,33 @@ is prepended with the relevant node for better clarity: 1. **(secondary)** Make sure all services are up: - ```sh + ```shell sudo gitlab-ctl start ``` 1. **(secondary)** Reconfigure GitLab: - ```sh + ```shell sudo gitlab-ctl reconfigure ``` 1. **(secondary)** Run the PostgreSQL upgrade command: - ```sh + ```shell sudo gitlab-ctl pg-upgrade ``` 1. **(secondary)** See the stored credentials for the database that you will need to re-initialize the replication: - ```sh + ```shell sudo grep -s primary_conninfo /var/opt/gitlab/recovery.conf ``` 1. **(secondary)** Save the snippet below in a file, let's say `/tmp/replica.sh`. Modify the embedded paths if necessary: - ```bash + ```shell #!/bin/bash PORT="5432" @@ -404,19 +404,19 @@ is prepended with the relevant node for better clarity: 1. **(secondary)** Run the recovery script using the credentials from the previous step: - ```sh + ```shell sudo bash /tmp/replica.sh ``` 1. **(secondary)** Reconfigure GitLab: - ```sh + ```shell sudo gitlab-ctl reconfigure ``` 1. **(secondary)** Start all services: - ```sh + ```shell sudo gitlab-ctl start ``` @@ -425,7 +425,7 @@ is prepended with the relevant node for better clarity: 1. **(primary)** After all **secondary** nodes are updated, start all services in **primary** node: - ```sh + ```shell sudo gitlab-ctl start ``` @@ -437,7 +437,7 @@ and it is required since 10.0. 1. Run database migrations on tracking database: - ```sh + ```shell sudo gitlab-rake geo:db:migrate ``` |