Commit 7baa1d4b authored by Gabriel Mazetto's avatar Gabriel Mazetto

Fix markdown formatting

parent b0e73cd2
......@@ -25,32 +25,38 @@ You must make the changes in the exact specific order:
3. Promote the Postgres in your secondary node as primary
4. Log-in to your secondary node with a user with `sudo` permission
5. Open the interactive rails console: `sudo gitlab-rails console` and execute:
1. List your primary node and note down it's id:
* List your primary node and note down it's id:
```ruby
Gitlab::Geo.primary_node
```
2. Turn your primary into a secondary:
* Turn your primary into a secondary:
```ruby
Gitlab::Geo.primary_node.update(primary: false)
```
3. List your secondary nodes and note down the id of the one you want to
promote:
* List your secondary nodes and note down the id of the one you want to promote:
```ruby
Gitlab::Geo.secondary_nodes
```
4. To promote a node with id `2` execute:
* To promote a node with id `2` execute:
```ruby
GeoNode.find(2).update!(primary: true)
```
5. Now you have to cleanup your new promoted node by running:
* Now you have to cleanup your new promoted node by running:
```ruby
Gitlab::Geo.primary_node.oauth_application.destroy!
Gitlab::Geo.primary_node.system_hook.destroy!
```
6. And refresh your old primary node to behave correctly as secondary (assuming id is `1`)
* And refresh your old primary node to behave correctly as secondary (assuming id is `1`)
```ruby
GeoNode.find(1).save!
```
7. To exit the interactive console, type: `exit`
* To exit the interactive console, type: `exit`
6. Rsync everything in `/var/opt/gitlab/gitlab-rails/uploads` and
`/var/opt/gitlab/gitlab-rails/shared` from your old node to the new one.
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