Giter Site home page Giter Site logo

cumulus-install-vm's Introduction

Provision Cumulus Switch from ONIE.

A simplification of vagrant-cw-libvirt. Received a bunch of Quanta switches with no Cumulus software. This provided a quick way to install Cumulus Linux and provision the switches with the appropriate config. No internet connectivity or console access was needed during provisioning.

Requirements

  • Only supports vagrant-libvirt, so only Linux Laptops. Support and documentation for vagrant-virtualbox is welcome, and then you can do this procedure using a MAC or Windows PC.

Workflow

  • Download the ubuntu/trusty64 virtualbox formatted box. And then convert it to a libvirt compatible version
vagrant box add ubuntu/trusty64
vagrant mutate ubuntu/trusty64 libvirt
  • Clone this repo to your Linux laptop
git clone https://github.com/linuxsimba/cumulus-install-vm --recursive
  • Define wbench_hosts with the correct MAC addresses. Read the Vagrantfile for more details

  • Create the VM using vagrant up --provider libvirt. This will provision BIND, DHCPD, install ansible and position the cumulus user SSH key as the public key access to the root user of the switches.

  • Copy a Cumulus Linux OS version to /var/www of the VM. Add a symlink called /var/www/onie-installer and point it to the Cumulus image

/var/www# ls
  lrwxrwxrwx  1 root  root   28 Apr 20 22:31 onie-installer -> CumulusLinux-2.5.7-amd64.bin

  • Git clone the provision scripts to the Cumulus user home directory on the VM, if you want to completely configure the switch offline.

  • Go into the lab, and stitch the physical port of the laptop to the mgmt port of the switch. Make sure to put the physical port and the VM's eth1 on the same software bridge. Example:

(on laptop) # virsh net-info switch_mgmt Name: switch_mgmt UUID: f9688f33-fce0-4ef6-b306-1348fa329617 Active: yes Persistent: yes Autostart: no Bridge: virbr3 <=== attach phy interface to this bridge

(on laptop) # virsh (on laptop) # brctl addif ens0p5 virbr3


* reboot the switch.

* When the switch reboots, it comes up in ONIE mode and installs whatever OS is
specified in the VM's /var/www/onie-installer path.

* It's not obvious when it's done, so I just waited 5 minutes then pinged the
switch's IP. _See ``wbench_hosts`` of the [Vagrantfile](https://github.com/linuxsimba/cumulus-install-vm/blob/master/Vagrantfile)_. I then confirmed I could ssh to
the switch root user. Then, I ran the Ansible provision script, _(not included in
this repo)_ to configure the L2, L3 config and site specific apps.
This was the longest step. Wish there was a quick way to
simulate Ansible tower behaviour, which automates this step.

* Each switch install took about 10 minutes.

cumulus-install-vm's People

Contributors

linuxsimba avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.