NSX Python automated build

Started by burnyd, June 08, 2018, 12:03:01 PM

Previous topic - Next topic

burnyd

NSX Python automated build

I figured I would share this NSX python script to build an entire environment.  I worked with VMware a few months ago to get a lot of this going.  Some of this is my code some VMware’s.  But generally it builds out this environment.  This is taking into assumption that the NSX manager appliance is […]

I figured I would share this NSX python script to build an entire environment.  I worked with VMware a few months ago to get a lot of this going.  Some of this is my code some VMware’s.  But generally it builds out this environment.  This is taking into assumption that the NSX manager appliance is built out connected to vcenter, clusters are prepared for NSX vibs and controllers are deployed.  The click click click click has always killed me.  This should take up to 5-10 minutes to run all three scripts total.


nsxauto2


This is all within my Github page Here


Here are some screen shots of how the script works..


Create the distributed logical router


Screenshot from 2016-04-18 08:57:46


Create routing on the distributed logical router for bgp purposes


Screenshot from 2016-04-18 09:07:42


Create 4 Edge service gateways with BGP peering to the top of rack switches and DLR.  BGP is created, syslog is created and firewall is disable on the edges.


Screenshot from 2016-04-18 11:00:49


Everything you need other than the network build can be found within the vsphere MOB https://vcenterip/mob – > content – > root folder.


mob3


Everything is within the github repository.


There is a A side VLAN 1085(only on ToR1) B side VLAN 1086(only on TOR2)


Each Logical switch is unicast mode


Edge firewall is disable,ECMP is enabled, Syslog is created.


This was setup in three scripts because I had to use each of these all the time to either convert a VLAN backed environment to VXLAN or swap over a OSPF environment over to a BGP environment.


Source: NSX Python automated build