Skip to content

Commit

Permalink
docs: adds additional openstack docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaskuechler committed Oct 30, 2024
1 parent 97ce740 commit b7e4e29
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
67 changes: 67 additions & 0 deletions docs/user-guide/openstack-ironic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# OpenStack Baremetal (Ironic)

## Setting baremetal node flavor

Upstream docs: <https://docs.openstack.org/ironic/latest/install/configure-nova-flavors.html>

When creating a flavor, make sure to include a property for the baremetal custom flavor,
which in this example is `resources:CUSTOM_BAREMETAL_GP2SMALL=1`:

``` bash
openstack --os-cloud understack flavor create \
--ram 98304 --disk 445 --vcpus 32 --public \
--property resources:CUSTOM_BAREMETAL_GP2SMALL=1 \
--property resources:DISK_GB=0 \
--property resources:MEMORY_MB=0 \
--property resources:VCPU=0 gp2.small
```

Then set the baremetal node's resource class with the custom flavor:

``` bash
openstack baremetal node set 8d15b1b4-e3d8-46c3-bcaa-5c50cd5d1f5b --resource-class baremetal.gp2small
```

## Cleaning a baremetal node

Create a baremetal raid config file for a raid1 config with the following contents:

``` json title="raid1-config.json"
{ "logical_disks":
[ { "controller": "RAID.SL.1-1",
"is_root_volume": true,
"physical_disks": [
"Disk.Bay.0:Enclosure.Internal.0-1:RAID.SL.1-1",
"Disk.Bay.1:Enclosure.Internal.0-1:RAID.SL.1-1"
],
"raid_level": "1",
"size_gb": "MAX"
}
]
}
```

Apply the raid1 config from above:

``` bash
openstack --os-cloud=${OS_CLOUD} baremetal node set ${NODE_UUID} --target-raid-config raid1-config.json
```

Create another file with our node cleaning steps:

``` json title="raid-clean-steps.json"
[{
"interface": "raid",
"step": "delete_configuration"
},
{
"interface": "raid",
"step": "create_configuration"
}]
```

Clean the node:

``` bash
openstack --os-cloud=${OS_CLOUD} baremetal node clean --clean-steps raid-clean-steps.json --disable-ramdisk ${NODE_UUID}
```
17 changes: 17 additions & 0 deletions docs/user-guide/openstack-placement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# OpenStack Placement

## Query Placement usages

Get an openstack token:

``` bash
TOKEN=`openstack token issue -f json | jq -r '.id'`
```

Make sure to change the placement url to your own environment:

``` bash
curl -k -H "X-Auth-Token: $TOKEN" https://placement.understack/resource_providers/ | jq
```

Further Placement API information: <https://docs.openstack.org/api-ref/placement/>
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,6 @@ nav:
- user-guide/mariadb-operator-cheat-sheet.md
- user-guide/postgres-operator-cheat-sheet.md
- user-guide/monitoring.md
- user-guide/openstack-ironic.md
- user-guide/openstack-placement.md
- Workflows: workflows/

0 comments on commit b7e4e29

Please sign in to comment.