Add correct external url and correct mattermost external url.
This MR is attempting to resolve 2 big issues:
- If
external_url
is not specified, user can't clone via HTTP/SSH - Mattermost auth with GitLab does not work because of redirect loop
However, because I didn't manage to find a way to reliably pass the correct values, this MR does not fix the problem.
Can't clone via HTTP/SSH
Due to the way instances are configured with the template, newly created node does not have a public accessible record (nor IP).
You can reach your GitLab node and login with the public facing LB IP address. However, because external_url
is pointing to a non existent record, you won't be able to clone a repository. This is because automatic generation of external_url
is not pointing to a LB but the instance record.
In order to make the clone work, external_url
needs to be specified with either LB IP address or with a domain.
I was unable to successfully clone in the case of not using Route53 domain, so this case still needs to be solved
Mattermost auth not working
Because mattermost_external_url
was missing, when you get redirected back from GitLab to Mattermost you were pointed to localhost:2000
instead of a reachable record.
This is because mattermost_external_url
is a magical variable that sets configuration both on the side of GitLab and the side of Mattermost. Because of oauth automatically happening, GitLab had a url which was not reachable.