Can latest runner be installed with a v17.4 of GitLab?

We host a GitLab instance on AWS that is at v17.4.2. I would like to install a running locally. The docs say to keep the major and minor the same, but these are not available and I can’t upgrade our GitLab version.

The docs seem to imply I can install the latest, or install a specific version.

Would I be ok running the latest runner or should I really install the specific version of the runner to match the GitLab instance?

You can get the gitlab-runner here for 17.4.x: runner/gitlab-runner - Results for 'gitlab-runner-17.4' in runner/gitlab-runner

All you need to do now is filter the search to get the one for the correct OS version you need to run it on.

2 Likes

Agree with Ian. It is generally advisable to keep the same major versions for server and runner (17.x <> 17.x) as suggested in the docs. Other variants may work but are not tested and could introduce unwanted or unknown behavior.

1 Like

I tried download the gitlab-runner-helper-images from that same link but 17.4 is not found. I can view the available versions up till about page 9 of the display list before I get a message saying IP blocked. And doing it from my company site says the same thing.

Any way to find the gitlab-runner-helper-image that also needs to be installed?

Here is the message it displays after about 270 entries (page 9).

You are currently viewing from a blocked IP address or country.
Client IP: xx.xx.xx.xx
Ray ID: 9686b3b48a4469d2
Location: US

Which specific package OS/environment/platform are you looking for to install GitLab Runner? That might help filter the package overview and provide direct download URLs.

This is why I said in my post all you need to do now is filter it, see screenshot below:

In the package type you can choose whether you are wanting a deb or rpm or whatever package. And in the distribution box you have the option to filter it for ubuntu, debian, el/8 or whatever your Linux distro is. Had you done this as I mentioned, you wouldn’t have to click with 9+ pages of results.

I amended the version number of my search from 17.4 to 17.4.2 like your Gitlab version, now there are only six pages to search through: runner/gitlab-runner - Results for 'gitlab-runner-17.4.2' in runner/gitlab-runner or filter the Linux distribution and you will probably only have 1 page or results to look at.

1 Like

I think you didn’t understand my post. I have already downloaded the gitlab-runner_17.4.2-1_amd64.deb for Jammy, and now trying to get the gitlab-runner-helper-image from the same link. But when I search for it, it doesn’t appear because it acts like it only has access to 270 entries (9 pages worth) before that IP blocked error appears. So the version I need isn’t being found after filtering.

I have Ubuntu 22.04. Again, the filter doesn’t find the version I need. It only goes back as far as 17.9 and I need 17.4.2.

OK, there is an easy way around that. Create a file called /etc/apt/sources.list.d/gitlab-runner.list with the following content:

# this file was generated by packages.gitlab.com for
# the repository at https://packages.gitlab.com/runner/gitlab-runner

deb [signed-by=/usr/share/keyrings/runner_gitlab-runner-archive-keyring.gpg] https://packages.gitlab.com/runner/gitlab-runner/ubuntu/ jammy main
deb-src [signed-by=/usr/share/keyrings/runner_gitlab-runner-archive-keyring.gpg] https://packages.gitlab.com/runner/gitlab-runner/ubuntu/ jammy main

now, install the Gitlab runner like this:

apt-get install gitlab-runner=17.4.2-1

that should pull in any dependencies that the package needs. If you already have Gitlab runner packages installed then you will need to remove them first including the helper package. I don’t believe a helper package exists for that version, so I think your problem is you are trying to install an older runner, when a newer one is already installed.

And this does work, because I just did it:

 apt-get install gitlab-runner=17.4.2-1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  docker-engine
The following NEW packages will be installed:
  gitlab-runner
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 501 MB of archives.
After this operation, 569 MB of additional disk space will be used.
Get:1 https://packages.gitlab.com/runner/gitlab-runner/ubuntu jammy/main amd64 gitlab-runner amd64 17.4.2-1 [501 MB]
Fetched 500 MB in 20s (24.5 MB/s)                                                                                                                       
Selecting previously unselected package gitlab-runner.
(Reading database ... 195145 files and directories currently installed.)
Preparing to unpack .../gitlab-runner_17.4.2-1_amd64.deb ...
Unpacking gitlab-runner (17.4.2-1) ...

And here it is when installed:

dpkg -l | grep -i gitlab
ii  gitlab-runner                      17.4.2-1                                amd64        GitLab Runner

as you can see, it’s installing just the gitlab-runner package, no helper package. So remove the newer gitlab-runner and helper packages that you already have installed.

One thing I will add is that if the above copy/paste doesn’t work for the apt list file due to missing GPG key, then run this script from the Gitlab runner install instructions:

curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo bash

since that will create the apt list file that I copied/pasted above.

2 Likes

In general you should keep the version aligned with your version of Gitlab but in practice I’ve noticed no issues with a big skew when I needed something from a newer version of the runner far removed from my Gitlab.