-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: adds additional openstack docs
- Loading branch information
1 parent
97ce740
commit 3ca9576
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/> |