CI: Test bare metal compute registration

Change-Id: Iaef2420c1f12fa4296c0e1c3d5afc4687d4b3c4a
This commit is contained in:
Mark Goddard 2024-05-15 17:19:37 +01:00
parent 617eed4741
commit 6a83e1d75b
4 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,14 @@
{% raw %}
---
ironic_driver: ipmi
# Cheating a little here - use the first port of the Tenks VirtualBMC.
ironic_driver_info:
ipmi_address: 0.0.0.0
ipmi_username: username
ipmi_password: password
ipmi_port: 6230
ironic_properties:
capabilities: "{{ ironic_capabilities }}"
ironic_resource_class: "example_resource_class"
ironic_capabilities: "boot_option:local,boot_mode:uefi"
{% endraw %}

View File

@ -0,0 +1,2 @@
[baremetal-compute]
hv100

View File

@ -32,6 +32,16 @@
replace: 'default_boot_mode: "uefi"'
when: ironic_boot_mode == 'uefi'
- name: Ensure baremetal inventory exists
template:
src: baremetal.j2
dest: "{{ kayobe_config_src_dir }}/etc/kayobe/inventory/baremetal"
- name: Ensure baremetal-compute group_vars exists
template:
src: baremetal-compute.j2
dest: "{{ kayobe_config_src_dir }}/etc/kayobe/inventory/group_vars/baremetal-compute"
- name: Ensure kayobe is installed
shell:
cmd: dev/install.sh &> {{ logs_dir }}/ansible/install

View File

@ -41,3 +41,11 @@
cmd: dev/overcloud-test-baremetal.sh &> {{ logs_dir }}/ansible/overcloud-test-baremetal
chdir: "{{ kayobe_src_dir }}"
executable: /bin/bash
- name: Register dummy baremetal compute nodes
shell:
cmd: >
source {{ kayobe_src_dir }}/dev/environment-setup.sh &&
source "${KOLLA_CONFIG_PATH:-/etc/kolla}/admin-openrc.sh" &&
kayobe baremetal compute register &> {{ logs_dir }}/ansible/baremetal-compute-register
executable: /bin/bash