Skip to content

Commit 9dc97d5

Browse files
document how to get the BMC password for a server
1 parent 05b7fb1 commit 9dc97d5

File tree

3 files changed

+208
-0
lines changed

3 files changed

+208
-0
lines changed
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# How to get the BMC password for a server
2+
3+
## TL;DR - Quick Commands
4+
5+
### Web UI
6+
7+
1. Go to: **argo-workflows-ui** -> **Workflow Templates** -> find and select **bmc-password** template
8+
2. Click **Submit** → Enter BMC IP address → Click **Submit**
9+
3. Check logs for the generated password
10+
11+
### CLI
12+
13+
```bash
14+
# Submit workflow
15+
argo -n argo-events submit --from workflowtemplate/bmc-password -p ip_address=192.168.1.100
16+
17+
# Check status
18+
argo -n argo-events list
19+
20+
# Get password from logs (replace with actual workflow name)
21+
argo -n argo-events logs <workflow-name>
22+
```
23+
24+
### first line in log is password
25+
26+
```bash
27+
# Submit and immediately follow logs
28+
WORKFLOW=$(argo -n argo-events submit --from workflowtemplate/bmc-password -p ip_address=192.168.1.100 -o name) && argo -n argo-events logs $WORKFLOW -f
29+
```
30+
31+
---
32+
33+
## Overview
34+
35+
The BMC Password workflow generates standard BMC passwords for given IP addresses using the Understack workflow system. This workflow retrieves the master secret from a Kubernetes secret and generates a deterministic password based on the BMC IP address.
36+
37+
## Prerequisites
38+
39+
- Access to the Argo Workflows cluster
40+
- Valid BMC IP address
41+
- Required secrets (`bmc-master`) must be available in the cluster
42+
43+
## Usage
44+
45+
### Web UI Usage
46+
47+
1. **Run Argo Workflow Template bmc-password**
48+
- find and select `bmc-password` workflow template
49+
- Click the **"Submit"** button on the workflow template page
50+
- Fill in the required parameters:
51+
- **ip_address**: Enter the BMC IP address (e.g., `192.168.1.100`)
52+
53+
2. **Monitor Execution**
54+
- After submission, you'll be redirected to the workflow execution page
55+
- Monitor the progress of your workflow in real-time
56+
- View logs by clicking on the workflow step
57+
58+
3. **View Results**
59+
- Once the workflow completes successfully, the generated password will be available in the logs
60+
- Navigate to the workflow step and check the container logs for the password output
61+
62+
### CLI Usage
63+
64+
#### Prerequisites for CLI
65+
66+
- Install Argo CLI: Follow the [official installation guide][argo-cli-install]
67+
- Configure kubectl access to the cluster
68+
- Ensure you have access to the `argo-events` namespace
69+
70+
#### Submit Workflow
71+
72+
```bash
73+
# Basic usage
74+
argo -n argo-events submit --from workflowtemplate/bmc-password \
75+
-p ip_address=<BMC_IP_ADDRESS>
76+
77+
# Example with specific IP
78+
argo -n argo-events submit --from workflowtemplate/bmc-password \
79+
-p ip_address=192.168.1.100
80+
81+
# Submit with a custom workflow name
82+
argo -n argo-events submit --from workflowtemplate/bmc-password \
83+
-p ip_address=10.0.1.50 \
84+
--name bmc-password-server-01
85+
```
86+
87+
#### Monitor Workflow
88+
89+
```bash
90+
# List all workflows
91+
argo -n argo-events list
92+
93+
# Get specific workflow status
94+
argo -n argo-events get <workflow-name>
95+
96+
# Follow workflow logs in real-time
97+
argo -n argo-events logs <workflow-name> -f
98+
99+
# Get logs for completed workflow
100+
argo -n argo-events logs <workflow-name>
101+
```
102+
103+
#### Example Complete Session
104+
105+
```bash
106+
# Submit the workflow
107+
$ argo -n argo-events submit --from workflowtemplate/bmc-password -p ip_address=192.168.1.100
108+
Name: bmc-password-abc123
109+
Namespace: argo-events
110+
ServiceAccount: argo-workflow-sa
111+
Status: Pending
112+
Created: Mon Sep 24 07:30:00 UTC 2025
113+
114+
# Check status
115+
$ argo -n argo-events get bmc-password-abc123
116+
Name: bmc-password-abc123
117+
Namespace: argo-events
118+
ServiceAccount: argo-workflow-sa
119+
Status: Succeeded
120+
Created: Mon Sep 24 07:30:00 UTC 2025
121+
Started: Mon Sep 24 07:30:05 UTC 2025
122+
Finished: Mon Sep 24 07:30:25 UTC 2025
123+
Duration: 20 seconds
124+
125+
# Get the generated password from logs
126+
$ argo -n argo-events logs bmc-password-abc123
127+
bmc-password-abc123-bmc-password-1234567890: s8eso3LbI/bqZ4APxz1n
128+
```
129+
130+
## Parameters
131+
132+
| Parameter | Type | Required | Description | Example |
133+
|-----------|------|----------|-------------|---------|
134+
| `ip_address` | string | Yes | BMC IP address for password generation | `192.168.1.100` |
135+
136+
## Output
137+
138+
The workflow outputs the generated BMC password to the container logs. The password is printed as a single line and can be retrieved from the workflow logs.
139+
140+
**Example Output:**
141+
142+
```text
143+
xyzso3LbI/bqZ4APx123
144+
```
145+
146+
[argo-cli-install]: https://argoproj.github.io/argo-workflows/cli/

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ nav:
157157
- 'Infrastructure':
158158
- operator-guide/workflows.md
159159
- operator-guide/monitoring.md
160+
- operator-guide/bmc-password.md
160161
- operator-guide/mariadb-operator.md
161162
- operator-guide/mariadb-upgrade-runbook.md
162163
- operator-guide/postgres-operator.md
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
apiVersion: argoproj.io/v1alpha1
3+
kind: WorkflowTemplate
4+
metadata:
5+
name: bmc-password
6+
annotations:
7+
workflows.argoproj.io/title: Workflow to obtain standard BMC Password
8+
workflows.argoproj.io/description: |
9+
Defined in `workflows/argo-events/workflowtemplates/bmc-password.yaml`
10+
11+
```
12+
argo -n argo-events submit --from workflowtemplate/bmc-password -p ip_address=10.46.96.163
13+
```
14+
spec:
15+
serviceAccountName: workflow
16+
entrypoint: main
17+
arguments:
18+
parameters:
19+
- name: ip_address
20+
templates:
21+
- name: main
22+
steps:
23+
- - name: bmc-password
24+
template: bmc-password
25+
arguments:
26+
parameters:
27+
- name: ip_address
28+
value: "{{workflow.parameters.ip_address}}"
29+
30+
- name: bmc-password
31+
inputs:
32+
parameters:
33+
- name: ip_address
34+
container:
35+
image: ghcr.io/rackerlabs/understack/ironic-nautobot-client:latest
36+
command:
37+
- /bin/sh
38+
- -c
39+
args:
40+
- |
41+
python3 -c "
42+
import sys
43+
import os
44+
45+
from understack_workflows.bmc_password_standard import standard_password
46+
47+
bmc_ip = '{{inputs.parameters.ip_address}}'
48+
49+
if os.getenv('BMC_MASTER') is None:
50+
print('Please set the BMC_MASTER environment variable', file=sys.stderr)
51+
exit(1)
52+
53+
password = standard_password(str(bmc_ip), str(os.getenv('BMC_MASTER')))
54+
print(password)
55+
"
56+
env:
57+
- name: BMC_MASTER
58+
valueFrom:
59+
secretKeyRef:
60+
name: bmc-master
61+
key: key

0 commit comments

Comments
 (0)