Skip to content

Add tutorial for Synology setup#1196

Closed
cpoetter wants to merge 1 commit into
sameersbn:masterfrom
cpoetter:master
Closed

Add tutorial for Synology setup#1196
cpoetter wants to merge 1 commit into
sameersbn:masterfrom
cpoetter:master

Conversation

@cpoetter

@cpoetter cpoetter commented Apr 27, 2017

Copy link
Copy Markdown

Synology’s basic GitLab package is based on this Docker. But GitLab Runner or GitLab Container Registry are not available through the Package Center. Therefore I created a tutorial. Because this repository was my first location to look for an explanation how to set it up, I would like to link it in the ReadMe.

Synology’s basic GitLab package is based on this Docker. But GitLab Runner or GitLab Container Registry are not available through the Package Center. Therefore I created this tutorial.
@jostyee

jostyee commented Apr 28, 2017

Copy link
Copy Markdown
Contributor

I'd rather commit the tutorial here instead of a link.

@cpoetter

cpoetter commented Apr 28, 2017

Copy link
Copy Markdown
Author

@jostyee Thanks for your feedback! I also thought about that. But actually most of the information summarised in my tutorial is already part of this repo and the docker-gitlab-ci-multi-runner repo. It just needed to be slightly adjusted. For example the port for the registry can't be 5000, because that is the port used by the Synology DSM itself. Or the runner can't run in Docker executor mode, because a DSM user has no access to /var/run/docker.sock. Therefore the gitlab_ci_multi_runner user in the runner container should at least have the possibility to execute sudo commands if needed.

Moreover I did not want to duplicate the awesome documentation here, just pick the important part for a Synology user and write it somewhere up. Looking into the issues convinced me to link it directly here in this repo.

@gjrtimmer

Copy link
Copy Markdown
Contributor

@cpoetter I'm running also on Synology, here is some additional information:

I've created a new gitlab-runner which is Synology compliant, the latest version of the runner of gitlab does not match the docker-engine version which is running on Synology. In order to run match version you need a runner which has docker-engine 1.11.2 as backend because of the internal docker-api.
The image does use the latest gitlab-runner.

See: https://hub.docker.com/r/datacore/gitlab-runner/
Repo: https://github.com/GJRTimmer/docker-gitlab-runner
Branch: Synology
Or: tag 1.11.2
Image is based on Alpine.

Additonally, maybe it is an idea to also write a section how to use the the Synology Certificate center in combination with gitlab to run with TLS/SSL enabled to use Let's encrypt certificates.

I've also created a image for building GoLang projects maybe a we could add a section for image references to point to build containers for building projects with Gitlab CI, what do you think ?

Golang image for CI: https://hub.docker.com/r/datacore/alpine-golang

@cpoetter

Copy link
Copy Markdown
Author

@gjrtimmer Awesome idea to use the Synology Certificate Center with Let's encrypt to provide certificates for GitLab. The certificates are currently the only section in my tutorial where users need to actually run terminal commands instead of the WYSIWYG DSM setup. It took me quite some time to configure the setup as is, but I will definitely look into that!

Regarding your runner Docker image. I was actually hoping to stay with @sameersbn runner version to keep it consistent. And as far as I can see a pull request which is updating to the newest runner version is going to merge soon. I tested the merged repo and it works fine on my DS916+ with the Synology GitLab version.

@jostyee These discussions are actually the reason I wanted to relocate the tutorial into a new repo. How to setup the Synology Certificate Center has nothing to do with this repo.

@cpoetter

Copy link
Copy Markdown
Author

@gjrtimmer I looked a bit into the certificate topic just now. The Certificate Center is storing the certificates in /usr/syno/etc/certificate/_archive/. The problem is, that this directory is not visible in the File Station Web UI. So we can't select it as a directory to be mounted into a Docker. Also unfortunately File Station does not support symbolic links. So linking the files into a directory that we can mount does not help.

This is the same issue as with the /var/run/docker.sock file for the Docker executor mode of the GitLab runner. I don't have a solution for this problem at the moment (besides launching the Docker via the terminal, which is not the intended solution for my tutorial. I want to write a tutorial that works hopefully just with the Web UI. I made already a pull request in the runner repo to get closer to my goal.).

I submitted already a feature request to support symbolic links in File Station. Maybe it would be a great idea if you do the same.

@gjrtimmer

gjrtimmer commented Apr 28, 2017 via email

Copy link
Copy Markdown
Contributor

@cpoetter

Copy link
Copy Markdown
Author

@gjrtimmer I actually hope we can eliminate the need of console access soon.

  • To install and configure GitLab itself we obviously don't need console access.
  • To install and configure GitLab Runner we also do not need console access. Only if we want to enable sudo commands in the gitlab-ci.yml file. And to fix that I submitted a pull request.
  • To install and configure GitLab Container Registry we only need the console to create self signed certificates. This could also be done automatically while the registry Docker is booting up for the first time with the help of an environment variable flag.

This would of course only be the first step. The second step would be to find a solution to reuse the Synology Certificate Center certificates.

@cpoetter

Copy link
Copy Markdown
Author

@gjrtimmer I found a way to use the Let's Encrypt certificates without console access. We can use Synology's Reverse Proxy service as a load balancer with SSL termination. I added a new section regarding that in my tutorial.

I will look into the certificates used for the communication between the registry container and GitLab now. I think the easiest solution is to create a new pull request for this repository and add an environment variable flag to generate these certificates while booting the GitLab container the first time.

@solidnerd

Copy link
Copy Markdown
Collaborator

Hey,

why I would appreciate it as well to have this doc in our docs folder. So we have all on a single place. This seems for me a lot of work that you did to get it running on your synology. So WDYT ?

@stale

stale Bot commented May 7, 2020

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.

@stale stale Bot added the wontfix label May 7, 2020
@stale stale Bot closed this May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants