Skip to content

Commit 43071a0

Browse files
committed
docs: update CI/CD documentation
1 parent 8197472 commit 43071a0

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

doc/source/configuration/ci-cd.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ Runner Deployment
219219
4. Provide all the relevant Kayobe :code:`group_vars` for :code:`gitlab-runners` under :code:`${KAYOBE_CONFIG_PATH}/environments/${KAYOBE_ENVIRONMENT}/inventory/group_vars/gitlab-runners`
220220
* `infra-vms` ensuring all required `infra_vm_extra_network_interfaces` are defined
221221
* `network-interfaces`
222+
* `allocated IPs`
222223

223224
5. Edit the ``${KAYOBE_CONFIG_PATH}/inventory/group_vars/gitlab-runners/runners.yml`` file which will contain the variables required to deploy a series of runners.
224225
Below is an example of how GitLab runners can be configured for deployment.
@@ -271,7 +272,7 @@ Runner Deployment
271272
network_mode: host
272273
273274
6. Obtain a runner token for each runner that is required for deployment.
274-
This token can be obtained by visiting the GitLab project -> Settings -> CI/CD -> Runners -> New project runner -> Complete the form and copy the token.
275+
This token can be obtained by visiting the GitLab project -> Settings -> CI/CD -> Runners -> New project runner -> Complete the form including any tags used by the runners such as kayobe, openstack and environment_name.
275276
Once the token has been obtained, add it to :code:`secrets.yml` under :code:`secrets_gitlab_production_runner_token` and :code:`secrets_gitlab_staging_runner_token`
276277

277278
7. Deploy the infra-vm
@@ -290,7 +291,7 @@ Runner Deployment
290291

291292
10. Check runners have registered properly by visiting the repository's :code:`CI/CD` tab -> :code:`Runners`
292293

293-
11. The contents of :code:`/opt/.docker/config.json` on the runner should be added to GitLab CI/CD settings as a sercret variable.
294+
11. The contents of :code:`/opt/.docker/config.json` on the runner should be added to GitLab CI/CD settings as a sercret variable if GitLab version permits otherwise variable is fine.
294295
This is required to allow the runners to pull images from the registry.
295296
Visit the GitLab project -> Settings -> CI/CD -> Variables -> Add a new variable with the key :code:`DOCKER_AUTH_CONFIG` and the value of the contents of :code:`/opt/.docker/config.json`
296297

@@ -314,6 +315,10 @@ However, if you have a single host that is shared between environments then Open
314315
Once the above playbook has been applied you need to grab the root token from :code:`vault/kayobe-automation-keys.json` as you will need this to enable JWT support.
315316
This would also be an opportune time to encrypt the :code:`vault/kayobe-automation-keys.json` to protect the contents.
316317

318+
.. code-block:: bash
319+
320+
ansible-vault encrypt vault/kayobe-automation-keys.json --vault-password-file ~/.vault.password
321+
317322
In order to enable JWT support the following steps must be carried out within the openbao container on the runner host.
318323

319324
1. SSH into the runner host

etc/kayobe/inventory/group_vars/gitlab-writers/writer.yml renamed to etc/kayobe/inventory/group_vars/gitlab-writer/writer.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
# See documentation for more information
44
# https://github.com/stackhpc/ansible-collection-kayobe-workflows/blob/main/roles/gitlab/README.md
55

6+
gitlab_output_directory: $KAYOBE_CONFIG_PATH/../../.gitlab/
7+
8+
gitlab_registry: "{{ pulp_url | regex_replace('^https?://|^http?://', '') }}"
9+
10+
gitlab_openstack_release: "{{ openstack_release }}"
11+
612
###############################################################################
713
# Dummy variable to allow Ansible to accept this file.
814
workaround_ansible_issue_8743: yes

0 commit comments

Comments
 (0)