Skip to content

Commit 9ced382

Browse files
author
rocky Cloud User
committed
playbook and xml file edits
1 parent 8071839 commit 9ced382

File tree

13 files changed

+69
-35
lines changed

13 files changed

+69
-35
lines changed

etc/kayobe/environments/stackhpc-baremetal/ansible/baremetal-0-enroll-overcloud.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22

33
- name: Register baremetal compute nodes
4-
hosts: localhost
4+
hosts: "{{ groups['controllers'][0] }}"
55
vars:
66
venv: "{{ virtualenv_path }}/openstack-cli"
77
tasks:
@@ -27,7 +27,8 @@
2727
- baremetal
2828
vars:
2929
venv: "{{ virtualenv_path }}/openstack-cli"
30-
controller_host: localhost
30+
#todo: extract this as a variable
31+
controller_host: "{{ groups['controllers'][0] }}"
3132
tasks:
3233
- name: Check Ironic variables are defined
3334
ansible.builtin.assert:

etc/kayobe/environments/stackhpc-baremetal/ansible/baremetal-1-check-bmc-up.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- baremetal
1212
vars:
1313
venv: "{{ virtualenv_path }}/openstack-cli"
14-
controller_host: localhost
14+
controller_host: "{{ groups['controllers'][0] }}"
1515

1616
tasks:
1717
- name: Check Ironic variables are defined
@@ -65,6 +65,7 @@
6565
baseuri: "{{ ironic_redfish_address }}"
6666
username: "{{ ironic_redfish_username }}"
6767
password: "{{ ironic_redfish_password }}"
68+
when: ironic_redfish_username is defined
6869
register: firmware_inventory
6970
failed_when: not firmware_inventory.redfish_facts.firmware.ret
7071

@@ -80,19 +81,23 @@
8081
baseuri: "{{ ironic_redfish_address }}"
8182
username: "{{ ironic_redfish_username }}"
8283
password: "{{ ironic_redfish_password }}"
83-
when: kayobe_bmc_up == ""
84+
when:
85+
- kayobe_bmc_up == ""
86+
- ironic_redfish_username is defined
8487

85-
- name: Wait 300 seconds for port 443 to become open
86-
ansible.builtin.wait_for:
87-
port: 443
88-
host: "{{ ironic_redfish_address }}"
89-
delay: 20
90-
timeout: 300
91-
when: kayobe_bmc_up == ""
88+
# - name: Wait 300 seconds for port 443 to become open
89+
# ansible.builtin.wait_for:
90+
# port: 443
91+
# host: "{{ ironic_redfish_address }}"
92+
# delay: 20
93+
# timeout: 300
94+
# when:
95+
# - kayobe_bmc_up == ""
96+
# - ironic_redfish_username is defined
9297

9398
- name: Check BMC back up again
9499
ansible.builtin.uri:
95-
url: "https://{{ ironic_driver_info['redfish_address'] }}"
100+
url: "{{ ironic_driver_info['redfish_address'] }}/redfish/v1"
96101
method: GET
97102
status_code: 200
98103
validate_certs: false

etc/kayobe/environments/stackhpc-baremetal/ansible/baremetal-2-ensure-redfish-inspect.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
- name: Check baremetal compute node bmc is up
33
hosts: baremetal
44
gather_facts: false
5-
become: true
65
max_fail_percentage: >-
76
{{ baremetal_compute_register_max_fail_percentage |
87
default(baremetal_compute_max_fail_percentage) |
@@ -12,7 +11,7 @@
1211
- baremetal
1312
vars:
1413
venv: "{{ virtualenv_path }}/openstack-cli"
15-
controller_host: localhost
14+
controller_host: "{{ groups['controllers'][0] }}"
1615

1716
tasks:
1817
- name: Show and check baremetal node
@@ -35,7 +34,7 @@
3534

3635
- name: Check BMC is up
3736
ansible.builtin.uri:
38-
url: "{{ ironic_driver_info['redfish_address'] + '/redfish/v1' }}"
37+
url: "{{ ironic_driver_info['redfish_address'] }}/redfish/v1"
3938
method: GET
4039
status_code: 200
4140
validate_certs: false

etc/kayobe/environments/stackhpc-baremetal/ansible/baremetal-3-ensure-agent-inspect.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
- name: Check baremetal node bmc is up
33
hosts: baremetal
44
gather_facts: false
5-
become: true
65
max_fail_percentage: >-
76
{{ baremetal_compute_register_max_fail_percentage |
87
default(baremetal_compute_max_fail_percentage) |
@@ -12,11 +11,11 @@
1211
- baremetal
1312
vars:
1413
venv: "{{ virtualenv_path }}/openstack-cli"
15-
controller_host: controller0
14+
controller_host: "{{ groups['controllers'][0] }}"
1615

1716
tasks:
1817
- name: Show and check baremetal node
19-
delegate_to: localhost
18+
delegate_to: "{{ controller_host }}"
2019
vars:
2120
# NOTE: Without this, the controller's ansible_host variable will not
2221
# be respected when using delegate_to.

etc/kayobe/environments/stackhpc-baremetal/ansible/baremetal-4-clean.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- baremetal
1212
vars:
1313
venv: "{{ virtualenv_path }}/openstack-cli"
14-
controller_host: localhost
14+
controller_host: "{{ groups['controllers'][0] }}"
1515
cleaning_timeout: "{{ 60 * 20 }}" # 20 minutes
1616

1717
tasks:
@@ -21,7 +21,6 @@
2121
# NOTE: Without this, the controller's ansible_host variable will not
2222
# be respected when using delegate_to.
2323
ansible_host: "{{ hostvars[controller_host].ansible_host | default(controller_host) }}"
24-
agent_inspect_timeout: "{{ 60 * 20 }}" # 20 minutes
2524
environment: "{{ openstack_auth_env }}"
2625
block:
2726

@@ -35,7 +34,7 @@
3534

3635
- name: Check BMC is up
3736
ansible.builtin.uri:
38-
url: "{{ ironic_driver_info['redfish_address'] + '/redfish/v1' }}"
37+
url: "{{ ironic_driver_info['redfish_address'] }}/redfish/v1"
3938
method: GET
4039
status_code: 200
4140
validate_certs: false

etc/kayobe/environments/stackhpc-baremetal/ansible/baremetal-all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
#- name: Ensure overcloud baremetal is enrolled
3-
# ansible.builtin.import_playbook: ./baremetal-0-enroll-overcloud.yml
2+
- name: Ensure overcloud baremetal is enrolled
3+
ansible.builtin.import_playbook: ./baremetal-0-enroll-overcloud.yml
44
- name: Check BMC is up
55
ansible.builtin.import_playbook: ./baremetal-1-check-bmc-up.yml
66
- name: Do redfish inspection

etc/kayobe/environments/stackhpc-baremetal/kolla/config/ironic.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ num_retries = 1
6060
inspection_network = "{{ inspection_net_name | default('inspect-net' )}}"
6161

6262
[redfish]
63-
kernel_append_params = nofb nomodeset vga=normal console=tty0 console=ttyS0,115200n8 ipa-insecure=1 {% if internal_net_ip %}ipa-ntp-server={{ internal_net_ip }}{% endif %}
64-
63+
kernel_append_params = nofb nomodeset vga=normal console=tty0 console=ttyS0,115200n8 ipa-insecure=1 {% if internal_net_ip %}ipa-ntp-server={{ internal_net_ip }}{% endif %} rootpwd="$$1$$Za/e7wKG$$aT8ydkGT514shSjwUZhFC/"
6564
[inspector]
6665
extra_kernel_params = ipa-collect-lldp=1 ipa-inspection-collectors=default,logs,pci-devices ipa-insecure=1
6766
hooks = ramdisk-error,validate-interfaces,ports,local-link-connection,parse-lldp,root-device,cpu-capabilities,architecture

etc/kayobe/environments/stackhpc-sushy-baremetal/ansible/create-virtual-baremetal.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@
3030
delegate_to: localhost
3131
run_once: true
3232

33+
- name: Define vBMC network
34+
community.libvirt.virt_net:
35+
command: define
36+
name: vbmc-net
37+
xml: "{{ lookup('template', sushy_directory + '/vbmc-net.xml.j2') }}"
38+
delegate_to: localhost
39+
run_once: true
40+
41+
- name: Start vBMC network
42+
community.libvirt.virt_net:
43+
state: active
44+
name: vbmc-net
45+
delegate_to: localhost
46+
run_once: true
47+
3348
- import_role:
3449
name: stackhpc.libvirt-vm
3550
vars:
@@ -45,7 +60,9 @@
4560
capacity: '20GB'
4661
pool: 'default'
4762
interfaces:
48-
- network: 'breth1'
63+
- network: 'vbmc-net'
64+
mac: '{{ bikolla_mac_addresses[inventory_hostname] }}'
65+
alias: vnet1
4966
start: false
5067
autostart: false
5168
boot_firmware: uefi

etc/kayobe/environments/stackhpc-sushy-baremetal/ansible/vbmc-node.xml.j2

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<acpi/>
4545
<apic/>
4646
</features>
47-
<cpu mode='host-passthrough' check='none' migratable='on'/>
47+
<cpu mode='host-model' check='none'/>
4848
<clock offset='utc'>
4949
<timer name='rtc' tickpolicy='catchup'/>
5050
<timer name='pit' tickpolicy='delay'/>
@@ -225,10 +225,6 @@
225225
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
226226
</rng>
227227
</devices>
228-
<seclabel type='dynamic' model='selinux' relabel='yes'>
229-
<label>system_u:system_r:svirt_t:s0:c77,c792</label>
230-
<imagelabel>system_u:object_r:svirt_image_t:s0:c77,c792</imagelabel>
231-
</seclabel>
232228
<seclabel type='dynamic' model='dac' relabel='yes'>
233229
<label>+107:+107</label>
234230
<imagelabel>+107:+107</imagelabel>

etc/kayobe/environments/stackhpc-sushy-baremetal/ansible/vbmc-pool.xml.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<mode>0711</mode>
1313
<owner>0</owner>
1414
<group>0</group>
15-
<label>system_u:object_r:virt_image_t:s0</label>
1615
</permissions>
1716
</target>
1817
</pool>

0 commit comments

Comments
 (0)