Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sapcc/baremetal_temper
Automatically inspects nodes via redfish and creates new nodes in ironic based on the redfish data.
https://github.com/sapcc/baremetal_temper
baremetal golang inspection ironic redfish
Last synced: 11 days ago
JSON representation
Automatically inspects nodes via redfish and creates new nodes in ironic based on the redfish data.
- Host: GitHub
- URL: https://github.com/sapcc/baremetal_temper
- Owner: sapcc
- License: apache-2.0
- Created: 2020-11-26T17:28:50.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-30T13:52:54.000Z (10 months ago)
- Last Synced: 2024-06-19T20:51:44.086Z (5 months ago)
- Topics: baremetal, golang, inspection, ironic, redfish
- Language: Go
- Homepage:
- Size: 10.7 MB
- Stars: 7
- Watchers: 37
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# baremetal_temper
This is an ironic out of bound inspection using redfish, netbox and ironic-inspector.
## what it does
It can automatically create ironic nodes based on the redfish data provided by the redfish api of a server.
To accomplish this, all it needs is the ip and name of the server, which should be onboarded in ironic.
This data can be provided via a file or the netbox api.
The data structure looks as follows:```
type NetboxDiscovery struct {
Targets []string `json:"targets"`
Labels map[string]string `json:"labels"`
}
```The following list shows the steps executed for each new node:
- creates a dns record for the new node
- loads server information via the redfish api
- creates new node via the ironic inspector api
- applys rules which are defined by the user
- validates the new ironic node
- tries to power on the new node via the ironic api
- puts node in status available
- waits for nova propagation to be finished
- deploys a test instance on this new node via the compute api
- deletes new test instance
- prepares node for customer use (conductor group etc)
- sets node status to activeIf any of the above steps fail, the node will be flagged as not ready in netbox and the node will be deleted in ironic.
## extra feature
The user can provide a rules json template which should be applied for each new node, such as a specific node name, port infos etc.
Example:```
{
"properties": {
"node": [
{
"op": "replace",
"path": "/name",
"value": "{{ .node.Name }}"
},
{
"op": "add",
"path": "/driver_info/deploy_kernel",
"value": "{{ imageToID `some_image_name` }}"
},
{
"op": "add",
"path": "/driver_info/kernel_append_params",
"value": "{{ getSwiftImageName `some_container` `some_prefix` }}"
},
{
"op": "replace",
"path": "/resource_class",
"value": "{{ getMatchingFlavorFor .node }}"
}
],
"port": [
{
"op": "add",
"path": "/local_link_connection/switch_id"
"value": "aa:bb:cc:dd:ee:ff"
}
]
}
}
```