Currently CreateBrickConfig.py is pretty much a dummy script, this needs to evolve and dump a JSON file that can be consumed as a ansible variable for tasks to be written in the storage configuration roles.
Initial thoughts on the output JSON, based on the abstract inputs as given above would be:
{
"<hostname>": # One section per hostname
{
# If absent assumes configuration is not required, similar
# rule for other sections
"devices":
[ # List of devices to create
{
"grouping": "<jbod|raid6|raid0|raid10>",
"disks": ["", "", ...],
},
...
],
"pvs":
[ # List of LVM PVs to create
{
# devices filled in from created devices, or from configuration
# (if device configuration was ignored) (similar strategy for pvs, vg, lv)
"devices": ["", "", ...],
"options": ""
},
...
],
"vgs":
[ # List of LVM VGs to create
{
"vgname": "<userdefined>"|"auto",
"disk_type": "",
"stripe_size": "",
"diskcount": "",
"pvs": ["", "", ...],
"options": ""
},
...
],
"lvpools":
[ # List of LVM thin pools to create
{
"lvname": "<userdefined>"|"auto",
"lvoptions": "",
"vg": ""
},
...
],
"lvs":
[ # List of LVM LV's to create
{
"lvname": "<userdefined>"|"auto",
"lvoptions": "",
"vg": ""
}
],
"mounts":
[ # List of filesystems and mount points to create
{
"fstype": "<xfs|ignore>",
"fsoptions": "",
"mountpoint": "<userdefined>"|"auto"
lv: ""
},
...
],
},
...
}
Currently CreateBrickConfig.py is pretty much a dummy script, this needs to evolve and dump a JSON file that can be consumed as a ansible variable for tasks to be written in the storage configuration roles.
Inputs to this script would possibly be:
Initial thoughts on the output JSON, based on the abstract inputs as given above would be: