All Projects → WahlNetwork → nsx-tier-builder

WahlNetwork / nsx-tier-builder

Licence: Apache-2.0 License
Provides automation for a full tier of virtual networking with VMware NSX

Programming Languages

powershell
5483 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to nsx-tier-builder

transmission
Development repository for the transmission cookbook
Stars: ✭ 14 (-41.67%)
Mutual labels:  managed-by-terraform
vmware-vra-gem
A Ruby Gem for interacting with the VMware vRealize Automation system
Stars: ✭ 16 (-33.33%)
Mutual labels:  managed-by-terraform
rundeck
Development repository for the rundeck cookbook
Stars: ✭ 45 (+87.5%)
Mutual labels:  managed-by-terraform
ossec
Development repository for the ossec cookbook
Stars: ✭ 42 (+75%)
Mutual labels:  managed-by-terraform
kitchen-rackspace
A Rackspace Cloud driver for Test Kitchen
Stars: ✭ 15 (-37.5%)
Mutual labels:  managed-by-terraform
busser
Kitchen Busser - Runs tests for projects in test-kitchen
Stars: ✭ 47 (+95.83%)
Mutual labels:  managed-by-terraform
github-action-terraform
An example of Continuous Integration with GitHub Actions and HashiCorp Terraform
Stars: ✭ 23 (-4.17%)
Mutual labels:  managed-by-terraform
sql server
Development repository for the sql_server cookbook
Stars: ✭ 60 (+150%)
Mutual labels:  managed-by-terraform
github-actions
Repository for CDS specific GitHub actions
Stars: ✭ 63 (+162.5%)
Mutual labels:  end-of-life
kitchen-pester
A Test Kitchen driver to execute Pester as a verifier
Stars: ✭ 29 (+20.83%)
Mutual labels:  managed-by-terraform
squid
Development repository for the squid cookbook
Stars: ✭ 27 (+12.5%)
Mutual labels:  managed-by-terraform
language-chef
Development repository for the language-chef plugin for the Atom text editor
Stars: ✭ 16 (-33.33%)
Mutual labels:  managed-by-terraform
stunnel
Development repository for the stunnel cookbook
Stars: ✭ 14 (-41.67%)
Mutual labels:  managed-by-terraform
line
Development repository for the line cookbook
Stars: ✭ 96 (+300%)
Mutual labels:  managed-by-terraform
kitchen-habitat
A Test Kitchen Driver for Habitat
Stars: ✭ 13 (-45.83%)
Mutual labels:  managed-by-terraform
kafka
Development repository for the kafka cookbook
Stars: ✭ 87 (+262.5%)
Mutual labels:  managed-by-terraform
golang
Development repository for the golang cookbook
Stars: ✭ 48 (+100%)
Mutual labels:  managed-by-terraform
keepalived
Development repository for the keepalived cookbook
Stars: ✭ 29 (+20.83%)
Mutual labels:  managed-by-terraform
smartmontools
Development repository for the smartmontools cookbook
Stars: ✭ 12 (-50%)
Mutual labels:  managed-by-terraform
rsync
Development repository for the rsync cookbook
Stars: ✭ 25 (+4.17%)
Mutual labels:  managed-by-terraform

NSX Tier Builder

Description

This project was created to quickly stand up and tear down virtual networking environments with VMware NSX. It's common for a network environment to be a tier of an application - such as production, stage, test, or development - and thus I've named this the NSX Tier Builder! Here are some common use cases:

  1. Better understanding of the NSX API from a PowerShell coder's perspective.
  2. Provision and remove network tiers for any sort of development work.
  3. Combine vRealize Orchestration input/outputs with a generic framework and tweak it to your desired state.

Installation

The code assumes that you've already deployed the underlying infrastructure and software dependencies to run NSX - this includes the manager, controllers, VXLAN, segment range, and transport zone. The entire configuration for your application tier is held within a single JSON file, which is used for both creating and removing the virtual network.

Create-NSXTier

To get started, you'll need:

  1. PowerShell version 3 or higher (I recommend version 4)
  2. PowerCLI version 5.8 or higher

Grab the guts of this repo - mainly just the two PS1 scripts and the sample .JSON file - and run them on a computer with the previously mentioned software installed. Please note:

  • If you plan to run from a remote location, you'll have to use Set-ExecutionPolicy bypass because I have not signed the scripts.
  • If you plan to run from a local location, you can use Set-ExecutionPolicy RemoteSigned or bypass

Usage Instructions

Once you've grabbed the bits from this folder, start by editing the JSON file. I've provided an example within this repository.

Next, run the Create-NSXTier script to build an environment, or the Remove-NSXTier environment to remove an environment. You'll reference the same JSON file for both activities, which keeps things simple.

Build Topology

The topology is as such:

Logical Switch(es) <--> Distributed Logical Router (router) <-OSPF-> Transport Switch <-OSPF-> Edge Services Gateway (edge) <-->

If you have an improvement idea or want to add more functionality to the config, shoot me a pull request. I will be adding more features to the JSON file as time progresses.

Script Parameters

These are the parameters available within the scripts.

  1. NSX = NSX Manager IP or FQDN
  2. NSXPassword = NSX Manager credentials with administrative authority
  3. NSXUsername (optional) = NSX Manager username. Defaults to "admin" if no value is specified.
  4. JSONPath = Absolute path to your JSON configuration file
  5. vCenter = vCenter Server IP or FQDN. Only required for the Create script.
  6. NoAskCreds (optional) = Switch that informs the script to use your current Windows creds for vCenter login. Only available in the Create script.

Workflow

The script follows a logical progression in order to gracefully build (and remove) the virtual network.

  1. Your logical switches are created, including a transit switch (required).
  2. A logical router is created as the gateway for all of your logical switches (using the IP you assigned on each switch). After it is online, the routing config is applied. The router will advertise its directly connected routes via OSPF to the northbound transit switch where the edge lives.
  3. A logical edge gateway is created for physical connectivity and to provide services. It has a southbound (internal) interface on the transit network which talks to the router, and a northbound (uplink) interface on a VDS port group. After it is online, the routing config is applied. The edge will advertise OSPF northbound and southbound if it was configured.

Future

The ideal roadmap for this project is to:

  1. Use a friendly GUI wrapper to import/export data for the JSON config. Hand editing the file isn't much fun.
  2. Make the various calls with the script modular and functions, instead of one serialized script.

Contribution

Create a fork of the project into your own reposity. Make all your necessary changes and create a pull request with a description on what was added or removed and details explaining the changes in lines of code. If approved, project owners will merge it.

Licensing

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Other Cool Projects

  • vtagion has a neat project to deploy and link NSX Manager to vCenter Server.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].