openchami-wiki/Use Cases/Discovering Nodes Dynamically with Redfish.md

43 lines
No EOL
2.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Discovering Nodes Dynamically with Redfish
In the tutorial, we used static discovery to populate our inventory in SMD instead of dynamically discovering nodes on our network. Static discovery is good when we know beforehand the MAC address, IP address, xname, and/or node ID of our nodes and guarantees deterministic behavior. However, sometimes we might not know these properties or we may want to check the current state of our hardware, say for a failure. In these scenario, we can probe our hardware dynamically using the scanning feature from `magellan` and then update the state of our inventory.
For this demonstration, we have two prerequisites:
1. Emulate board management controllers (BMCs) with running Redfish services
2. Have a running instance of SMD or a full deployment of OpenCHAMI
The `magellan` repository has an emulator included in the project that we can used for quick and dirty testing. This is useful if we want to try out the capabilities of the tool without have to put to much time and effort setting up an environment. However, we want to use multiple BMCs to show how `magellan` can distinguish between Redfish and non-Redfish services.
**TODO: Add content setting up multiple emulated BMCs with Redfish services (the quickstart in the deployment-recipes has this already).**
### Performing a Scan
A scan sends out requests to all devices on a network specified with the `--subnet` flag. If the device responds, it is added to a cache database that we'll need for the next section.
Let's do a scan and see what we can find on our network. We should be able to find all of our emulated BMCs without having to worry too much about any other services.
```bash
magellan scan --subnet 172.16.0.100/24
```
This command should not have any output if it runs successfully. By default, the cache will be stored in `/tmp/$USER/magellan/assets.db` in a tiny SQLite 3 database. If we want to store this somewhere else, we can specify a path with the `--cache` flag.
We can see which BMCs were found with the `list` command.
```bash
magellan list
```
You should see the emulated BMCs.
```bash
# TODO: add list of emulated BMCs from `magellan list` output
```
Now that we know the IP addresses of the BMCs, we can use the `collect` command to pull inventory data.
### Collecting Hardware Inventory
When collecting inventory
### Updating the Hardware Inventory