You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development/dev_setup.md
+165-1Lines changed: 165 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ graph TD
21
21
22
22
### Run the local test suite
23
23
24
-
The local test suite can be run via
24
+
The local test suite can be run via
25
25
26
26
```shell
27
27
make test
@@ -53,6 +53,7 @@ make tilt-up
53
53
```
54
54
55
55
This `Makefile` directive will:
56
+
56
57
- create a local Kind cluster with local registry
57
58
- install cert-manager
58
59
- install [boot-operator](https://github.com/ironcore-dev/boot-operator) to reconcile the `ServerBootConfiguration` CRD
@@ -71,3 +72,166 @@ The local development environment can be deleted via
71
72
```shell
72
73
make kind-delete
73
74
```
75
+
76
+
### Connecting a Remote BMC in the Tilt Environment
77
+
78
+
By default, Tilt runs against a local Redfish mock server. To point the environment at real hardware instead, apply the following changes.
79
+
80
+
#### Prerequisites: Ensure the BMC is not actively managed
81
+
82
+
Before connecting a real BMC to your local Tilt environment, make sure it is not actively reconciled by another `metal-operator` instance to avoid conflicts. Some common ways to achieve this:
83
+
84
+
-**ServerMaintenance**: Create a `ServerMaintenance` resource on the production cluster to claim the server and optionally power it off.
85
+
-**Exclude from automation**: Remove the server from the production `metal-operator`'s scope, for example via label selectors or namespace isolation, so it is no longer reconciled.
86
+
-**Decommission temporarily**: If the server is not in active use, you can power it off or disconnect it from the production cluster before testing.
87
+
88
+
> **Note:** Refer to your production cluster's runbooks for the appropriate procedure.
89
+
90
+
If you use the `ServerMaintenance` approach, apply a manifest like this on the cluster that currently owns the server:
> **Note:** All `kubectl` commands from this point on target the **local** Kind cluster.
120
+
121
+
#### 1. Replace the mockup endpoint with a real BMC resource
122
+
123
+
Edit `config/redfish-mockup/redfish_mockup_endpoint.yaml` to define a `BMC` resource targeting the real hardware:
124
+
125
+
```yaml
126
+
apiVersion: metal.ironcore.dev/v1alpha1
127
+
kind: BMC
128
+
metadata:
129
+
name: <node-name>
130
+
spec:
131
+
bmcSecretRef:
132
+
name: <node-name>
133
+
hostname: <bmc-hostname>
134
+
consoleProtocol:
135
+
name: SSH
136
+
port: 22
137
+
access:
138
+
ip: <bmc-ip>
139
+
protocol:
140
+
name: Redfish
141
+
port: 443
142
+
scheme: https
143
+
```
144
+
145
+
#### 2. Create a BMCSecret with credentials
146
+
147
+
Create a `BMCSecret` file with credentials for the BMC:
148
+
149
+
```yaml
150
+
apiVersion: metal.ironcore.dev/v1alpha1
151
+
kind: BMCSecret
152
+
metadata:
153
+
name: <node-name>
154
+
data:
155
+
username: <base64-encoded-username>
156
+
password: <base64-encoded-password>
157
+
```
158
+
159
+
> **Note:** The `username` and `password` values must be base64-encoded. You can encode them with `echo -n '<value>' | base64`.
160
+
161
+
Save this as `bmcsecret-<node-name>.yaml`, but do not apply it yet.
162
+
163
+
#### 3. Enable HTTPS for the BMC connection
164
+
165
+
The `--insecure` flag is deprecated. Use `--protocol` and `--skip-cert-validation` instead.
166
+
167
+
For a real BMC that uses HTTPS on port 443, configure the manager to use secure HTTPS with certificate validation enabled in the `Tiltfile`:
168
+
169
+
```python
170
+
settings = {
171
+
"new_args": {
172
+
"metal": [
173
+
# ...
174
+
"--protocol=https",
175
+
"--skip-cert-validation=false",
176
+
],
177
+
}
178
+
}
179
+
```
180
+
181
+
#### 4. Start Tilt and verify
182
+
183
+
Start the environment:
184
+
185
+
```shell
186
+
make tilt-up
187
+
```
188
+
189
+
Once the manager is running, apply the `BMCSecret` to the local Kind cluster (it is not part of the kustomize config and must be applied manually):
190
+
191
+
```shell
192
+
# Run against the local Kind cluster
193
+
kubectl apply -f bmcsecret-<node-name>.yaml
194
+
```
195
+
196
+
The metal-operator will pick up the `BMC` resource, connect to the remote hardware, and create a matching `Server` resource. Watch the resources come up:
197
+
198
+
```shell
199
+
kubectl get bmc -w
200
+
kubectl get server -w
201
+
```
202
+
203
+
You can monitor the manager logs to verify the connection succeeds:
To get a shell-accessible manager image with `curl` and `ca-certificates` (useful for diagnosing BMC connectivity), switch the Tilt build target to `manager-debug`:
0 commit comments