Skip to content

Commit a5a2dd6

Browse files
committed
fix: reworded section on github_registry
1 parent d73f6e8 commit a5a2dd6

File tree

1 file changed

+40
-26
lines changed

1 file changed

+40
-26
lines changed

doc/source/configuration/ci-cd.rst

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ Runner Deployment
8282
As for how many runners present three is suitable number as this would prevent situations where long running jobs could halt progress other tasks whilst waiting for a free runner.
8383
You might want to increase the number of runners if usage demands it or new workflows make use of multiple parallel jobs.
8484

85+
Note :code:`github_registry` and the elements of the dict control the registry settings for pulling and pushing container images used by the workflows.
86+
In the example below the registry settings have been adapted to demonstrate what a shared registry between environments might look like.
87+
This values maybe suitable for your deployment providing all environments can reach the same registry.
88+
If the all of the environments use their own registry and nothing is shared between them then :code:`github_registry` can omitted from the file and the template will expect environment specific secrets and variables to be added to the repository settings.
89+
This is discussed further in the next section.
90+
8591
.. code-block:: yaml
8692
8793
---
@@ -99,6 +105,7 @@ Runner Deployment
99105
url: pulp.example.com
100106
username: admin
101107
password: ${{ secrets.REGISTRY_PASSWORD }}
108+
share: true
102109
103110
github_runners:
104111
runner_01: {}
@@ -123,36 +130,43 @@ Runner Deployment
123130
Workflow Deployment
124131
-------------------
125132

126-
1. Edit `${KAYOBE_CONFIG_PATH}/inventory/group_vars/github-writer/writer.yml` in the base configuration making the appropriate changes to your deployments specific needs. See documentation for `stackhpc.kayobe_workflows.github <https://github.com/stackhpc/ansible-collection-kayobe-workflows/tree/main/roles/github>`__.
133+
1. Edit :code:`${KAYOBE_CONFIG_PATH}/inventory/group_vars/github-writer/writer.yml` in the base configuration making the appropriate changes to your deployments specific needs. See documentation for `stackhpc.kayobe_workflows.github <https://github.com/stackhpc/ansible-collection-kayobe-workflows/tree/main/roles/github>`__.
127134

128135
2. Run :code:`kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/write-github-workflows.yml`
129136

130137
3. Add all required secrets and variables to repository either via the GitHub UI or GitHub CLI (may require repository owner)
131-
* KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: private key used by Ansible to authenticate with machines.
132-
* KAYOBE_VAULT_PASSWORD: password used by the config to encrypt Ansible Vault secrets.
133-
* REGISTRY_PASSWORD: password used to login to the docker registry such as Pulp.
134-
* TEMPEST_OPENRC: contents of :code:`kolla/public-openrc.sh`
135-
* REGISTRY_PASSWORD: the password to access the docker registry for pushing and pulling containers. Recommend to use Pulp on the seed node.
136-
137-
Note if you are using multiple environments and not sharing secrets between environments then each of these must have the environment name prefix for each environment, for example:
138-
* PRODUCTION_KAYOBE_AUTOMATION_SSH_PRIVATE_KEY
139-
* PRODUCTION_KAYOBE_VAULT_PASSWORD
140-
* PRODUCTION_REGISTRY_PASSWORD
141-
* PRODUCTION_TEMPEST_OPENRC
142-
* PRODUCTION_REGISTRY_URL*
143-
* PRODUCTION_REGISTRY_USERNAME*
144-
* PRODUCTION_REGISTRY_PASSWORD*
145-
* STAGING_KAYOBE_AUTOMATION_SSH_PRIVATE_KEY
146-
* STAGING_KAYOBE_VAULT_PASSWORD
147-
* STAGING_REGISTRY_PASSWORD
148-
* STAGING_TEMPEST_OPENRC
149-
* STAGING_REGISTRY_URL*
150-
* STAGING_REGISTRY_USERNAME*
151-
* STAGING_REGISTRY_PASSWORD*
152-
153-
Note regarding the :code:`REGISTRY_` secrets and variables if you are using a single environment then :code:`REGISTRY_URL` and :code:`REGISTRY_PASSWORD` can be added directly to the workflows.
154-
This is also true in the event of using multiple environments with a single shared Pulp registry.
155-
You only need to add the secrets and variables in the event of using multiple environments each with their own registry.
138+
139+
.. raw:: html
140+
141+
<center><table style="padding: 5px;">
142+
<thead>
143+
<tr>
144+
<th style="text-align: center;padding: 5px;">Secrets</th>
145+
<th style="text-align: center;padding: 5px;">Variables</th>
146+
</tr>
147+
</thead>
148+
<tbody>
149+
<tr>
150+
<td style="text-align: center;padding: 5px;">KAYOBE_AUTOMATION_SSH_PRIVATE_KEY</td>
151+
<td style="text-align: center;padding: 5px;">REGISTRY_USERNAME</td>
152+
</tr>
153+
<tr>
154+
<td style="text-align: center;padding: 5px;">KAYOBE_VAULT_PASSWORD</td>
155+
<td style="text-align: center;padding: 5px;">REGISTRY_URL</td>
156+
</tr>
157+
<tr>
158+
<td style="text-align: center;padding: 5px;">REGISTRY_PASSWORD</td>
159+
</tr>
160+
<tr>
161+
<td style="text-align: center;padding: 5px;">TEMPEST_OPENRC</td>
162+
<td></td>
163+
</tr>
164+
</tbody>
165+
</table></center>
166+
167+
Note the above table shows the secrets and variable one may need to add to GitHub for a successful deployment.
168+
However, these secrets and variables might not all be required for example if :code:`github_registry` has been configured with a single shared registry then :code:`REGISTRY_USERNAME` and :code:`REGISTRY_URL` can be ignored.
169+
Also it is important that if you are using multiple environments and secrets and variables are not being shared then each will require an environment prefix added in the form `ENVIRONMENT_NAME_SECRET_OR_VARIABLE_NAME` for example if there was two environments each name :code:`production` and :code:`staging` then :code:`KAYOBE_AUTOMATION_SSH_PRIVATE_KEY` would be replaced by :code:`PRODUCTION_KAYOBE_AUTOMATION_SSH_PRIVATE_KEY` and :code:`STAGING_KAYOBE_AUTOMATION_SSH_PRIVATE_KEY`.
156170

157171
4. Commit and push all newly generated workflows found under :code:`.github/workflows`
158172

0 commit comments

Comments
 (0)