1 of 34

Copyright © 2020 HashiCorp

Deploying Cisco NXOSv with Vagrant

Hoon Jo (조훈) - CCIE DC, CKA&D, VCIX-NV6

2 of 34

What is Cisco NXOS and v(Virtual)?

3 of 34

Which OS is for NXOSv?

NXOS9

bash-4.3$ cat /etc/os-release

ID=nexus

ID_LIKE=cisco-wrlinux

NAME=Nexus

VERSION="9.3(5)I9(1)"

VERSION_ID="9.3(5)I9"

PRETTY_NAME="Nexus 9.3(5)I9"

HOME_URL=http://www.cisco.com

BUILD_ID="9.3(5)I9(1)"

CISCO_RELEASE_INFO=/etc/os-release

NXOS7

bash-4.2$ cat /etc/os-release

ID=nexus

ID_LIKE=cisco-wrlinux

NAME=Nexus

VERSION="7.0(3)I7(8)"

VERSION_ID="7.0(3)I7"

PRETTY_NAME="Nexus 7.0(3)I7"

HOME_URL=http://www.cisco.com

BUILD_ID="7.0(3)I7(8)"

CISCO_RELEASE_INFO=/etc/os-release

4 of 34

cisco-wrlinux???

Wind Liver Linux customized by Cisco (Probably?)

5 of 34

vm.guest = :is_os

  • ./embedded/gems/2.2.14/gems/ffi-1.13.1/lib/ffi/platform.rb

6 of 34

How to deploy Non-Support OS!!!

7 of 34

Hoon Jo�(He/Him)

Cloud Solutions Architect at Megazone

8 of 34

My Journey

Vagrantfile for NXOSv

Lesson Learned

9 of 34

My Journey

Vagrantfile for NXOSv

Lesson Learned

10 of 34

When I wrote a Python Book...

Manually installed every time.

Python for Sys - Net Admin

When I wrote a book for Python, I setup manually those environment with Virtualbox.

It was very boring matter and consumed tremendous times too.

11 of 34

Leverage vagrant for ansible lab env

Auto-Provisioning

Ansible for IT automation

Vagrant help to build most of infra environment automatically. However it is very limited utilization with documents due to some OS doesn’t cover in vagrant.

12 of 34

Minor User, No Porting Guide (2018)

13 of 34

Line by Line Test and Deploy it (in 2018)

14 of 34

Line by Line Test and Deploy it (in 2018)

15 of 34

Plan: re-use and easy to get! (in 2021)

16 of 34

What happen??? Which one change?

17 of 34

I have to dig again even 3 years later.

18 of 34

Plan B: Build new code(i.e. Start exploring)

19 of 34

Anyhow made it :)

20 of 34

Anyhow made it.

21 of 34

My Journey

Vagrantfile for NXOSv

Lesson Learned

22 of 34

Vagrantfile (Line 1-21)

23 of 34

Vagrant run as privileged Vagrant user

ssh authorized_keys already in vagrant user

a

24 of 34

Vagrantfile (Line 1-21)

25 of 34

Vagrant try to find proper OS. but it failed

26 of 34

Vagrantfile (Line 30-46)

27 of 34

Serial Port Config

28 of 34

Vagrantfile (Line 30-46)

29 of 34

Code Run

30 of 34

  • Vagrantfile for NXOSv9

31 of 34

Hide vm.guest type in the code

32 of 34

My Journey

Vagrantfile for NXOSv

Lesson Learned

33 of 34

Don’t trust anyone

Build as TDD

Creative Thinking

34 of 34

Thank You!!!