This playbook deploys Omnibus GitLab.
-
Provision a VM.
-
Add the (floating) IP to the
[gitlab]
group inenv/hosts.ini
. -
Set up A record domain pointing to the VM IP. Put the domain name in
gitlab_fqdn
inenv/vars.yml
. -
Deploy:
ansible-playbook -i env/hosts.ini -e @env/vars.yml gitlab/deploy.yml
(This could take some time.)
-
Open GitLab at https://{{gitlab_fqdn}}.
-
Get the
root
password in/etc/gitlab/initial_root_password
, and save it somewhere. Verify that you can log in using theroot
username and the password. -
Turn off public registration when asked in the top banner.
This assumes the runner is in the same host as GitLab.
-
Open https://{{gitlab_fqdn}}/admin/runners.
-
Click "Register an instance runner", view the registration token, put it in
gitlab_runner_registration_token
inenv/vars.yml
. -
Deploy:
ansible-playbook -i env/hosts.ini -e @env/vars.yml gitlab/deploy_runner.yml
-
Verify that there is a new online runner on https://{{gitlab_fqdn}}/admin/runners.
See: https://stackoverflow.com/a/29414687.
// TODO: automate this step in the playbook.
See: https://docs.gitlab.com/omnibus/settings/smtp.html.
// TODO: automate this step in the playbook.