Im trying to add rancher to gitlab ci/cd. I want to deploy gitlab runners dynamically into the k8s cluster and for that i have to add the cluster in the operations section which i believe its part of the auto devops system.
I’m also having trouble getting GitLab to use a Rancher cluster for CI/CD. Installing Tiller seems to work, but then it stalls on installing GitLab Runner.
Where are you seeing your errors? I’m using the GitLab web ui and the feedback is super minimal. I’d love to look at a log or something that can give me some useful information.
I had trouble when setting it up also. If you look at the screenshot below, there are 2 definitions for the cluster. If you use the first one (servers), it fails because for whatever reason, gitlab can’t handle subpaths as the location for the kubernetes api. If you use the second one (servers-ip-172-31-32-29), it fails becaue gitlab does not recognize the certificate of the IP address for whatever reason.
I was able to get it to work by deploying an nginx reverse proxy to proxy the first one. I proxied it through ingress and used letsencrypt to setup a valid certificate.
I created a git repo and helm chart (rancher 2 compatible) for this at the repo below. It works like a charm.
Make sure you specify the correct subpath.
Essentially, it’s removing the subpath because gitlab can’t handle a kubernetes api from a subpath for some silly reason.
I am trying to get this same integration working. However, I am using Rancher 2.4.8 and Gitlab 13.5.3. I did not install ingress since it already exists and is working. I installed the GitLab-Runner and I can see it in GitLab, but it does not show up anywhere in my Rancher kubernetes cluster. So that is the first mystery.
I do not want to use auto-devops. So I am trying to find some documentation on how to deploy apps using .gitlab-ci.yml and an application.yml file. Any help on this would be appreciated.
I am able to deploy apps just fine now. Thanks. I am not using the gitlab runners launched from GitLab, but rather using runners create with the gitlab spawner and docker-machine solutions.