The GitLab.com staging environment has a copy of the production database that is not current, ways to keep staging updates are being discussed but no plan are yet made to keep it regularly updated.
This environment also contains a copy of some GitLab groups that are on storage nodes
The main goal of this environment is to reduce the feedback loop between development and production, and to have a playground where we can deploy RCs without compromising production as a whole. If you have any idea on how to improve such feedback loop or you are missing any particular thing that you would like
For all hosts running in the staging environment see the host dashboard.
Access to staging environment is treated the same as production as per handbook.
-
Having created your chef user data bag, ensure that "rails-console" is one of your
groups
. See existing data bags for examples. -
After the data bag is uploaded you will have console access on instances that chef-client has subsequently run on. This may take up to 30m.
-
Try to start a console with:
ssh [email protected]` sudo gitlab-rails console
- SSH into the redis host
ssh redis1.staging.gitlab.com
- Get the redis password with
sudo grep requirepass /var/opt/gitlab/redis/redis.conf
- Start redis-cli
/opt/gitlab/embedded/bin/redis-cli
- Authenticate
auth PASSWORD
- replace "PASSWORD" with the retrieved password
-
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"
Follow the instructions from the chef-repo (to which you need access to deploy anyway)