#Zero Touch Cluster Setup using REST API

1 messages · Page 1 of 1 (latest)

dreamy snow
#

Hi Team,

I am attempting to set up a new 2-node cluster using the API without having to manually log onto the SP port. I have a fully wiped cluster (running ONTAP 9.15.1P7) with an IP on the SPs that I can access, and I've logged onto system console and exited the setup wizard.

So far I've discovered that a newly wiped node creates a mgmt_auto interface that can pick up an IP via DHCP. I can't specifically test this as my dev cluster is in a DC with no DHCP server, so I've logged on via SP and set an IP/Netmask on mgmt_auto and created a default gateway on the Default SVM.

As per the guide here (Discovering the Nodes - https://docs.netapp.com/us-en/ontap-restapi/ontap/cluster_endpoint_overview.html#discovering-the-nodes) I can make an API request (/api/cluster/nodes) to the mgmt_auto IP that returns the same node information as the example from the docs (minus uptime). Note that this doesn't include any Cluster IP addresses.

The next section in the docs (Creating the cluster) requires me to supply the cluster_interface IP address for each node in the cluster so that it can "connect to it while adding it to the cluster" (as per the doc information). The trouble is, this appears to be mandatory as the cluster create API command fails if I don't include these IPs. It also fails if I try to supply made up Cluster IPs, so the only option I have is to include the generated IPs which is only visible if I run net int show on each node. If I do this then cluster create succeeds, if I don't supply cluster IPs it fails.

So my questions are:

  1. Am I missing something or do I have to supply existing Cluster IP addresses?
  2. If I do how can I find the Cluster IPs using the API? This doesn't seem possible from what I can see because /api/cluster/nodes doesn't give me them, and there's no other API commands I can run at this point in the setup.

Thanks in advance.

steel canyon
#

Hi Paul, you may have solved this by now. It is a bit of a "chicken and the egg" problem since the cluster isn't yet up and running, so the APIs that need to deliver constructs associated with the cluster don't do so. Have you looking into parsing the output of the api cli call to extract the cluster IPs from each node to build the cluster create command?

https://docs.netapp.com/us-en/ontap-restapi/ontap/getting_started_with_the_ontap_rest_api.html#Using_the_private_CLI_passthrough_with_the_ONTAP_REST_API

pine sapphire
#

try /api/cluster/nodes?order_by=name&fields=*

#

You'll have to run that against each node and stitch the data together.