-
Notifications
You must be signed in to change notification settings - Fork 23
Skc baremetal environment #2023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stackhpc/2025.1
Are you sure you want to change the base?
Conversation
skc-baremetal-environment
…hpc-kayobe-config into skc-baremetal-environment
…pc/stackhpc-kayobe-config into skc-baremetal-environment
| - stackhpc_radosgw_usage_exporter_frontend_port | ||
| - stackhpc_radosgw_usage_exporter_backend_port | ||
| - internal_net_name | ||
| - "{{ internal_net_name }}_ips" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably be moved
etc/kayobe/environments/stackhpc-baremetal/ansible/baremetal-1-check-bmc-up.yml
Outdated
Show resolved
Hide resolved
|
|
||
| - name: Check BMC back up again | ||
| ansible.builtin.uri: | ||
| url: "{{ ironic_driver_info['redfish_address'] }}/redfish/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be url: "{{ ironic_redfish_address + '/redfish/v1' }}"
|
|
||
| - name: Check BMC is up | ||
| ansible.builtin.uri: | ||
| url: "{{ ironic_driver_info['redfish_address'] }}/redfish/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be url: "{{ ironic_redfish_address + '/redfish/v1' }}"
|
|
||
| - name: Check BMC is up | ||
| ansible.builtin.uri: | ||
| url: "{{ ironic_driver_info['redfish_address'] + '/redfish/v1' }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be url: "{{ ironic_redfish_address + '/redfish/v1' }}"
|
|
||
| #these vars used to be within ironic_driver_info | ||
| ironic_redfish_system_id: "/redfish/v1/Systems/1" | ||
| ironic_redfish_address: "192.168.33.3:34343" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to http://192.168.33.3:34343
| ironic_redfish_system_id: "/redfish/v1/Systems/1" | ||
| ironic_redfish_address: "192.168.33.3:34343" | ||
| ironic_redfish_username: | ||
| ironic_redfish_password: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be defined
etc/kayobe/environments/stackhpc-baremetal/ansible/baremetal-0-enroll-baremetal.yml
Show resolved
Hide resolved
|
|
||
| # Default boot interface to be used for nodes that do not have boot_interface | ||
| # field set. | ||
| kolla_ironic_default_boot_interface: redfish-virtual-media |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to remove the defaults here.
| # Ironic configuration. | ||
|
|
||
| # Specify the list of hardware types to load during service initialization. | ||
| kolla_ironic_enabled_hardware_types: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets remove this.
| #kolla_ironic_default_bios_interface: | ||
|
|
||
| # Specify the list of boot interfaces to load during service initialization. | ||
| kolla_ironic_enabled_boot_interfaces: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets remove this
| content: '{{ {"bikolla_mac_addresses": bikolla_mac_addresses} | to_nice_yaml }}' | ||
| dest: "{{ kayobe_env_config_path }}/bikolla-mac-addresses.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename ?
| start: false | ||
| autostart: false | ||
| boot_firmware: uefi | ||
| delegate_to: localhost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are missing a task here, to find the uuid from virsh list or similar, after the above task creates / updates the VM with the name called "{{ inventory_hostname }}"
| - name: Create Sushy configuration directory | ||
| ansible.builtin.file: | ||
| path: /etc/sushy | ||
| state: directory | ||
|
|
||
| - name: Template Sushy configuration | ||
| ansible.builtin.template: | ||
| src: "{{ sushy_directory }}/sushy.conf.j2" | ||
| dest: "/etc/sushy/sushy.conf" | ||
|
|
||
| - name: Enable Rocky devel repository | ||
| community.general.dnf_config_manager: | ||
| name: devel | ||
| state: enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines must move to a new script that is run after we find the uuid of the VM, and the uuid of the VM is needed for the sushy.conf template
| ansible.builtin.dnf: | ||
| name: | ||
| - qemu-kvm | ||
| - libvirt | ||
| - libvirt-devel | ||
| - python3-devel | ||
| state: present | ||
|
|
||
| - name: Start and enable the QEMU service | ||
| ansible.builtin.systemd_service: | ||
| name: virtqemud | ||
| state: started | ||
| enabled: true | ||
|
|
||
| - name: Start and enable the virtual stroage service | ||
| ansible.builtin.systemd_service: | ||
| name: virtstoraged | ||
| state: started | ||
| enabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines here should always be run before we create-virtual-baremetal-vm, as it will setup libvirt for us.
| - name: Start and enable the virtual network service | ||
| ansible.builtin.systemd_service: | ||
| name: virtnetworkd | ||
| state: started | ||
| enabled: true | ||
|
|
||
| - name: Create Sushy virtualenv | ||
| ansible.builtin.pip: | ||
| name: | ||
| - libvirt-python | ||
| - sushy-tools | ||
| virtualenv: /opt/kayobe/venvs/sushy | ||
| virtualenv_command: python3 -m venv | ||
|
|
||
| - name: Template Sushy service unit file | ||
| ansible.builtin.template: | ||
| src: "{{ sushy_directory }}/sushyemud.service.j2" | ||
| dest: "/etc/systemd/system/sushyemud.service" | ||
|
|
||
| - name: Start and enable the Sushy Emulator service | ||
| ansible.builtin.systemd_service: | ||
| name: sushyemud | ||
| state: started | ||
| enabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These have to run after we discover the VM uuid.
| @@ -0,0 +1,7 @@ | |||
| --- | |||
|
|
|||
| ironic_redfish_system_id: "{{ '/redfish/v1/Systems/' + inventory_hostname | to_uuid }}" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs to use the detected VM uuid instead of doing this.
No description provided.