Task 3: GitLab Runner
Task 3: GitLab Runner
Register the First GitLab Runner
With the base infrastructure established, the next step involves deploying a GitLab Runner to prepare for pipeline deployment.
Initial Configuration Steps
Navigate to the project settings and access the CI/CD section. Locate the "Runners" area and expand it to reveal the necessary details.

Disable the "Enable shared runners" option and keep this page accessible. You'll need the GitLab instance URL and registration token for the subsequent registration process.


Register Docker Runner
Return to your Ubuntu server SSH session and execute the registration command:
sudo gitlab-runner registerWhen prompted, provide the following information:
- GitLab coordinator URL:
http://198.18.134.28/ - Registration token: Use your token from the GitLab interface
- Description: Docker (or your preferred identifier)
- Tags:
docker - Executor type:
docker - Default Docker image:
alpine:3.16.2
Expected output confirms successful registration with a unique runner ID.
Register Shell Runner
Execute the registration command a second time:
sudo gitlab-runner registerProvide these details:
- GitLab coordinator URL:
http://198.18.134.28/ - Registration token: Use your token from the GitLab interface
- Description: Shell (or your preferred identifier)
- Tags:
shell - Executor type:
shell
Verification
Refresh the GitLab CI/CD settings page and expand the "Runners" section. Both runners should now appear with their respective tags ("docker" and "shell") visible.

With two runners successfully registered, you're prepared to deploy your first CI/CD pipeline.
