Skip to content
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

feat: Adds workflow to set iDrac network boot BIOS settings #189

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading