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
|**run-overcloud-service-reconfigure**| Reconfigure services across the overcloud. |
24
23
|**run-overcloud-service-upgrade**| Perform an upgrade of overcloud services. |
25
24
|**run-seed-host-configure**| Configure the seed host. |
26
25
|**run-seed-host-package-update**| Update the system packages of the seed host. |
@@ -35,19 +34,23 @@ Role Variables
35
34
36
35
The following variables can be used to make small adjustments to the composition of the workflows.
37
36
38
-
`output_directory`: control the location where the workflows shall be written to.
37
+
`github_output_directory`: control the location where the workflows shall be written to.
39
38
40
-
`runner_name`: name of the GitHub runner used by the workflows see[runs-on](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on).
39
+
`github_runs_on`: control which runner can accept this workflow. See GitHub for more information on[runs-on](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on).
41
40
42
-
`image_url`: full URL of the kayobe container image complete with registry and tag.
41
+
`github_image_url`: full URL of the kayobe container image complete with registry and tag.
43
42
44
-
`registry_password`: password used to authenticate with the docker registry.
43
+
`github_registry_username`: username used to authenticate with the docker registry.
45
44
46
-
`kayobe_arguments`: a dictionary of arguments that can be used to override the default arguments found within `vars/main.yml`. For example if you wanted to change the value of `KAYOBE_ENVIRONMENT` from its default of `production` you can simply add `KAYOBE_ENVIRONMENT` to this dictionary and it will take precedence over the defaults.
45
+
`github_registry_password`: password used to authenticate with the docker registry.
46
+
47
+
`github_kayobe_arguments`: a dictionary of arguments that can be used to override the default arguments found within `vars/main.yml`. For example if you wanted to change the value of `KAYOBE_ENVIRONMENT` from its default of `production` you can simply add `KAYOBE_ENVIRONMENT` to this dictionary and it will take precedence over the defaults.
48
+
49
+
`github_*_hook:` see section [Template Hooks](#template-hooks) for information about this variables
47
50
48
51
If you wish to make more impactful changes such as which workflows are built and what they contain then see the list of dictionaries called `workflows` in `defaults/main.yml`
49
52
50
-
`workflows:` is a list of dictionaries that contains each of the workflows described above. A given list element is made up of the following:
53
+
`github_workflows:` is a list of dictionaries that contains each of the workflows described above. A given list element is made up of the following:
51
54
52
55
-`name`: the name which the workflow shall refer to itself as within GitHub workflows user interface.
53
56
@@ -57,62 +60,69 @@ If you wish to make more impactful changes such as which workflows are built and
57
60
58
61
-`arguments`: list of arguments keys used by the automation task the contents will be acquired from `kayobe_arguments` or the defaults.
59
62
60
-
The following will override `workflows` to ensure only `Run overcloud database backup` is generated.
63
+
-`path_override`: Some workflows benefit from a dedicated workflow template as the `generic.yml.j2` cannot meet the requirements of all workflows. Therefore it might be beneficial to create specific templates within the `{{ playbook_dir }}/templates/` directory and set this variable to that specific path.
64
+
65
+
-`use_bespoke`: As mentioned in `path_override` some workflows require a more specific template to meet their needs. Setting this to true would create a workflow from a bespoke template if one exists within the roles `templates` directory. Note this is intended for **internal use only**.
66
+
67
+
The following will override `github_workflows` to ensure only `Build Kayobe Image` and `Run Kolla Config Diff` is generated.
61
68
62
69
```yaml
63
-
workflows:
64
-
- name: Run overcloud database backup
65
-
file_name: run-overcloud-database-backup.yml
66
-
trigger:
67
-
workflow_dispatch: *combined_inputs
68
-
schedule:
69
-
cron: "30 0 * * *"
70
-
arguments:
71
-
- KOLLA_TAGS
72
-
- KOLLA_LIMIT
73
-
- KAYOBE_TAGS
74
-
- KAYOBE_LIMIT
75
-
- HOME
70
+
github_workflows:
71
+
- "{{ build_kayobe_image }}"
72
+
- "{{ run_kolla_config_diff }}"
76
73
```
77
74
78
-
Example Playbook
79
-
----------------
80
-
81
-
The following example playbook will generate a series of `reference` workflows which can be found under `.github/workflows`
75
+
In the following example `github_build_kayobe_image` has been changed to use a user provided template stored within their `{{ playbook_dir }}/templates`
> :warning: This feature is marked as `experimental` at the moment as it is not clear how to configure `ansible.builtin.template` to look at the `${{ playbook_dir }}/templates/hooks/`.
94
84
95
-
Workflows can be expanded with the use of `hooks` which are templates that if provided can be inserted into the appropriate location enabling the introduction of additional steps within the workflow job.
96
-
This could include the use of HashiCorp Vault or installing and configuring a network proxy.
85
+
Template Hooks
86
+
--------------
87
+
88
+
Workflows can be expanded with the use of hooks which are variables that if provided can be inserted into the appropriate location enabling the introduction of additional steps within the workflow job. This could include the use of HashiCorp Vault or installing and configuring a network proxy.
89
+
90
+
There are currently three hooks available
91
+
92
+
- `github_checkout_hook`: a hook that occurs before the repository is cloned by the `checkout` action.
97
93
94
+
- `github_kayobe_hook`: a hook that occurs after the the repository has been cloned and before the kayobe automation task has started.
98
95
96
+
- `github_final_hook`: a hook that occurs after the kayobe automation task has finished.
97
+
98
+
A hook must be defined as a variable and should be a scalar block string.
0 commit comments