Skip to content

Commit

Permalink
Merge branch 'devel' into bf2
Browse files Browse the repository at this point in the history
  • Loading branch information
sujit-jadhav committed Jan 12, 2024
2 parents d99ed77 + 15c3ffd commit 42cc7b2
Show file tree
Hide file tree
Showing 12 changed files with 137 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- devel
- release-1.4
- release-1.4.0.1
- release-1.4.1
Expand All @@ -12,6 +13,7 @@ on:
- devel-1.4.2.1
- devel-1.4.2.2
- devel-1.5
- devel-1.6

jobs:
ansible-lint:
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ Current Status: ![GitHub](https://readthedocs.org/projects/omnia-doc/badge/?vers

Omnia is made available under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0)

## Contributing To Omnia

We encourage everyone to help us improve Omnia by contributing to the project. Contributions can be as small as documentation updates or adding example use cases, to adding commenting and properly styling code segments all the way up to full feature contributions. We ask that contributors follow our established [guidelines](https://omnia-doc.readthedocs.io/en/latest/Contributing/index.html) for contributing to the project.

Contributions to Omnia are made through Pull Requests (PRs) to "[devel](https://github.com/dell/omnia/tree/devel)" branch. "[devel](https://github.com/dell/omnia/tree/devel)" is the bleeding edge branch of Omnia packed with experimental and untested features".

## Omnia Community Members:
<img src="docs/source/images/logos/delltech.jpg" height="50px" alt="Dell Technologies">
<img src="https://upload.wikimedia.org/wikipedia/commons/0/0e/Intel_logo_%282020%2C_light_blue%29.svg" height="50px" alt="Intel Corporation">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ This playbook achieves the following tasks:
installprovisiontool
ViewingDB
provisionservers
provisiondpus

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Configuring DPUs with out-of-band management
+++++++++++++++++++++++++++++++++++++++++++++++

For pre-configured DPU BMCs, ``provision/bluefield.yml`` can be used to provision the DPUs.

**Before running bluefield.yml**

* The dpu_bmc_inventory file is updated with the DPU BMC IP addresses.

* The Redfish services are enabled in the DPU BMC settings under Services.

* The provision tool has discovered the DPUs using SNMP/mapping.


**Configurations performed by bluefield.yml**

* Omnia validates and configures the active DPU NICs in PXE device settings when provision_method is set to PXE. (If no active NIC is found, bluefield.yml will fail on the target node.)

* Once all configurations are in place, the ``bluefield.yml`` initiates a PXE boot for configuration to take effect.

.. note::
* DPUs that have not been discovered by the Provision tool will not be provisioned with the OS image.
* Since the BMC discovery method PXE boots target DPU BMCs while running the provision tool, this script is not recommended for such DPUs.


**Running bluefield.yml**

::

ansible-playbook bluefield.yml -i dpu_bmc_inventory -e dpu_bmc_username='' -e dpu_bmc_password=''

Where the ``dpu_bmc_inventory`` points to the file mentioned above and the ``dpu_bmc_username`` and ``dpu_bmc_password`` are the credentials used to authenticate into DPU BMC.



35 changes: 35 additions & 0 deletions docs/source/Roles/Provision/provisiondpus.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Configuring DPUs with out-of-band management
+++++++++++++++++++++++++++++++++++++++++++++++

For pre-configured DPU BMCs, ``provision/bluefield.yml`` can be used to provision the DPUs.

**Before running bluefield.yml**

* The dpu_bmc_inventory file is updated with the DPU BMC IP addresses.

* The Redfish services are enabled in the DPU BMC settings under Services.

* The provision tool has discovered the DPUs using SNMP/mapping.


**Configurations performed by bluefield.yml**

* Omnia validates and configures the active DPU NICs in PXE device settings when provision_method is set to PXE. (If no active NIC is found, bluefield.yml will fail on the target node.)

* Once all configurations are in place, the ``bluefield.yml`` initiates a PXE boot for configuration to take effect.

.. note::
* DPUs that have not been discovered by the Provision tool will not be provisioned with the OS image.
* Since the BMC discovery method PXE boots target DPU BMCs while running the provision tool, this script is not recommended for such DPUs.


**Running bluefield.yml**

::

ansible-playbook bluefield.yml -i dpu_bmc_inventory -e dpu_bmc_username='' -e dpu_bmc_password=''

Where the ``dpu_bmc_inventory`` points to the file mentioned above and the ``dpu_bmc_username`` and ``dpu_bmc_password`` are the credentials used to authenticate into DPU BMC.



28 changes: 28 additions & 0 deletions provision/roles/bluefield/tasks/check_prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,31 @@
with_items: "{{ bluefield_collections }}"
run_once: true

- name: Initialize variables
ansible.builtin.set_fact:
provision_status: false

- name: Check if provisioned_dpu_bmc_inventory file exists
ansible.builtin.stat:
path: "{{ provisioned_dpu_bmc_inventory_path }}"
register: provisioned_dpu_bmc_check
run_once: true

- name: Check the provisioned_dpu_bmc_inventory output
ansible.builtin.command: cat {{ provisioned_dpu_bmc_inventory_path }}
changed_when: false
register: provisioned_dpu_bmc_list
run_once: true
when: provisioned_dpu_bmc_check.stat.exists

- name: Set provision status - CLI
ansible.builtin.set_fact:
provision_status: true
when:
- provisioned_dpu_bmc_check.stat.exists
- inventory_hostname in provisioned_dpu_bmc_list.stdout

- name: Removing hosts already provisioned - CLI
ansible.builtin.debug:
msg: "{{ provision_skip_msg_cli }}"
when: provision_status
12 changes: 6 additions & 6 deletions provision/roles/bluefield/tasks/configure_pxe_boot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
name: nvidia.dpu_ops.bf_bmc
vars:
- bmc_action: "-C 17 chassis power status"
bmc_host: "tbd"
bmc_user: "root"
bmc_password: "tbd"
bmc_host: "{{ inventory_hostname }}"
bmc_user: "{{ dpu_bmc_username }}"
bmc_password: "{{ dpu_bmc_password }}"

- name: Force PXE boot
ansible.builtin.include_role:
name: nvidia.dpu_ops.bf_bmc
vars:
- bmc_action: "-C 17 chassis bootdev pxe options=efiboot"
bmc_host: "tbd"
bmc_user: "root"
bmc_password: "tbd"
bmc_host: "{{ inventory_hostname }}"
bmc_user: "{{ dpu_bmc_username }}"
bmc_password: "{{ dpu_bmc_password }}"

- name: Configure boot order for PXE booting
ansible.builtin.include_role:
Expand Down
4 changes: 4 additions & 0 deletions provision/roles/bluefield/tasks/deploy_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
- name: Configure PXE booting
ansible.builtin.include_tasks: configure_pxe_boot.yml

- name: Add the host to provisioned_dpu_bmc_inventory
ansible.builtin.debug:
msg: "tbd"

- name: Provision OS
ansible.builtin.debug:
msg: "tbd"
3 changes: 3 additions & 0 deletions provision/roles/bluefield/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
- name: Check prerequisites
ansible.builtin.include_tasks: check_prerequisites.yml

# - name: Update firmware
# ansible.builtin.include_tasks: update_firmware.yml

- name: Deploy OS
ansible.builtin.include_tasks: deploy_os.yml
21 changes: 15 additions & 6 deletions provision/roles/bluefield/tasks/update_firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
# limitations under the License.
---

- name: Get Firmware Inventory
community.general.redfish_info:
category: Update
command: GetFirmwareInventory
baseuri: "{{ inventory_hostname }}"
username: "{{ dpu_bmc_username }}"
password: "{{ dpu_bmc_password }}"
register: result

- name: Update BMC firmware of DPU
ansible.builtin.include_role:
name: nvidia.dpu_ops.manage_bf_bmc_fw
Expand All @@ -23,16 +32,16 @@
community.general.redfish_command:
category: Update
command: SimpleUpdate
baseuri: "tbd"
username: "root"
password: "tbd"
baseuri: "{{ inventory_hostname }}"
username: "{{ dpu_bmc_username }}"
password: "{{ dpu_bmc_password }}"
update_image_uri: "{{ bmc.url }}/{{ bmc.cec }}"

- name: Update DPU NIC firmware
ansible.builtin.include_role:
name: nvidia.dpu_ops.manage_bf2_fw
vars:
- bmc_host: "tbd"
bmc_user: "root"
bmc_password: "tbd"
- bmc_host: "{{ inventory_hostname }}"
bmc_user: "{{ dpu_bmc_username }}"
bmc_password: "{{ dpu_bmc_password }}"

1 change: 1 addition & 0 deletions provision/roles/bluefield/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

# Usage: check_prerequisites.yml
bluefield_collections: nvidia.dpu_ops:1.0.1
provisioned_dpu_bmc_inventory_path: /opt/omnia/provisioned_dpu_bmc_inventory

# Usage: configure_pxe_boot.yml
bluefield_pxe_boot_dev: NET-OOB-IPV4
Expand Down
2 changes: 1 addition & 1 deletion provision/roles/xcat_repo_manipulate/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ xcat_rhel8_pre_script: "/opt/xcat/share/xcat/install/scripts/pre.rhels8"
public_nic_zone: public

# Usage: common_repo_config.yml
racadm_url: "https://dl.dell.com/FOLDER05920767M/1/DellEMC-iDRACTools-Web-LX-9.4.0-3732_A00.tar.gz"
racadm_url: "https://dl.dell.com/FOLDER08952875M/1/Dell-iDRACTools-Web-LX-11.0.0.0-5139_A00.tar.gz"
racadm_file: "{{ xcat_directory }}/racadm.tar.gz"
racadm_path: /opt/racadm
omnia_common_xcat_repo: "{{ other_pkg_dir }}/omnia/Packages"
Expand Down

0 comments on commit 42cc7b2

Please sign in to comment.