- #How to install gitlab runner on kubernetes install
- #How to install gitlab runner on kubernetes update
- #How to install gitlab runner on kubernetes registration
Once the GitLab runner is installed, some additional configuration is necessary. Setting up SSH between the runner-manager and the runners You can choose anything you like but for this tutorial the nginx image is used. When asked for a default Docker image, enter nginx. When asked for an Executor for your GitLab runner enter docker+machine. When asked to lock your GitLab runner to the project, enter false. When asked for tags for your GitLab runner, enter tags that you deem fitting. When asked for a description of your GitLab runner, enter a fitting description. When asked for a GitLab-ci token, enter the token on the page of step 9. When asked for your GitLab URL, enter the URL of your GitLab.
#How to install gitlab runner on kubernetes registration
Keep this page open because the URL and registration token is needed in the following steps.Įnter the following command in your GitLab runner instance to start the registration: sudo gitlab-runner register Go to Overview -> Runners in the left menu bar. Log in to your GitLab with an admin account (the default admin account is root).Ĭlick on the wrench icon Admin Area located in the top bar of GitLab.
#How to install gitlab runner on kubernetes install
Sudo install /tmp/docker-machine /usr/local/bin/docker-machine Install Docker-Machine with the following command: base= &Ĭurl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine & Now install the GitLab runner package: $ sudo apt install gitlab-runner Install the latest version of Docker CE and containerd $ sudo apt-get install docker-ce docker-ce-cli containerd.ioĪdd the GitLab Runner repository: $ curl -L | sudo bash
#How to install gitlab runner on kubernetes update
Update your repositories: $ sudo apt-get update Set up the stable repository: $ sudo add-apt-repository \ Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint. Install Docker with the following command: $ sudo apt-get install \Īdd Docker’s official GPG key: $ curl -fsSL | sudo apt-key add. Start by updating your repositories by using the command: $ sudo apt update Log in to your runner-manager instance using the following example command in your terminal: ssh other examples of SSH follow the Getting Started guide. The flavor c2.small is chosen with the image Ubuntu 18.04 LTS. Launch a new instance on Fuga, in this tutorial the instance is called runner-manager. These runners will receive the jobs from the runner-manager which received the jobs from GitLab. This runner, called the runner-manager, will be used to connect to your GitLab and manages the runners with Docker Machine. In this section the installation and the registration of the GitLab runner will be done. Installing and registering the GitLab runner Save this file to your machine, it will be needed later for the SSH connections between the runners. On your Fuga dashboard go to Compute and click on the Key Pairs tab.Ĭhoose a fitting name for the Key Pair, this tutorial uses name gitlab. Instead of using your personal private SSH keys, a new key is generated and used specifically for the runners. It should look like this:īetween the runner-manager and the runner instances, an SSH connection is used by Docker-Machine. In the Port field enter 2376 and keep the rest of the form at the default values. In the top right corner, click on + Add Rule to add a new security rule. Once the new security group has been created, click on the Manage Rules button that belongs to the new security group you just made. You can enter a description for clarification if you’d like to.Ĭlick on Create Security Group to create the new security group. To open this port, go to Networking and click on the Security Groups tab.Ĭlick on + Create Security Group to create a new security group.Įnter a fitting name for this Security Group, for example, gitlabrunner. In this section is explained how you can open this port with a security group. In order to autoscale your runners, Docker Machine requires port 2376 to be opened for every new runner that gets automatically deployed. SSH keys added to your GitLab admin account.This pipeline can be customized to your liking, for example how many idle runners are available or the number of jobs each runner can handle concurrently. The runner-manager will pass down this job to an available runner, if there are none available, the runner-manager will create a new instance with a runner. GitLab will notify the runner-manager that a new job is available. When a commit is made, a CI/CD pipeline will be started.