Skip to content

Commit a9e49fd

Browse files
committed
Merge branch 'stackhpc/2024.1' into caracal-to-epoxy-sync
2 parents a58a77a + ae13db3 commit a9e49fd

38 files changed

+221
-70
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ name: All in one
77
on:
88
workflow_call:
99
inputs:
10-
runner:
11-
required: false
10+
runner_env:
11+
description: Which cloud to run on?
1212
type: string
13-
description: 'Runner name'
14-
default: 'arc-skc-aio-runner'
13+
default: SMS Lab
1514
kayobe_image:
1615
description: Kayobe container image
1716
type: string
@@ -40,18 +39,6 @@ on:
4039
description: Default network interface name
4140
type: string
4241
default: ens3
43-
vm_flavor:
44-
description: Flavor for the all-in-one VM
45-
type: string
46-
default: en1.medium
47-
vm_network:
48-
description: Network for the all-in-one VM
49-
type: string
50-
default: stackhpc-ci
51-
vm_subnet:
52-
description: Subnet for the all-in-one VM
53-
type: string
54-
default: stackhpc-ci
5542
OS_CLOUD:
5643
description: Name of cloud in clouds.yaml
5744
type: string
@@ -87,11 +74,18 @@ on:
8774
required: true
8875

8976
jobs:
77+
runner-selection:
78+
uses: ./.github/workflows/runner-selector.yml
79+
with:
80+
runner_env: ${{ inputs.upgrade == true && 'Leafcloud' || inputs.runner_env }}
9081
# NOTE: Runner needs unzip and nodejs packages.
9182
all-in-one:
9283
name: All in one
9384
if: ${{ inputs.if && !cancelled() }}
94-
runs-on: ${{ inputs.runner }}
85+
environment: ${{ inputs.upgrade == true && 'Leafcloud' || inputs.runner_env }}
86+
runs-on: ${{ needs.runner-selection.outputs.runner_name_aio }}
87+
needs:
88+
- runner-selection
9589
permissions: {}
9690
env:
9791
KAYOBE_ENVIRONMENT: ci-aio
@@ -170,9 +164,9 @@ jobs:
170164
aio_vm_interface = "${{ env.VM_INTERFACE }}"
171165
aio_vm_name = "${{ env.VM_NAME }}"
172166
aio_vm_image = "${{ env.VM_IMAGE }}"
173-
aio_vm_flavor = "${{ env.VM_FLAVOR }}"
174-
aio_vm_network = "${{ env.VM_NETWORK }}"
175-
aio_vm_subnet = "${{ env.VM_SUBNET }}"
167+
aio_vm_flavor = "${{ vars.HOST_IMAGE_BUILD_FLAVOR }}"
168+
aio_vm_network = "${{ vars.HOST_IMAGE_BUILD_NETWORK }}"
169+
aio_vm_subnet = "${{ vars.HOST_IMAGE_BUILD_SUBNET }}"
176170
aio_vm_volume_size = "${{ env.VM_VOLUME_SIZE }}"
177171
aio_vm_tags = ${{ env.VM_TAGS }}
178172
EOF
@@ -181,9 +175,6 @@ jobs:
181175
SSH_USERNAME: "${{ inputs.ssh_username }}"
182176
VM_NAME: "skc-ci-aio-${{ inputs.neutron_plugin }}-${{ github.run_id }}"
183177
VM_IMAGE: ${{ steps.image_name.outputs.image_name }}
184-
VM_FLAVOR: ${{ inputs.vm_flavor }}
185-
VM_NETWORK: ${{ inputs.vm_network }}
186-
VM_SUBNET: ${{ inputs.vm_subnet }}
187178
VM_INTERFACE: ${{ inputs.vm_interface }}
188179
VM_VOLUME_SIZE: ${{ inputs.upgrade && '65' || '50' }}
189180
VM_TAGS: '["skc-ci-aio", "PR=${{ github.event.number }}"]'
@@ -192,7 +183,7 @@ jobs:
192183
run: terraform plan
193184
working-directory: ${{ github.workspace }}/terraform/aio
194185
env:
195-
OS_CLOUD: ${{ inputs.OS_CLOUD }}
186+
OS_CLOUD: ${{ vars.OS_CLOUD }}
196187
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
197188
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
198189

@@ -213,7 +204,7 @@ jobs:
213204
exit 1
214205
working-directory: ${{ github.workspace }}/terraform/aio
215206
env:
216-
OS_CLOUD: ${{ inputs.OS_CLOUD }}
207+
OS_CLOUD: ${{ vars.OS_CLOUD }}
217208
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
218209
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
219210

@@ -471,7 +462,7 @@ jobs:
471462
run: terraform destroy -auto-approve
472463
working-directory: ${{ github.workspace }}/terraform/aio
473464
env:
474-
OS_CLOUD: ${{ inputs.OS_CLOUD }}
465+
OS_CLOUD: ${{ vars.OS_CLOUD }}
475466
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
476467
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
477468
if: always()

.github/workflows/update-dependencies.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414

1515
jobs:
1616
propose_github_release_updates:
17+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
1718
runs-on: ubuntu-22.04
1819
strategy:
1920
matrix:

.github/workflows/upstream-sync.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Upstream Sync
3+
'on':
4+
schedule:
5+
- cron: "15 8 * * 1"
6+
workflow_dispatch:
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
jobs:
11+
synchronise-2023-1:
12+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
13+
name: Synchronise 2023.1
14+
uses: stackhpc/.github/.github/workflows/upstream-sync.yml@main
15+
with:
16+
release_series: 2023.1
17+
upstream: openstack/kayobe-config
18+
synchronise-2024-1:
19+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
20+
name: Synchronise 2024.1
21+
uses: stackhpc/.github/.github/workflows/upstream-sync.yml@main
22+
with:
23+
release_series: 2024.1
24+
upstream: openstack/kayobe-config
25+
synchronise-2025-1:
26+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
27+
name: Synchronise 2025.1
28+
uses: stackhpc/.github/.github/workflows/upstream-sync.yml@main
29+
with:
30+
release_series: 2025.1
31+
upstream: openstack/kayobe-config
32+
synchronise-master:
33+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
34+
name: Synchronise master
35+
uses: stackhpc/.github/.github/workflows/upstream-sync.yml@main
36+
with:
37+
release_series: master
38+
upstream: openstack/kayobe-config

doc/source/configuration/ipa.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ StackHPC provides prebuilt Ironic Python Agent (IPA) images in Release Train
1111
through Ark.
1212

1313
These images are built in CI using a GitHub workflow and are configured in this
14-
repository. See :kayobe-doc: `Kayobe documentation
14+
repository. See :kayobe-doc:`Kayobe documentation
1515
<configuration/reference/ironic-python-agent.html>` for more details on IPA.
1616

1717
Release Train IPA images are used by Bifrost and Overcloud Ironic by default in

doc/source/configuration/monitoring.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,18 @@ for the exporter.
169169
If you are deploying in a cloud with internal TLS, you may be required
170170
to provide a CA certificate for the OpenStack Capacity exporter if your
171171
certificate is not signed by a trusted CA. For example, to use a CA certificate
172-
named ``vault.crt`` that is also added to the Kolla containers:
172+
named ``vault.crt`` or ``openbao.crt`` that is also added to the Kolla containers:
173173

174174
.. code-block:: yaml
175175
176176
stackhpc_os_capacity_openstack_cacert: "{{ kayobe_env_config_path }}/kolla/certificates/ca/vault.crt"
177177
178+
or
179+
180+
.. code-block:: yaml
181+
182+
stackhpc_os_capacity_openstack_cacert: "{{ kayobe_env_config_path }}/kolla/certificates/ca/openbao.crt"
183+
178184
Alternatively, to disable certificate verification for the OpenStack Capacity
179185
exporter:
180186

doc/source/configuration/release-train.rst

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,29 @@ The Pulp container is deployed on the seed by default, but may be disabled by
5252
setting ``seed_pulp_container_enabled`` to ``false`` in
5353
``etc/kayobe/seed.yml``.
5454

55-
The URL and credentials of the local Pulp server are configured in
56-
``etc/kayobe/pulp.yml`` via ``pulp_url``, ``pulp_username`` and
57-
``pulp_password``. In most cases, the default values should be sufficient.
58-
An admin password must be generated and set as the value of a
59-
``secrets_pulp_password`` variable, typically in an Ansible Vault encrypted
60-
``etc/kayobe/secrets.yml`` file. This password will be automatically set on
61-
Pulp startup.
62-
63-
If a proxy is required to access the Internet from the seed, ``pulp_proxy_url``
64-
may be used.
55+
The URL for the local Pulp server is configured by ``pulp_url`` within
56+
``etc/kayobe/pulp.yml``.
57+
58+
The Pulp service can be configured with two sets of credentials; one for
59+
administrator operations and another read-only for overcloud hosts
60+
to use.
61+
The administrator credentials can be configured ``pulp_username``,
62+
``pulp_password``
63+
The basic user account credentials can be configured with ``pulp_stack_username``
64+
and ``pulp_stack_password``.
65+
Both sets of credentials can be found within ``etc/kayobe/pulp.yml``.
66+
67+
Both the ``pulp_password`` and ``pulp_stack_password`` are intended to be
68+
configured via their ``secrets_*`` counterparts, i.e.
69+
``secrets_pulp_password`` and ``secrets_pulp_stack_password``. These variables
70+
are expected to be set in an Ansible Vault encrypted
71+
``etc/kayobe/secrets.yml`` file.
72+
73+
Passwords can be generated using ``OpenSSL``
74+
75+
.. code-block:: console
76+
77+
openssl rand -base64 32
6578
6679
Host images are not synchronised to the local Pulp server, since they should
6780
only be pulled to the seed node once. More information on host images can be

etc/kayobe/ansible/cephadm-gather-keys.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
# Kolla Ansible's merge_configs module does not like the leading tabs in ceph.conf.
6969
content: |
7070
{{ cephadm_ceph_conf.stdout | regex_replace('\t') }}
71+
{{ kolla_ceph_conf_append if kolla_ceph_conf_append is defined }}
7172
dest: "{{ kayobe_env_config_path }}/kolla/config/{{ kolla_service_to_conf_dir[item.0.name] }}/ceph.conf"
7273
loop: "{{ query('subelements', kolla_ceph_services | selectattr('required'), 'keys') }}"
7374
loop_control:

etc/kayobe/ansible/check-kayobe-version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
tasks:
99
- name: Check version
1010
when: stackhpc_enable_kayobe_check
11+
check_mode: false
1112
block:
1213
- name: Get package info
1314
community.general.pip_package_info:

etc/kayobe/ansible/check-kolla-ansible-version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
tasks:
77
- name: Check version
88
when: stackhpc_enable_kolla_ansible_check
9+
check_mode: false
910
block:
1011
- name: Get current Kolla-Ansible tag
1112
ansible.builtin.command:

etc/kayobe/ansible/openbao-deploy-overcloud.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
gather_facts: true
2222
hosts: controllers
2323
vars:
24-
openbao_bind_address: "{{ internal_net_name | net_ip }}"
24+
openbao_bind_addr: "{{ internal_net_name | net_ip }}"
25+
# This is the IP address of the first controller and therefore the leader within
26+
# OpenBao. This could be replaced with the VIP address of the internal network if
27+
# HAProxy has been configured to load balance the OpenBao API.
28+
openbao_raft_leaders:
29+
- "{{ internal_net_name | net_ip(inventory_hostname=groups['controllers'][0]) }}"
2530
tasks:
2631
- name: Set a fact about the virtualenv on the remote system
2732
ansible.builtin.set_fact:
@@ -46,7 +51,7 @@
4651

4752
- name: Template out TLS key and cert
4853
ansible.builtin.copy:
49-
# Within the OpenBao container these uids & gids map to the vault user
54+
# Within the OpenBao container these uids & gids map to the openbao user
5055
src: "{{ kayobe_env_config_path }}/openbao/{{ item }}"
5156
dest: /opt/kayobe/openbao/{{ item }}
5257
owner: 100
@@ -55,6 +60,7 @@
5560
loop:
5661
- "{% if kolla_internal_fqdn != kolla_internal_vip_address %}{{ kolla_internal_fqdn }}{% else %}overcloud{% endif %}.crt"
5762
- "{% if kolla_internal_fqdn != kolla_internal_vip_address %}{{ kolla_internal_fqdn }}{% else %}overcloud{% endif %}.key"
63+
- "OS-TLS-INT.crt"
5864
become: true
5965

6066
- name: Apply OpenBao role
@@ -71,6 +77,7 @@
7177
openbao_docker_tag: "{{ overcloud_openbao_docker_tag }}"
7278
openbao_tls_cert: "{% if kolla_internal_fqdn != kolla_internal_vip_address %}{{ kolla_internal_fqdn }}{% else %}overcloud{% endif %}.crt"
7379
openbao_tls_key: "{% if kolla_internal_fqdn != kolla_internal_vip_address %}{{ kolla_internal_fqdn }}{% else %}overcloud{% endif %}.key"
80+
openbao_tls_ca: "OS-TLS-INT.crt"
7481
copy_self_signed_ca: true
7582
openbao_api_addr: https://{{ internal_net_name | net_ip }}:8200
7683
openbao_write_keys_file: true
@@ -91,6 +98,28 @@
9198
vault_unseal_keys: "{{ openbao_keys.keys_base64 }}"
9299
environment:
93100
https_proxy: ""
101+
run_once: true
102+
103+
# As the first instance is now unsealed the other instances will now need some
104+
# time to connect before we can proceed.
105+
- name: Wait for OpenBao Raft peers to connect
106+
ansible.builtin.wait_for:
107+
timeout: 30
108+
delegate_to: localhost
109+
110+
# Raft peers take few seconds before they report an unsealed state therefore
111+
# we must wait.
112+
- name: Unseal OpenBao
113+
ansible.builtin.import_role:
114+
name: stackhpc.hashicorp.vault_unseal
115+
vars:
116+
vault_api_addr: https://{{ internal_net_name | net_ip }}:8200
117+
vault_unseal_token: "{{ openbao_keys.root_token }}"
118+
vault_unseal_ca_cert: "{{ '/etc/pki/tls/certs/ca-bundle.crt' if ansible_facts.os_family == 'RedHat' else '/usr/local/share/ca-certificates/OS-TLS-ROOT.crt' }}"
119+
vault_unseal_keys: "{{ openbao_keys.keys_base64 }}"
120+
vault_unseal_timeout: 10
121+
environment:
122+
https_proxy: ""
94123

95124
- name: Configure PKI
96125
any_errors_fatal: true

etc/kayobe/ansible/openbao-deploy-seed.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
gather_facts: true
55
hosts: seed
66
vars:
7-
openbao_bind_address: "{{ ansible_facts['lo'].ipv4.address }}"
8-
openbao_api_addr: "http://{{ openbao_bind_address }}:8200"
7+
openbao_bind_addr: "{{ ansible_facts['lo'].ipv4.address }}"
8+
openbao_api_addr: "http://{{ openbao_bind_addr }}:8200"
99
tasks:
1010
- name: Set a fact about the virtualenv on the remote system
1111
ansible.builtin.set_fact:

etc/kayobe/ansible/pci-passthrough.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
vfio_pci_ids: |-
1212
{% set gpu_list = [] %}
1313
{% set output = [] %}
14-
{% for gpu_group in gpu_group_map | dict2items | default([]) %}
14+
{% for gpu_group in (gpu_group_map | default({})) | dict2items %}
1515
{% if gpu_group.key in group_names %}
1616
{% set _ = gpu_list.append(gpu_group.value) %}
1717
{% endif %}

etc/kayobe/ansible/pulp-host-image-download.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,15 @@
77
# password in the get_url task of this playbook
88
stackhpc_overcloud_host_image_url_no_auth: "{{ stackhpc_release_pulp_content_url }}/kayobe-images/\
99
{{ openstack_release }}/{{ os_distribution }}/{{ os_release }}/\
10-
{{ 'ofed/' if stackhpc_overcloud_host_image_is_ofed else '' }}\
1110
{{ stackhpc_overcloud_host_image_version }}/\
12-
overcloud-{{ os_distribution }}-{{ os_release }}\
13-
{{ '-ofed' if stackhpc_overcloud_host_image_is_ofed else '' }}.qcow2"
11+
overcloud-{{ os_distribution }}-{{ os_release }}.qcow2"
1412
tasks:
1513
- name: Print image information
1614
ansible.builtin.debug:
1715
msg: |
1816
OS Distribution: {{ os_distribution }}
1917
OS Release: {{ os_release }}
2018
Image tag: {{ stackhpc_overcloud_host_image_version }}
21-
OFED: {{ stackhpc_overcloud_host_image_is_ofed }}
2219
2320
# TODO: Add checksum support
2421
- name: Download image artifact

etc/kayobe/ansible/requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ collections:
99
- name: stackhpc.pulp
1010
version: 0.5.5
1111
- name: stackhpc.hashicorp
12-
version: 2.6.1
12+
version: 2.7.1
1313
- name: stackhpc.kayobe_workflows
1414
version: 1.1.0
1515
roles:

etc/kayobe/ansible/smartmon-tools.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515

1616
- name: Ensure Python 3, venv, and pip are installed
1717
ansible.builtin.package:
18-
name:
19-
- python3
20-
- python3-venv
21-
- python3-pip
18+
name: >
19+
{{ ['python3', 'python3-pip'] + (['python3-venv'] if ansible_facts['distribution'] == 'Ubuntu' else []) }}
2220
state: present
2321
become: true
2422

etc/kayobe/cephadm.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,6 @@ kolla_ceph_manila_required: "{{ kolla_enable_manila | bool }}"
133133

134134
# Whether to generate Ceph configuration for Nova.
135135
kolla_ceph_nova_required: "{{ kolla_enable_nova | bool }}"
136+
137+
# A (multiline) string to append to all Ceph configuration files.
138+
#kolla_ceph_conf_append:

etc/kayobe/containers/pulp/post.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@
2828
- stackhpc_pulp_sync_for_local_container_build | bool
2929
- pulp_settings.changed
3030

31+
- name: Ensure Pulp stack user exists
32+
ansible.builtin.include_role:
33+
name: stackhpc.pulp.pulp_user
34+
vars:
35+
pulp_users:
36+
- username: "{{ pulp_stack_username }}"
37+
password: "{{ pulp_stack_password }}"
38+
is_staff: false
39+
when:
40+
- pulp_stack_username is defined and pulp_stack_username | length > 0
41+
- pulp_stack_password is defined and pulp_stack_password | length > 0
42+
3143
- name: Login to docker registry
3244
docker_login:
3345
registry_url: "{{ kolla_docker_registry or omit }}"

0 commit comments

Comments
 (0)