Skip to content

Commit

Permalink
Merge pull request #189 from rackerlabs/idrac-bios-set-20240801
Browse files Browse the repository at this point in the history
feat: Adds workflow to set iDrac network boot BIOS settings
  • Loading branch information
cardoe authored Aug 5, 2024
2 parents 32909e2 + 1fbb788 commit bdfd359
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions argo-workflows/obm-utils/containers/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
requests==2.31.0
pynautobot==2.1.1
sushy==5.0.0
IdracRedfishSupport==0.0.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: idrac-enable-network-boot
namespace: argo-events
annotations:
workflows.argoproj.io/description: Enable network boot in Dell iDrac BIOS
spec:
arguments:
parameters:
- name: hostname
serviceAccountName: workflow
entrypoint: main
templates:
- name: main
dag:
tasks:
- name: get-obm-ip
templateRef:
name: get-obm-ip
template: main
arguments:
parameters:
- name: hostname
value: "{{workflow.parameters.hostname}}"
- name: get-obm-creds
templateRef:
name: get-obm-creds
template: main
arguments:
parameters:
- name: hostname
value: "{{workflow.parameters.hostname}}"
- name: idrac-enable-network-boot
dependencies: [get-obm-ip, get-obm-creds]
template: idrac-enable-network-boot
arguments:
parameters:
- name: host
value: "{{tasks.get-obm-ip.outputs.parameters.ip}}"
- name: target_creds_secret_name
value: "{{tasks.get-obm-creds.outputs.parameters.secret}}"

- name: idrac-enable-network-boot
inputs:
parameters:
- name: host
- name: target_creds_secret_name
container:
image: ghcr.io/rackerlabs/understack/argo-obm-utils-python3.11.8:latest
command: [GetSetBiosAttributesREDFISH.py]
args: ["-ip", "{{ inputs.parameters.host }}", "-u", "$OBM_USERNAME", "-p", "$OBM_PASSWORD", "--attribute-names", "PxeDev1EnDis,PxeDev1Interface,HttpDev1Interface", "--attribute-values", "Enabled,NIC.Slot.1-1,NIC.Slot.1-1", "--reboot"]
env:
- name: OBM_USERNAME
valueFrom:
secretKeyRef:
name: "{{inputs.parameters.target_creds_secret_name}}"
key: username
- name: OBM_PASSWORD
valueFrom:
secretKeyRef:
name: "{{inputs.parameters.target_creds_secret_name}}"
key: password

0 comments on commit bdfd359

Please sign in to comment.