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 29, 2024
1 parent a315f0f commit 3c8e40f
Show file tree
Hide file tree
Showing 2 changed files with 84 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:

```

Check failure on line 7 in docs/user-guide/openstack-placement.md

View workflow job for this annotation

GitHub Actions / build

Fenced code blocks should have a language specified [Context: "```"]
TOKEN=`openstack token issue -f json | jq -r '.id'`
```

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

```

Check failure on line 13 in docs/user-guide/openstack-placement.md

View workflow job for this annotation

GitHub Actions / build

Fenced code blocks should have a language specified [Context: "```"]
curl -H "X-Auth-Token: $TOKEN" \
-k \
'https://placement.understack/resource_providers/2ce4ba74-3dad-4b6e-baf1-3df26e93875f/usages' | jq
```

0 comments on commit 3c8e40f

Please sign in to comment.