Skip to content

Instantly share code, notes, and snippets.

@amingilani
Last active February 16, 2020 14:48
Show Gist options
  • Select an option

  • Save amingilani/09499c28a21a975cf84d51f7f5a68327 to your computer and use it in GitHub Desktop.

Select an option

Save amingilani/09499c28a21a975cf84d51f7f5a68327 to your computer and use it in GitHub Desktop.
Gitlab worker setup

In your digital ocean instance, use the following cloud-init script

#cloud-config

runcmd:
 - SCRIPT_URL=https://gist.githubusercontent.com/amingilani/09499c28a21a975cf84d51f7f5a68327/raw/gitlab-runner-install.sh
 - tmux new-session -s "InstallGitlabRunner" "curl $SCRIPT_URL | bash"
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install -y gitlab-runner unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades
@amingilani
Copy link
Author

One-liner if you're already into the system:

tmux new-session -s "InstallGitlabRunner" "curl https://gist.githubusercontent.com/amingilani/09499c28a21a975cf84d51f7f5a68327/raw/gitlab-runner-install.sh | bash"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment