equinix-labs / ansible-collection-equinix

Ansible content to help automate the management of Equinix resources
https://deploy.equinix.com/labs/ansible-collection-equinix/
GNU General Public License v3.0
2 stars 8 forks source link

Implement a Batch Devices module #123

Open displague opened 9 months ago

displague commented 9 months ago
SUMMARY

Equinix Metal provides an API for creating multiple devices in a batch. One of the benefits of this are that a single API call can be used to create all of the nodes and an availability issue can be surfaced pre-provisioning. Multiple batches can be sent in a single request and these batches can each include a count and list of hostnames.

This could be used to, for example, provision in one-shot a batch of {"hostname":"k8s-cp-{index}", "count": 3} alongside node pools {"hostnames":["k8s-nodepool-gpu-node-a", "k8s-nodepool-gpu-node-b"], "count": 2} and {"hostname":{"k8s-nodepool-cpu-node-{index}", "count":3}.

https://deploy.equinix.com/developers/api/metal#tag/Batches/operation/createDeviceBatch

This could help to resolve #124

ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
displague commented 9 months ago

Client-side alternatives are offered in https://github.com/equinix-labs/ansible-collection-equinix/issues/124#issuecomment-1749532548