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

Making some font changes, to add a box for code portion of the script

parent 49043271
Pipeline #499 passed with stages
in 2 seconds
......@@ -8,23 +8,23 @@ For more detailed instructions on setting up a VM, follow these [instructions](h
## Install Git runner on the newly created VM:
1) Download the runner
`sudo curl -L --output /bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64`
```sudo curl -L --output /bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64```
2) Give execute permission to the runner.
`sudo chmod +x /bin/gitlab-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`
```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`
```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
......@@ -32,15 +32,15 @@ search openstacklocal
#nameserver 8.8.8.8
nameserver 172.20.0.137
#nameserver 8.8.8.8
`
```
2) Add static address for gitlab.rc.uab.edu in /etc/hosts file:
`
```
192.168.16.10 ruffner.rc.uab.edu
`
```
3) Upgrade git:
`
```
wget https://github.com/git/git/archive/v2.23.0.tar.gz
tar xzvf v2.23.0.tar.gz
cd git-2.23.0/
......@@ -50,48 +50,47 @@ sudo ./configure
sudo make
sudo make install
sudo pip install ansible
`
```
## Register the runner:
1) Run the following command:
`sudo gitlab-runner register`
```sudo gitlab-runner register```
2) Enter your Gitlab instance URL:
`Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com )
https://gitlab.rc.uab.edu/`
```Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com )
https://gitlab.rc.uab.edu/```
3) Enter the token, you obtained in the Gitlab interface:
`Please enter the gitlab-ci token for this runner
xxx`
```Please enter the gitlab-ci token for this runner
xxx```
4) Gitlab description (can be changed later in the UI):
`Please enter the gitlab-ci description for this runner
[hostname] my-runner`
```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):
```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:
ssh`
```Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
ssh```
## Add packer and openstack on the runner VM:
1) Add packer:
`
```
wget https://releases.hashicorp.com/packer/1.4.3/packer_1.4.3_linux_amd64.zip
unzip packer_1.4.3_linux_amd64.zip
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