Last week, I had spent some time exploring and getting myself more familiar with NSX-T, which is the next generation release of the NSX platform from VMware. One of the first thing I do when learning about a new product is to setup a lab environment that I can using. Having gone through the deployment once by hand, I realized it would be quite painful if I needed to do this again, which I know I will and I did 🙂 I wanted to have a simliar experience to my vGhetto Automated vSphere Lab deployment script which also including setting up the entire vSphere infrastructure along with deploying and configuring NSX-V and extending it to support NSX-T.
Since my original script leverages PowerCLI to access both the vSphere and NSX APIs, I wanted to do the same with NSX-T. Funny enough, the PowerCLI team had just published an update release (6.5.3) which also added support for NSX-T and I thought this was perfect timing to try out the NSX-T APIs, which I had never used before.
UPDATE (01/01/2018) - I have verified the script also works with the latest NSX-T 2.1 which was just released before Christmas. The script has also been updated to create a new Edge Uplink Profile along with an Edge Cluster and automatically associate all Edge VMs to Edge Cluster.
I have created a new Github repository called vghetto-nsxt-automated-lab-deployment which contains detailed instructions along with the PowerCLI script.
Here is what the script is currently performing:
- Deploy and configure vCenter Server Appliance 6.5u1
- Deploy and configure 3 x Nested ESXi 6.5u1 Virtual Appliance VMs and attaching it to vCenter Server
- Deploy NSX-T Manager, 3 x Controllers & 1 x Edge and setup both the Management and Control Cluster Plane
- Configure NSX-T with IP Pool, Transport Zone, Add vCenter Server as Compute Manager, Create Logical Switch, Prepare ESXi hosts, Create Uplink Profile & Add configure ESXi hosts as a Transport Node
Similiar to the vSphere version of this script, all deployed VMs will be placed inside of a vCenter vApp construct as shown in the example screenshot below:
If you go into Fabric->Nodes->Hosts, you should see all the ESXi hosts that was deployed, prepared and associated with NSX-T
Obviously, I have only scratched the surface of NSX-T and its automation capabilities and while the deployment is fairly basic, it does enable customers to quickly spin up an NSX-T environment without any prior knowledge. Hopefully I will be able to expand on this script in the future and if folks would like to contribute back, feel free to submit a pull request to the Github repository. It was definitely a learning experience using the new NSX-T APIs and for areas where there were Automation gaps, I was able to take advantage of a recently published article I had on sending keyboard keystrokes to a VM using the vSphere API which was quite handy for places where I did not want to rely on SSH. I definitely have some feedback to share with the NSX team and hopefully we can improve NSX-T in future releases so both initial setup and day operations can be even easier!