Environment Setup Requirements
- Terraform - follow instructions to install it in your environment at https://www.terraform.io/intro/getting-started/install.html
- Python 2.7 - the latest version can be downloaded from https://www.python.org/downloads/
- NetFoundry Pathon API module - the latest version can be installed from https://pypi.org/project/netfoundry/
- Terraform Python Module - the latest one can be downloaded from https://pypi.org/project/python-terraform/
- NetFoundry Network must be already stood up in the production NetFoundry MOP console. The MOP stands for Multi-cloud Orchestration Platform.
- To use NetFoundry APIs, one must obtain the client ID and secret that is provided at the time of NetFoundry MOP organization on-board. They are used to obtain an authorization token (i.e. a JSON Web Token) which is passed to the NetFoundry Python API module when constructing an endpoint in NF MOP.
- VMware vCenter API credential (user/password) to access the vSphere resources that I assigned to them.
- Each GW can have 2 or 3 NIC provisioned depending on the configuration required in the on-premise Data Center. In 2 NIC GW configuration, the first NIC (eth0, ens160, etc) must be connected to the Network that faces the Internet. The second NIC (eth1, ens192, etc) must be connected to the local area network within the Data Center, where clients, apps live. In 3 NIC GW configuration, the third NIC (eth2, ens224, etc) must be connected to the redundant/second ISP connection that may be present. Based on the GW configuration required, each GW must have the network provisioned before the script is run. More details on the deployment configurations can be found at Launch a NetFoundry vCPE GatewayNetFoundry Gateway OVA is imported to vCenter and saved as template - template path and name needed
Sample scripts that orchestrates the flowing steps:
- Create NF Endpoint object(s) in NF MOP and retrieves registration keys for the created Endpoint object(s).
Note: vShpere_nets variable is a list of 3 networks, if only 2 NICs are used, then leave the third network as none (""). The LAN IP and Netmask must be static if used with the dynamic routing protocols. If DHCP is used for any NICs, then the corresponding Network's IP/Netmask is replaced by none (or ''") in the list.