You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/configuration/ci-cd.rst
+40-26Lines changed: 40 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,12 @@ Runner Deployment
82
82
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.
83
83
You might want to increase the number of runners if usage demands it or new workflows make use of multiple parallel jobs.
84
84
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
+
85
91
.. code-block:: yaml
86
92
87
93
---
@@ -99,6 +105,7 @@ Runner Deployment
99
105
url: pulp.example.com
100
106
username: admin
101
107
password: ${{ secrets.REGISTRY_PASSWORD }}
108
+
share: true
102
109
103
110
github_runners:
104
111
runner_01: {}
@@ -123,36 +130,43 @@ Runner Deployment
123
130
Workflow Deployment
124
131
-------------------
125
132
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>`__.
127
134
128
135
2. Run :code:`kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/write-github-workflows.yml`
129
136
130
137
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.
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`.
156
170
157
171
4. Commit and push all newly generated workflows found under :code:`.github/workflows`
0 commit comments