summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axilleas@axilleas.me>2016-12-15 22:18:23 +0000
committerAchilleas Pipinellis <axilleas@axilleas.me>2016-12-15 22:18:23 +0000
commit58597bf5986f9fbc86a5f1f83478117bf3d8009a (patch)
tree69d99c642ac6df8507a4b75d3bd8174ea7bc2bc6
parent026cef7ac2c827acba39761e708c054fd47fb51d (diff)
parenta7a2cc13555d63f17ee9a423ab8beda9c4d03fdc (diff)
downloadgitlab-ce-58597bf5986f9fbc86a5f1f83478117bf3d8009a.tar.gz
Merge branch 'ha_docs_auto_migrate_false' into 'master'
Add `gitlab_rails['auto_migrate'] = false` to HA docs for Redis/PG [ci skip] ## What does this MR do? In a high availability configuration, the Redis and PostgreSQL nodes should not attempt to run database migrations. In fact, trying will result in errors about not providing a database password. To prevent errors and confusion, add this configurtion to these nodes' `gitlab.rb` file. See merge request !8112
-rw-r--r--doc/administration/high_availability/database.md6
-rw-r--r--doc/administration/high_availability/redis.md8
2 files changed, 7 insertions, 7 deletions
diff --git a/doc/administration/high_availability/database.md b/doc/administration/high_availability/database.md
index b36cf18d459..e4f94eb7cb6 100644
--- a/doc/administration/high_availability/database.md
+++ b/doc/administration/high_availability/database.md
@@ -44,6 +44,9 @@ If you use a cloud-managed service, or provide your own PostgreSQL:
gitlab_rails['db_password'] = 'DB password'
postgresql['md5_auth_cidr_addresses'] = ['0.0.0.0/0']
postgresql['listen_address'] = '0.0.0.0'
+
+ # Disable automatic database migrations
+ gitlab_rails['auto_migrate'] = false
```
1. Run `sudo gitlab-ctl reconfigure` to install and configure PostgreSQL.
@@ -102,9 +105,6 @@ If you use a cloud-managed service, or provide your own PostgreSQL:
1. Exit the database prompt by typing `\q` and Enter.
1. Exit the `gitlab-psql` user by running `exit` twice.
1. Run `sudo gitlab-ctl reconfigure` a final time.
-1. Run `sudo touch /etc/gitlab/skip-auto-migrations` to prevent database migrations
- from running on upgrade. Only the primary GitLab application server should
- handle migrations.
---
diff --git a/doc/administration/high_availability/redis.md b/doc/administration/high_availability/redis.md
index f532a106bc6..b4e7bf21e35 100644
--- a/doc/administration/high_availability/redis.md
+++ b/doc/administration/high_availability/redis.md
@@ -287,14 +287,14 @@ The prerequisites for a HA Redis setup are the following:
redis['password'] = 'redis-password-goes-here'
```
-1. To prevent database migrations from running on upgrade, run:
+1. Only the primary GitLab application server should handle migrations. To
+ prevent database migrations from running on upgrade, add the following
+ configuration to your `/etc/gitlab/gitlab.rb` file:
```
- sudo touch /etc/gitlab/skip-auto-migrations
+ gitlab_rails['auto_migrate'] = false
```
- Only the primary GitLab application server should handle migrations.
-
1. [Reconfigure Omnibus GitLab][reconfigure] for the changes to take effect.
### Step 2. Configuring the slave Redis instances