Using VM Templates and NSX-T for Repeatable Virtual Network Deployments
So far, we've provided the infrastructure for continuous delivery / continuous integration, but it's been for those other guys.
Is that odd?
Let's try using the principles provided for more infrastructure-oriented reasons. Let's build a network lab using NSX-T.
First, we need some form of a mutable router. Normally, that'd be whatever flavor's "in production," but the specific implementation doesn't really matter.
First, we need to outline what basic functionality would need to be in place for this basic image to work:
- Management Plane isolation: Build a separate "routing table," or VRF for the first applied interface.
- Automatic connectivity. We should have some way to automatically get network connectivity separate from the "data plane," and perform configuration loading, command invocations, and software lifecycle management.
- Enable inbound management protocols.
I have built a light configuration to do that here.
Once operational, we will want a good process to keep software up-to-date. Once established with this basic configuration, it'll be possible to SSH into this device and run the update process. Here's how:
1vyos@vyos:~$ add system image https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso vrf mgmt 2Trying to fetch ISO file from https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso 3 % Total % Received % Xferd Average Speed Time Time Time Current 4 Dload Upload Total Spent Left Speed 5100 309M 100 309M 0 0 1424k 0 0:03:42 0:03:42 --:--:-- 1551k 6ISO download succeeded. 7Checking for digital signature file... 8 % Total % Received % Xferd Average Speed Time Time Time Current 9 Dload Upload Total Spent Left Speed 10 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 11curl: (22) The requested URL returned error: 404 Not Found 12Unable to fetch digital signature file. 13Do you want to continue without signature check? (yes/no) [yes] yes 14Checking MD5 checksums of files on the ISO image...OK. 15Done! 16What would you like to name this image? [1.3-rolling-202010020117]: 17OK. This image will be named: 1.3-rolling-202010020117 18Installing "1.3-rolling-202010020117" image. 19Copying new release files... 20Would you like to save the current configuration 21directory and config file? (Yes/No) [Yes]: Yes 22Copying current configuration... 23Would you like to save the SSH host keys from your 24current configuration? (Yes/No) [Yes]: 25Copying SSH keys... 26Running post-install script... 27Setting up grub configuration... 28Done. 29vyos@vyos:~$ show system image 30The system currently has the following image(s) installed: 31 32 1: 1.3-rolling-202010020117 (default boot) 33 2: 1.3-rolling-202009200118 34vyos@vyos:~$ reboot 35Are you sure you want to reboot this system? [y/N] y 36 37... 38 39vyos@vyos:~$ show system image 40The system currently has the following image(s) installed: 41 42 1: 1.3-rolling-202010020117 (default boot) (running image) 43 2: 1.3-rolling-202009200118 44 45vyos@vyos:~$ delete system image 46Possible completions: 47 Enter Execute the current command 48 1.3-rolling-202009200118 49 Name of image image to delete 50 1.3-rolling-202010020117 51 52vyos@vyos:~$ delete system image 1.3-rolling-202009200118 53Are you sure you want to delete the 54"1.3-rolling-202009200118" image? (Yes/No) [No]: Yes 55Deleting the "1.3-rolling-202009200118" image... 56Done
Ta-da! new version! We cleaned up the old image for disk space compaction as well.
Our virtual router is built - let's shut it down, and then convert it to a template:
Ready to go!