Created
April 19, 2017 20:22
-
-
Save SijmenHuizenga/168ab5098afd2775deafd271014edd48 to your computer and use it in GitHub Desktop.
Gitlab Autorunner DigitalOcean UserData startup script (ubuntu 16.04)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 'starting setup...' | |
echo 'installing docker...' | |
curl -sSL https://get.docker.com/ | sh | |
echo 'installing gitlab-ci-multi-runner repository' | |
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash | |
echo 'installing gitlab-ci-multi-runner' | |
sudo apt-get install gitlab-ci-multi-runner | |
echo 'registering gitlab-ci-multi-runner' | |
gitlab-ci-multi-runner register --non-interactive --name "$HOSTNAME" --url "https://gitlab.com/ci" \ | |
--registration-token "" \ | |
--executor "docker" \ | |
--docker-image 'docker:git' \ | |
--docker-volumes /root/.m2:/root/.m2 \ | |
--docker-volumes /var/run/docker.sock:/var/run/docker.sock \ | |
--docker-privileged true | |
echo 'setup complete!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment