O
O
Oleg Aksenov2020-09-09 02:46:33
GitLab
Oleg Aksenov, 2020-09-09 02:46:33

How to proxy gitlab-runner to gitlab?

Good day, tell me, please,
there are two subnets in which access is closed to each other and you need to open it, in one gitlab itself, in the other several gitlab-runner (executor shell) are now deployed, nginx was raised to facilitate access organization, with the configuration :

stream {
  upstream gitlab {
    server gitlab.test.local:80 max_fails=3 fail_timeout=60s;
  }
  server {
    listen 10100;
    proxy_connect_timeout 60s;
    proxy_timeout 180s;
    proxy_pass gitlab;
  }

All gitlab-runners refer to nginx, which directs them to gitlab, but when executing a job, an http error 400 occurs during cloning. Is opening port 80 in one direction enough for correct communication?

At the same time, gitlab-runner did not perceive any environment associated with the proxy, registered proxy settings in the .bash_profile of the gitlab-runner user, under which everything is done and the same in systemctl, and also the environment in the runner config itself, I had to specify the address not gitlab , but a proxy.
Does anyone have any suggestions for organizing this interaction?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2020-09-09
@chupasaurus

Saw through access from runners to the server API without proxies and other heresy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question