dka23 / gitlab-github-proxy

Proxy to provide GitHub-like API on top of Gitlab. Especially designed to use the JIRA DVCS connector with Gitlab.
35 stars 19 forks source link

GitLab-GitHub Proxy (glghproxy) Build Status

Proxy to provide GitHub-like API on top of Gitlab. Especially designed to use the JIRA DVCS connector with Gitlab.

VERY IMPORTANT CONFIGURATION REQUIREMENTS:

  1. The address of glghproxy on your network MUST be DNS resolvable AND routable from BOTH a) JIRA server, and b) end-user browsers.
  2. Additionally, glghproxy MUST operate on tcp/80.

Setup

Step 1. Launch glghproxy using Maven and Spring boot from CLI

NOTICE: The default Spring listen port is tcp/8080, so specifying it again as a java argument is redundant, but makes the problem explicit.
You can choose to setup a port forward in front of it, or (not recommended) run the service as root so you can listen on tcp/80.

mvn spring-boot:run -DgitlabUrl="http://yourgitlabserver.yourcompany.com" -Dserver.port=8080

Alternatively, you can launch using Docker, and its resident service will proxy tcp/80 -> tcp/8080 for you:

docker build -t glghproxy .
docker run -p 80:8080 glghproxy

For the hostname (ie. glghproxy) you'll need to add a DNS entry or a /etc/hosts override. However the latter will only work if glghproxy, JIRA, and the browser are operating on the same machine. That can be nice for testing, (e.g., with a locally installed [containerized] trial version of JIRA) but be aware that if you are using docker containers you'll need to ensure the hostname resolves to an IP that is resolvable from all sides--in that case, the docker0 interface ip is recommended.

WARNING: By default, JIRA and glghproxy want to operate on the same tcp/8080 port. If you are not using containers, you'll have to resolve this conflict yourself.

Step 2. Generate new Application in GitLab

Step 3. Add a new DVCS account in JIRA