inventory : Create an Ansible inventory file that lists the target systems you want to update. This file should contain the necessary details to connect to the systems, such as IP addresses.
system_credentials.yml : This file contains the credentials of the target systems.
Playbooks : Ansible playbooks are defined with the tasks required to update the different components of system firmware, fetch system firmware inventory for the supported Cray XD servers and a playbook to view power states or to power on or to power off Cray XD670 nodes.
Run the Playbooks : Execute the playbook using the ansible-playbook command, providing the inventory file and the playbook file as arguments. Ansible will connect to the target systems specified in the inventory and execute the tasks defined in the playbook.
This repository contains ansible modules, playbooks to perform firmware upgrade HPE Cray XD670
-
Ansible should be installed
-
Ansible collection module community.general >= 6.4.0
To install Community general package use:
ansible-galaxy collection install community.general
- Run setup.yml to install ipmitool required for Power cycle
ansible-playbook -i inventory setup.yml
Update the IP address under [xds] variable like the below:
[xds]
ip1
ip2
Update the IP address its corresponding username and password in system_credentials.yml as follows:
---
inputs:
ip1:
user: "<ip1 user name>"
password: "<ip1 password"
ip2:
user: "<ip2 user name>"
password: "<ip2 password>"
-
system_firmware_update.yml : Playbook to perform firmware upgrade which requires target and the respective firmware files(hpm file) to be mentioned in the configuration file config.ini
-
get_system_firmware_inventory.yml : Playbook to fetch the system firmware inventory information
-
power_state_XD670.yml: Playbook to fetch the power state information, to power on, to power off the Cray XD670 nodes.
-
get_gpu_inventory.yml : Playbook to fetch the gpu inventory information
For HPE Cray XD670 supported targets are:
-
BMC
-
BMC_Image2
-
BIOS
-
BIOS2
-
SCM_CPLD1_MB_CPLD1
-
BPB_CPLD
-
GPU_ALL
The playbook system_firmware_update.yml
is used to perform the firmware upgrade and the detailed procedure is listed below:
-
Update system_credentials.yml and cray servers details in the inventory file under [xds] Specifically the remotely accessible cray ip addresses
-
Update the config.ini
-
update_target = Name of the target component to be upgraded, these are case sensitive refer to
Targets supported for Updates
[Required] -
update_image_path_xd670 : Path to local hpm file for HPE Cray XD670
-
-
Run the ansible playbook:
ansible-playbook -i inventory system_firmware_update.yml -e @system_credentials.yml -e @cray-vault --ask-vault-pass
After the firmware target is upgraded, the server reboots for all required components.
The playbook get_system_firmware_inventory.yml
is used to fetch the firmware inventory information of the cray servers
-
Update the following details in inputs.yml and inventory file accordingly
-
Run the ansible playbook:
ansible-playbook -i inventory get_system_firmware_inventory.yml -e @system_credentials..yml
The playbook get_system_firmware_inventory.yml
is used to fetch the firmware inventory information of the cray servers
-
Update the following details in inputs.yml and inventory file accordingly
-
Run the ansible playbook:
`ansible-playbook -i inventory get_gpu_inventory.yml -e @system_credentials..yml
The playbook power_state_XD670.yml
is used to fetch the power state, power on, power off the Cray XD670 nodes.
-
Update the following details in inputs.yml and inventory file, config file for required power_state accordingly
-
Run the ansible playbook:
ansible-playbook -i inventory power_state_XD670.yml -e @system_credentials..yml
This ansible-vault encrypts the file containing sensitive data. And can be used during execution by providing the key.
To encrypt the file
ansible-vault encrypt file_name
To decypt the file
ansible-vault decrypt file_name
To edit the file
ansible-vault edit file_name