Commit b28fec1d authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Update documentation to contain an example of setting up runner with ruby.

parent c9e4686a
# Installing GitLab Runner # Installing GitLab Runner
   
## Ubuntu 14.04 64-bit (for Ubuntu 12.04 and other operating systems please check the other [downloads](downloads.md) All available packages are listed on the [downloads](downloads.md) page.
## Ubuntu 14.04 64-bit
   
```bash ```bash
# Download the package # Download the package
wget https://s3-eu-west-1.amazonaws.com/downloads-packages/ubuntu-14.04/gitlab-runner_5.1.0~pre.omnibus.1-1_amd64.deb wget https://s3-eu-west-1.amazonaws.com/downloads-packages/ubuntu-14.04/gitlab-runner_5.2.0~omnibus.1-1_amd64.deb
   
# Install the package # Install the package
sudo dpkg -i gitlab-runner_5.1.0~pre.omnibus.1-1_amd64.deb sudo dpkg -i gitlab-runner_5.2.0~omnibus.1-1_amd64.deb
   
# Create the user that will run your builds # Create the user that will run your builds
sudo useradd -s /bin/false -m -r gitlab-runner sudo useradd -s /bin/false -m -r gitlab-runner
...@@ -22,11 +24,36 @@ sudo cp /opt/gitlab-runner/doc/install/upstart/gitlab-runner.conf /etc/init/ ...@@ -22,11 +24,36 @@ sudo cp /opt/gitlab-runner/doc/install/upstart/gitlab-runner.conf /etc/init/
sudo service gitlab-runner start sudo service gitlab-runner start
``` ```
   
You can troubleshoot failing builds by logging in as gitlab-runner with: `sudo -su gitlab-runner`. You can troubleshoot failing builds by checking the log file.
   
The runner will write log messages via Upstart to The runner will write log messages via Upstart to
`/var/log/upstart/gitlab-runner.log`. `/var/log/upstart/gitlab-runner.log`.
   
If you want to test a ruby application, for example GitLab CE, you can use the following to setup runner with ruby:
```bash
# as root
(
set -e
apt-get update
apt-get upgrade -y
apt-get install -y curl
cd /root
rm -rf cookbooks cookbook-gitlab-test.git
curl 'https://gitlab.com/gitlab-org/cookbook-gitlab-test/repository/archive.tar.gz?ref=master' | tar -xvz
mkdir cookbooks
mv cookbook-gitlab-test.git cookbooks/cookbook-gitlab-test
curl -L https://www.chef.io/chef/install.sh | bash
chef-client -z -r 'recipe[cookbook-gitlab-test]'
)
### Register your runner instance with a GitLab CI Coordinator
sudo /opt/gitlab-runner/bin/setup -C /home/gitlab-runner
# Restart the gitlab-runner Upstart script
sudo service gitlab-runner restart
```
## Centos 6 64-bit ## Centos 6 64-bit
   
MR welcome. This would need an alternative Upstart config file (because the one MR welcome. This would need an alternative Upstart config file (because the one
......
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