With VMware releasing new major versions of vSphere and NSX-T last week, it’s high season for nested lab deployments. My Norwegian Proact colleague Rudi Martinsen just published a great two part series on how to deploy a nested lab using vRealize Automation. My Dutch buddy at VMware Iwan Hoogendoorn is doing something very exciting with Terraform. And William Lam, who has been building nested labs since the day he was born I believe, has been busy with something too.
About a week ago I stumbled upon Yasen Simeonov’s GitHub repository. It contains a collection of Ansible Playbooks that automate the deployment of a nested vSphere environment. After trying it out a couple of times I decided to adopt Yasen’s, somewhat neglected, pet to give it some new love and attention (with Yasen’s blessing of course).
Today I’m presenting my own GitHub repository vsphere-nsxt-lab-deploy which is largely based on Yasen’s, but with a couple of updates and additions.
First of all, I updated the code so that it can deploy the brand new vSphere 7. Then I took things one step further and added Playbooks for a complete NSX-T 2.5/3.0 deployment leveraging VMware’s new Ansible NSX-T 3.0 modules.
I won’t go through the deployment process in detail. The repository’s single source of truth README.md is hopefully informative enough. Right now the runbook looks like this:
- Create a vSwitch and port groups on the physical ESXi host.
- Deploy and configure a vCenter Server Appliance (via automated CLI install).
- Deploy 5 ESXi virtual machines (via ISO install and KS.cfg).
- Configure the nested vSphere environment:
- Configure the ESXi hosts.
- Create and configure a VDS.
- Create Compute and Edge vSphere cluster and add ESXi hosts.
- Deploy NSX-T:
- Deploy NSX Manager.
- Register vCenter as a Compute Manager in NSX Manager.
- Create NSX-T Transport Zones (VLAN, Overlay, Edge).
- Create IP pool (TEP pool).
- Create Uplink Profiles.
- Create NSX-T Transport Node Profile.
- Deploy two NSX-T Edge Transport Nodes.
- Create and configure NSX-T Edge Cluster.
The deployment time is around 1,5 hours on my hardware. Without NSX-T it takes about 45 minutes.
The deployment is easy to modify. Change the settings in answerfile.yml to fit your needs and edit deploy.yml to control which components are being deployed. For example, if you’re not interested in deploying NSX-T you can simply comment out those Playbooks in deploy.yml.
Work in progress
The repository and its code is a work in progress and changes are committed on a regular basis. Although I’m pretty happy with what it currently does, there’s certainly room for improvement. I’m thinking about adding some optional Playbooks that set up some NSX-T logical networking constructs like Tier-0/Tier-1 Gateways, segments, and so on. I’ll keep you posted via the README.md and social media.
Feel free to use the repository as it is or let it inspire you and create something better. Just don’t forget to thank Yasen who laid the groundwork here.