This repository contains code that simplifies NSX Install by providing a wrapper script. The information needed to install NSX is read from 2 files.
-
Defaults: This contains certain display names. Users can change this but is not required to.
-
Uer Config: This contains all the information that is needed from the user (like network details, passwords etc)
The provided nsx-install.py script merges these files to generate a JSON file which is used by the Ansible modules to install NSX.
- Deploys a NSX Manager cluster (or a single NSX node)
- Configures NSX Manager with vCenters
- Deploys 2 Edges and creates a cluster
- Creates a Host Switch Profile and Transport Node Profile
- Preps one or more vCenter Clusters (to create Host Transport Nodes)
- Adds a License file to NSX Manager and Accepts the EULA
There are dependency on the following tools:
- Python > 3.6.x
- Ansible > 2.9.x
- PyVmomi
- OVFTool
An easy way to verify if Python and Ansible are in the right versions:
$> ansible-playbook --version
ansible-playbook 2.9.6
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/vmware/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0]
- Read the FAQ below
- Clone this repo to a linux based system (Ubuntu/CentOS)
- Make sure the dependencies are met (Install Python/Ansible/PyVmomi)
- Download the NSX unified appliance installer OVA on the local file system
- Edit nsx-config.txt file and update ALL the fields. Make sure you also have a NSX License!
- Run python nsx-install.py --start
- Run python nsx-install.py --reset-defaults This creates the nsx-defaults.txt file. Edit the file if needed. Editing it is purely optional Note: Running python nsx-install.py --reset-defaults will overwrite the existing file
- Run python nsx-install.py --reset-config This creates the nsx-config.txt file. Edit the file and provide all the information Save the nsx-config.txt in case you want to refer to it later Note: Running python nsx-install.py --reset-config will overwrite the existing file
All logs are generated in nsx-install.log
- Can I deploy just 1 NSX manager
- Can I run in an nested environment
- I only have 1 vCenter
- Dont want to run the whole install but run playbooks manually
- I just have 1 cluster where I want to deploy NSX Manager, Edges and Host Transport Nodes
- Can I prep my Hosts Induvidually and not as a Cluster
- Can I change the number of Edges that are deployed
- Can I customize the workflow
Yes.
- Edit nsx-config.txt and change the 'nsx_manager_cluster' to 'No'
- Run 'python nsx-install.py --start'
Yes.
As long as there are enough resources (CPU, Memory, Disk) and there is IP connectivity between vCenter, NSX and the system on which the script is run.
Just put the same information (fqdn, username, password) in both places in nsx-cofig.txt:
nsx_vcenter_fqdn = ""
nsx_vcenter_username = ""
nsx_vcenter_password = ""
vcenter_fqdn = ""
vcenter_username = ""
vcenter_password = ""
NOTE: There has to be at least 2 Clusters in your datacenter. One cluster will be used to deploy NSX Manager(s) and Edges and the second cluster will be used for Host Transport Nodes.
Yes.
Run 'python nsx-install.py --manual'. This will first merge the nsx-defaults.txt and nsx-config.txt and generate the nsx_pacific_vars.yml. You can then run: 'ansible-playbook 01_deploy_first_node.yml' or any other playbook.
I just have 1 cluster where I want to deploy NSX Manager, Edges and have Host Transport Nodes. Can I use this script?
No.
The install wrapper expects at least 2 different clusters. One cluster will be to install NSX Manager(s) and Edges. THe other cluster will be prepped for NSX. So ALL hosts in that cluster will be Host Transport Nodes.
Not through this script. The underlying Ansible playbooks support this. Please look at example here: "Prep Single Hosts as Transport Nodes
No. Customization can be done by using the underlying Ansible modules directly. Please check "NSX-T Ansible modules"
No. The script is ment to deploy a specific topology quickly. Customization can be done by using the underlying Ansible modules directly. Please check "NSX-T Ansible modules"
Please file an issue on GitHub with the following info:
- The complete log file (nsx-install.log)
- nsx-defaults.txt and nsx-config.txt (feel free to sanitize the password)
- The output of 'ansible-playbook --version'
For general information about Ansible, visit the GitHub project page.
Documentation on the NSX platform can be found at the NSX-T Documentation page