Skip to content
Draft
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3eeadec
Initial skc baremetal commit
assumptionsandg Nov 3, 2025
f190830
ansible directory and playbooks added to
claudia-lola Nov 3, 2025
4725d97
created stackhpc-sushy-baremetal environment
claudia-lola Nov 4, 2025
6f7e510
Add baremetal config
assumptionsandg Nov 5, 2025
ea55fc3
editing playbooks and config
Nov 6, 2025
a7df156
config edits
claudia-lola Nov 11, 2025
02e6321
edit to controllers.yml
claudia-lola Nov 11, 2025
cb543de
lvm config
claudia-lola Nov 11, 2025
bb16a3e
config edits
claudia-lola Nov 12, 2025
7b62965
config edits
claudia-lola Nov 12, 2025
d89cc63
Merge branch 'skc-baremetal-environment' of github.com:stackhpc/stack…
claudia-lola Nov 12, 2025
8071839
edits baremetal 2 script in stackhpc-baremetal env
Nov 13, 2025
9ced382
playbook and xml file edits
Nov 21, 2025
0e41ba3
config changes
Nov 26, 2025
b0bc901
Merge branch 'stackhpc/2025.1' into skc-baremetal-environment
claudia-lola Nov 26, 2025
f83cfa4
added auto-setup playbook for sushy env, edits for baremetal env play…
claudia-lola Nov 28, 2025
6b51b00
Merge branch 'skc-baremetal-environment' of https://github.com/stackh…
claudia-lola Nov 28, 2025
a437836
removed commented out tasks
claudia-lola Dec 3, 2025
1292989
removing github workflows
claudia-lola Dec 8, 2025
aa6eb8b
moved vars from ironic.yml to be in group_vars and applied during enr…
claudia-lola Dec 8, 2025
f9521be
changed playbook name in baremetal-all to match new baremetal-0-enrol…
claudia-lola Dec 8, 2025
4c34c01
added driver-info, new line for sushy ironic, format fixed for bareme…
claudia-lola Dec 9, 2025
a26287a
edits to driver-info, fix typo in baremetal-0
claudia-lola Dec 9, 2025
6081923
fix typo in baremetal-0
claudia-lola Dec 9, 2025
f181700
removed bikolla_enable_secureboot
claudia-lola Dec 9, 2025
169ac90
removed ironic_driver_info
claudia-lola Dec 9, 2025
1dc4ed8
fix indentation
claudia-lola Dec 9, 2025
2320e84
edits to baremetal scripts and ironic.yml
claudia-lola Dec 9, 2025
b71a267
changed ironic_redfish_address var
claudia-lola Dec 9, 2025
2cfaf7b
change to ironic redfish address url
claudia-lola Dec 9, 2025
895022b
deleted setup-local-link-information.yml playbook
claudia-lola Dec 9, 2025
200d6f6
split sushy playbook in two, added tasks to create baremetal playbook…
claudia-lola Dec 10, 2025
d450861
edits to create-virtual-baremetal playbook
claudia-lola Dec 11, 2025
870672e
edits to libvirt_vm creation
claudia-lola Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 106 additions & 106 deletions .github/workflows/stackhpc-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,109 +132,109 @@ jobs:
secrets: inherit
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

all-in-one-ubuntu-noble-ovn:
name: aio (Ubuntu Noble OVN)
needs:
- check-changes
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: ubuntu
os_release: noble
ssh_username: ubuntu
neutron_plugin: ovn
OS_CLOUD: openstack
if: ${{ needs.check-changes.outputs.aio == 'true' }}
secrets: inherit
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

all-in-one-rocky-9-ovs:
name: aio (Rocky 9 OVS)
needs:
- check-changes
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: rocky
os_release: "9"
ssh_username: cloud-user
neutron_plugin: ovs
OS_CLOUD: openstack
if: ${{ needs.check-changes.outputs.aio == 'true' }}
secrets: inherit
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

all-in-one-rocky-9-ovn:
name: aio (Rocky 9 OVN)
needs:
- check-changes
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: rocky
os_release: "9"
ssh_username: cloud-user
neutron_plugin: ovn
OS_CLOUD: openstack
if: ${{ needs.check-changes.outputs.aio == 'true' }}
secrets: inherit
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

# Test two upgrade scenarios: Ubuntu Jammy to Noble OVN and Rocky 9 OVN.

all-in-one-upgrade-ubuntu-jammy-to-noble-ovn:
name: aio upgrade (Ubuntu Jammy to Noble OVN)
needs:
- check-changes
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: ubuntu
os_release: jammy
ssh_username: ubuntu
neutron_plugin: ovn
OS_CLOUD: openstack
if: ${{ needs.check-changes.outputs.aio == 'true' }}
upgrade: true
secrets: inherit
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

all-in-one-upgrade-rocky-9-ovn:
name: aio upgrade (Rocky 9 OVN)
needs:
- check-changes
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: rocky
os_release: "9"
ssh_username: cloud-user
neutron_plugin: ovn
OS_CLOUD: openstack
if: ${{ needs.check-changes.outputs.aio == 'true' }}
upgrade: true
secrets: inherit
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

all-in-one-upgrade-rocky-9-ovs:
name: aio upgrade (Rocky 9 OVS)
needs:
- check-changes
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: rocky
os_release: "9"
ssh_username: cloud-user
neutron_plugin: ovs
OS_CLOUD: openstack
if: ${{ needs.check-changes.outputs.aio == 'true' }}
upgrade: true
secrets: inherit
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
# all-in-one-ubuntu-noble-ovn:
# name: aio (Ubuntu Noble OVN)
# needs:
# - check-changes
# - build-kayobe-image
# uses: ./.github/workflows/stackhpc-all-in-one.yml
# with:
# kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
# os_distribution: ubuntu
# os_release: noble
# ssh_username: ubuntu
# neutron_plugin: ovn
# OS_CLOUD: openstack
# if: ${{ needs.check-changes.outputs.aio == 'true' }}
# secrets: inherit
# if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

# all-in-one-rocky-9-ovs:
# name: aio (Rocky 9 OVS)
# needs:
# - check-changes
# - build-kayobe-image
# uses: ./.github/workflows/stackhpc-all-in-one.yml
# with:
# kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
# os_distribution: rocky
# os_release: "9"
# ssh_username: cloud-user
# neutron_plugin: ovs
# OS_CLOUD: openstack
# if: ${{ needs.check-changes.outputs.aio == 'true' }}
# secrets: inherit
# if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

# all-in-one-rocky-9-ovn:
# name: aio (Rocky 9 OVN)
# needs:
# - check-changes
# - build-kayobe-image
# uses: ./.github/workflows/stackhpc-all-in-one.yml
# with:
# kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
# os_distribution: rocky
# os_release: "9"
# ssh_username: cloud-user
# neutron_plugin: ovn
# OS_CLOUD: openstack
# if: ${{ needs.check-changes.outputs.aio == 'true' }}
# secrets: inherit
# if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

# # Test two upgrade scenarios: Ubuntu Jammy to Noble OVN and Rocky 9 OVN.

# all-in-one-upgrade-ubuntu-jammy-to-noble-ovn:
# name: aio upgrade (Ubuntu Jammy to Noble OVN)
# needs:
# - check-changes
# - build-kayobe-image
# uses: ./.github/workflows/stackhpc-all-in-one.yml
# with:
# kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
# os_distribution: ubuntu
# os_release: jammy
# ssh_username: ubuntu
# neutron_plugin: ovn
# OS_CLOUD: openstack
# if: ${{ needs.check-changes.outputs.aio == 'true' }}
# upgrade: true
# secrets: inherit
# if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

# all-in-one-upgrade-rocky-9-ovn:
# name: aio upgrade (Rocky 9 OVN)
# needs:
# - check-changes
# - build-kayobe-image
# uses: ./.github/workflows/stackhpc-all-in-one.yml
# with:
# kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
# os_distribution: rocky
# os_release: "9"
# ssh_username: cloud-user
# neutron_plugin: ovn
# OS_CLOUD: openstack
# if: ${{ needs.check-changes.outputs.aio == 'true' }}
# upgrade: true
# secrets: inherit
# if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

# all-in-one-upgrade-rocky-9-ovs:
# name: aio upgrade (Rocky 9 OVS)
# needs:
# - check-changes
# - build-kayobe-image
# uses: ./.github/workflows/stackhpc-all-in-one.yml
# with:
# kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
# os_distribution: rocky
# os_release: "9"
# ssh_username: cloud-user
# neutron_plugin: ovs
# OS_CLOUD: openstack
# if: ${{ needs.check-changes.outputs.aio == 'true' }}
# upgrade: true
# secrets: inherit
# if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
1 change: 1 addition & 0 deletions etc/kayobe/environments/stackhpc-baremetal/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#todo
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---

- name: Register baremetal compute nodes
hosts: "{{ groups['controllers'][0] }}"
vars:
venv: "{{ virtualenv_path }}/openstack-cli"
tasks:
- name: Set up openstack cli virtualenv
pip:
virtualenv: "{{ venv }}"
name:
- python-openstackclient
- python-ironicclient
state: latest
virtualenv_command: "python3.{{ ansible_facts.python.version.minor }} -m venv"
extra_args: "{% if pip_upper_constraints_file %}-c {{ pip_upper_constraints_file }}{% endif %}"

- name: Ensure baremetal nodes are registered in ironic
hosts: baremetal
gather_facts: false
max_fail_percentage: >-
{{ baremetal_compute_register_max_fail_percentage |
default(baremetal_compute_max_fail_percentage) |
default(kayobe_max_fail_percentage) |
default(100) }}
tags:
- baremetal
vars:
venv: "{{ virtualenv_path }}/openstack-cli"
#todo: extract this as a variable
controller_host: "{{ groups['controllers'][0] }}"
tasks:
- name: Check Ironic variables are defined
ansible.builtin.assert:
that:
- ironic_driver is defined
- ironic_driver_info is defined
- ironic_properties is defined
- ironic_resource_class is defined
fail_msg: One or more Ironic variables are undefined.

- block:
- name: Show baremetal node
ansible.builtin.command:
cmd: "{{ venv }}/bin/openstack baremetal node show {{ inventory_hostname }}"
register: node_show
failed_when:
- '"HTTP 404" not in node_show.stderr'
- node_show.rc != 0
changed_when: false

# NOTE: The openstack.cloud.baremetal_node module cannot be used in this
# script due to requiring a MAC address pre-defined, instead, this should
# be discovered by inpsection following this script.
#
# NOTE: IPMI address must be passed with Redfish address to ensure existing
# Ironic nodes match with new nodes during inspection.
- name: Create baremetal nodes
ansible.builtin.shell:
cmd: |
{{ venv }}/bin/openstack baremetal node create \
--name {{ inventory_hostname }} \
--driver {{ ironic_driver }} \
--driver-info redfish_system_id={{ ironic_redfish_system_id }} \
--driver-info redfish_address={{ ironic_redfish_address }} \
--driver-info redfish_username={{ ironic_redfish_username }} \
--driver-info redfish_password={{ ironic_redfish_password }} \
--driver-info redfish_verify_ca={{ ironic_redfish_verify_ca }} \
{% for key, value in ironic_properties.items() %}
--property {{ key }}={{ value }} \
{% endfor %}
--resource-class {{ ironic_resource_class }}
{% if ironic_boot_interface %}
--boot-interface {{ ironic_boot_interface }}
{% endif %}
{% if ironic_inspect_interface %}
--inspect-interface {{ ironic_inspect_interface }}
{% endif %}
{% if ironic_management_interface %}
--management-interface {{ ironic_management_interface }}
{% endif %}
{% if ironic_network_interface %}
--network-interface {{ ironic_network_interface }}
{% endif %}
{% if ironic_raid_interface %}
--raid-interface {{ ironic_raid_interface }}
{% endif %}
when:
- node_show.rc != 0

- name: Manage baremetal nodes
ansible.builtin.command:
cmd: "{{ venv }}/bin/openstack baremetal node manage {{ inventory_hostname }} --wait"
when:
- node_show.rc != 0
delegate_to: "{{ controller_host }}"
vars:
# NOTE: Without this, the controller's ansible_host variable will not
# be respected when using delegate_to.
ansible_host: "{{ hostvars[controller_host].ansible_host | default(controller_host) }}"
environment: "{{ openstack_auth_env }}"
Loading
Loading