Skip to content

Instantly share code, notes, and snippets.

@lorello
Created March 3, 2015 23:25
Show Gist options
  • Select an option

  • Save lorello/3e94dfe83e26569a4752 to your computer and use it in GitHub Desktop.

Select an option

Save lorello/3e94dfe83e26569a4752 to your computer and use it in GitHub Desktop.
puppet-gitlab-ci-runner
Exec {
path => $path,
}
file { '/home/gitlab-runner':
ensure => directory,
}->
user { 'gitlab-runner':
shell => '/bin/false',
home => '/home/gitlab-runner',
system => true,
}
package { 'wget':
ensure => present,
}->
exec { 'download-package':
command => 'wget https://s3-eu-west-1.amazonaws.com/downloads-packages/ubuntu-14.04/gitlab-runner_5.1.0~pre.omnibus.1-1_amd64.deb -O /tmp/gitlab-runner_5.1.0~pre.omnibus.1-1_amd64.deb',
creates => '/tmp/gitlab-runner_5.1.0~pre.omnibus.1-1_amd64.deb',
}->
exec { 'install-package':
command => 'dpkg -i /tmp/gitlab-runner_5.1.0~pre.omnibus.1-1_amd64.deb',
unless => 'dpkg --status gitlab-runner | grep Status | grep installed',
}->
exec { 'init-script-setup':
command => 'cp /opt/gitlab-runner/doc/install/upstart/gitlab-runner.conf /etc/init/',
creates => '/etc/init/gitlab-runner.conf',
}->
service { 'gitlab-runner':
ensure => running,
enable => true,
}->
notify { 'message':
message => "\nComplete setup running command:\n\t/opt/gitlab-runner/bin/setup -C /home/gitlab-runner\n",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment