diff options
author | Alejandro Rodríguez <alejorro70@gmail.com> | 2017-09-07 20:37:12 +0300 |
---|---|---|
committer | Alejandro Rodríguez <alejorro70@gmail.com> | 2017-09-11 23:42:40 +0300 |
commit | 5cfce5391ef0a9eca5929752d6e16fbd8ca18c84 (patch) | |
tree | 2a37617c0b1b4e9e11146c8f8d9704417cc688da /_support | |
parent | d98f6527108f762729c0b1bb2ea00c595490ab25 (diff) |
Make the gitaly nodes use an external "internal API"
That sounds weird, I know
Diffstat (limited to '_support')
-rw-r--r-- | _support/test-cluster/README.md | 3 | ||||
-rw-r--r-- | _support/test-cluster/app1/etc-gitlab/gitlab.rb | 3 | ||||
-rw-r--r-- | _support/test-cluster/gitaly1/etc-gitlab/gitlab.rb | 6 | ||||
-rw-r--r-- | _support/test-cluster/gitaly2/etc-gitlab/gitlab.rb | 6 |
4 files changed, 17 insertions, 1 deletions
diff --git a/_support/test-cluster/README.md b/_support/test-cluster/README.md index e1e010cf7..7ceb43049 100644 --- a/_support/test-cluster/README.md +++ b/_support/test-cluster/README.md @@ -3,7 +3,8 @@ This directory contains a [docker-compose.yml](https://docs.docker.com/compose/) and Omnibus GitLab configuration files to boot GitLab with multiple Gitaly servers -behind it. This is meant for testing purposes. +behind it. This setup is meant for testing purposes only and SHOULD NOT be used +in production environments because it handles secrets in an unsafe way. Boot the cluster with `docker-compose up`. After some time you can log in to your GitLab instance at `localhost:8080`. diff --git a/_support/test-cluster/app1/etc-gitlab/gitlab.rb b/_support/test-cluster/app1/etc-gitlab/gitlab.rb index 49b3fdf67..30f03892e 100644 --- a/_support/test-cluster/app1/etc-gitlab/gitlab.rb +++ b/_support/test-cluster/app1/etc-gitlab/gitlab.rb @@ -14,3 +14,6 @@ git_data_dirs({ 'default' => {'path' => '/mnt/data1', 'gitaly_address' => 'tcp://gitaly1:6666'}, 'gitaly2' => {'path' => '/mnt/data2', 'gitaly_address' => 'tcp://gitaly2:6666'}, }) + +# We have to use the same token in all hosts for internal API authentication +gitlab_shell['secret_token'] = 'f4kef1xedt0ken' diff --git a/_support/test-cluster/gitaly1/etc-gitlab/gitlab.rb b/_support/test-cluster/gitaly1/etc-gitlab/gitlab.rb index 258dfcb04..68b317ccc 100644 --- a/_support/test-cluster/gitaly1/etc-gitlab/gitlab.rb +++ b/_support/test-cluster/gitaly1/etc-gitlab/gitlab.rb @@ -20,3 +20,9 @@ gitlab_rails['auto_migrate'] = false gitlab_rails['redis_host'] = 'app1' gitlab_rails['redis_port'] = 6379 + +# Use the remote internal API +gitlab_rails['internal_api_url'] = 'http://app1:80' + +# We have to use the same token in all hosts for internal API authentication +gitlab_shell['secret_token'] = 'd07589078736b802db1b8aae2e61d8ba694c15837a7a015909c34b3f456417c231fffdb21352052620f9539c77a4ffb5d7c7050eb14d5f336585e9796df7bc1e' diff --git a/_support/test-cluster/gitaly2/etc-gitlab/gitlab.rb b/_support/test-cluster/gitaly2/etc-gitlab/gitlab.rb index dff87a391..1e660273e 100644 --- a/_support/test-cluster/gitaly2/etc-gitlab/gitlab.rb +++ b/_support/test-cluster/gitaly2/etc-gitlab/gitlab.rb @@ -23,3 +23,9 @@ gitlab_rails['auto_migrate'] = false gitlab_rails['redis_host'] = 'app1' gitlab_rails['redis_port'] = 6379 + +# Use the remote internal API +gitlab_rails['internal_api_url'] = 'http://app1:80' + +# We have to use the same token in all hosts for internal API authentication +gitlab_shell['secret_token'] = 'd07589078736b802db1b8aae2e61d8ba694c15837a7a015909c34b3f456417c231fffdb21352052620f9539c77a4ffb5d7c7050eb14d5f336585e9796df7bc1e' |