diff --git a/README.md b/README.md index 3dc023ef7a9ed4569e282fddc65426878ee0e9bc..8fc1e612459d560e701c47499b461288ce5898c0 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,21 @@ # Ansible playbook for deploying a GAP GitLab CI runner -This playbook is used to install the gitlab-runner package on a VM. +This playbook is used to install the gitlab-runner package on a VM, and register it as such for a GAP repository of +your choice. -To run this playbook: - 1. Provision a 'nat_ci' VM in Puppet +## Running this playbook + + 1. Provision a VM somewhere, anywhere 2. Get the ip address of the new VM, and configure your ssh environment 3. Create & activate a python virtual environment and install ansible 4. Update inventory.yml so that your VM is defined in the "gitlab-runner" group - 5. Update group_vars/ci-runners.yml with your gitlab.geant.net username and personal access token - 6. Install the `community.general` collection from Ansible galaxy with the following command: `ansible-galaxy collection install community.general` + 5. Create the file `group_vars/ci-runners.yml` following the [example file](group_vars/ci-runners.yml.example) given + * Consider the type of executor you want/need (docker, shell, etc.) + * More info on GitLab runner executors can be found [here](https://docs.gitlab.com/runner/executors/) + * This requires acquiring an access token to the GitLab instance for which you want to set up a runner + 6. Install the `community.general` collection from Ansible galaxy with the following command: +`ansible-galaxy collection install community.general` 7. Run the following command to execute the playbook: `ansible-playbook -i inventory.yml playbook.yml` + 8. A new runner should now be available, please ensure that you also set up CI/CD pipelines that make use of this new +runner