Commit de2d0e20 authored by Robert Speicher's avatar Robert Speicher

Add instructions for "Run a psql console in staging environment"

parent 32be789b
......@@ -77,6 +77,7 @@ The aim of this project is to have a quick guide of what to do when an emergency
* [Gracefully restart sidekiq jobs](howto/manage-workers.md#gracefully-restart-sidekiq-jobs)
* [Start a rails console in the staging environment](howto/staging-environment.md#run-a-rails-console-in-staging-environment)
* [Start a redis console in the staging environment](howto/staging-environment.md#run-a-redis-console-in-staging-environment)
* [Start a psql console in the staging environment](howto/staging-environment.md#run-a-psql-console-in-staging-environment)
* [Force a failover with postgres or redis](howto/manage-pacemaker.md#force-a-failover)
* [Use aptly](howto/aptly.md)
......
......@@ -29,6 +29,18 @@ If you have any idea on how to improve such feedback loop or you are missing any
* start redis-cli `/opt/gitlab/embedded/bin/redis-cli`
* authenticate `auth PASSWORD` - replace "PASSWORD" with the retrieved password
## Run a psql console in staging environment
* ssh into the primary database host:
* `ssh db1.staging.gitlab.com`
* start `gitlab-psql` with the following command:
```
sudo -u gitlab-psql -H sh \
-c "/opt/gitlab/embedded/bin/psql \
-h /var/opt/gitlab/postgresql gitlabhq_production"
```
## Deploy to staging
Follow the instructions [from the chef-repo](https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/staging.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