Allow runner server to have no internet access and communicate through private network with gitlab

Description

Architecture case:

  • Gitlab running on a server with public network access. Access through external URL: https://mygitlab.com/ci
  • Server where runners are installed have no internet access, no public network interface
  • Gitlab and runner machines are on the same private network and can ping each other ips

Given this case, the runners won't, as they have only private network interface, manage to reach https://mygitlab.com/ci. So no job is picked and registering doesn't work.

Trying to register using https://private_gitlab_ip/ci won't work and trigger x509 certificate error.

Proposal

Being able to register runners with gitlab through private network.

Maybe runners / gitlab should be able to communicate through an other protocol than http. Maybe SSH?

Overview - Use case

It would allow to use gitlab CI stack in every kind of network architecture. Even within private networks.

Make sure these are completed before closing the issue, with a link to the relevant commit.