Commit 98695507 authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

First draft for setting up runner VM

parent e70a408d
# Setting up a runner
## Create a VM in OpenStack space.
For more detailed instructions on setting up a VM, follow these [instructions](
## Install Git runner on the newly created VM:
1) Download the runner
`sudo curl -L --output /bin/gitlab-runner`
2) Give execute permission to the runner.
`sudo chmod +x /bin/gitlab-runner`
3) Create a GitLab CI user.
`sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash`
4) Install and run as service.
`sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start`
## Modify your VM so that it has connection to Gitlab instance, and OpenStack platform:
1) Edit DNS nameserver in `/etc/resolve.conf` file:
; Created by cloud-init on instance boot automatically, do not edit.
; generated by /usr/sbin/dhclient-script
search openstacklocal
2) Add static address for in /etc/hosts file:
3) Upgrade git:
tar xzvf v2.23.0.tar.gz
cd git-2.23.0/
sudo yum -y install zlib-devel
sudo yum install curl-devel
sudo ./configure
sudo make
sudo make install
sudo pip install ansible
## Register the runner:
1) Run the following command:
`sudo gitlab-runner register`
2) Enter your Gitlab instance URL:
`Please enter the gitlab-ci coordinator URL (e.g. )`
3) Enter the token, you obtained in the Gitlab interface:
`Please enter the gitlab-ci token for this runner
4) Gitlab description (can be changed later in the UI):
`Please enter the gitlab-ci description for this runner
[hostname] my-runner`
5) Enetr the tags for the runner (leave it blank):
`Please enter the gitlab-ci tags for this runner (comma separated):
6) Enetr the executor (choose ssh):
`Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
## Add packer and openstack on the runner VM:
1) Add packer:
sudo rsync -aP packer /bin/
2) Add OpenStack:
sudo yum install epel-release -y
sudo yum -y install python-pip
sudo yum group install "Development Tools" -y
sudo pip install python-openstackclient
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment