diff --git a/playbooks/kayobe-overcloud-base/baremetal-compute.j2 b/playbooks/kayobe-overcloud-base/baremetal-compute.j2 new file mode 100644 index 000000000..b0ba3f325 --- /dev/null +++ b/playbooks/kayobe-overcloud-base/baremetal-compute.j2 @@ -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 %} diff --git a/playbooks/kayobe-overcloud-base/baremetal.j2 b/playbooks/kayobe-overcloud-base/baremetal.j2 new file mode 100644 index 000000000..013468258 --- /dev/null +++ b/playbooks/kayobe-overcloud-base/baremetal.j2 @@ -0,0 +1,2 @@ +[baremetal-compute] +hv100 diff --git a/playbooks/kayobe-overcloud-base/pre.yml b/playbooks/kayobe-overcloud-base/pre.yml index f696974ba..b80e67ada 100644 --- a/playbooks/kayobe-overcloud-base/pre.yml +++ b/playbooks/kayobe-overcloud-base/pre.yml @@ -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 diff --git a/playbooks/kayobe-overcloud-base/run.yml b/playbooks/kayobe-overcloud-base/run.yml index ddcae18e5..d296d6844 100644 --- a/playbooks/kayobe-overcloud-base/run.yml +++ b/playbooks/kayobe-overcloud-base/run.yml @@ -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