Hi. We are in a cross-vCenter deployment. It is a pretty small deployment though.
During failover test of course, you have to unassign Primary NSX from Secondary, demote to Transit, assign as Primary. And of course deploy a new controller cluster at the Secondary site. Failover has quite a few steps too.
We have documentation, and can do it all through vCenter, but I was looking at REST and wondering if you could do all the above steps ( I obviously didnt get into detail) to do this? I have pretty much ZERO rest so I would need to test. But it intrigues me to be able to automate our failover and failback process.
Do I bother investigating more? And how should I get started? Thanks,,,
Yes you can leverage API calls during Failover Activity. Ideally below mentioned points are mainly considered
Based on the design you might need firewall/route changes which can also be pushed via API calls .Please refer to below Cross -VC guide to understand overall design approach . Once you are clear with design scenarios , please refer to API guide and understand how to fetch NSX manager/Controller status etc to start of with . Those are pretty much GET calls and later you can move on to PUT/PUSH operations for each activity . For eg GET /api/2.0/universalsync/configuration/nsxmanagers on a primary NSX Manager will list secondary NSX Managers configured on the primary NSX Manager and same operation on a secondary NSX Manager, it will list information about the secondary NSX Manager and the primary NSX Manager it is associated with.
Automating Security Group and Policy Creation with NSX REST API - The Network Virtualization Blog
https://docs.vmware.com/en/VMware-NSX-Data-Center-for-vSphere/6.4/nsx_64_api.pdf
NSX Dual Active/Active Datacenters BCDR – Route to Cloud
Thank you We are actually are in an active-active local egress setup. So for a failover we only need to.
Unlink secondary from primary
promote the now transit to primary
deploy new controller cluster
Goimg to both sites a bit more work.
I need to research more. It sounds doable!