All Projects → ios-xr → iosxrv-x64-vbox

ios-xr / iosxrv-x64-vbox

Licence: BSD-3-Clause license
IOS XR VirtualBox Vagrant Image Generation tools

Programming Languages

python
139335 projects - #7 most used programming language
ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to iosxrv-x64-vbox

vagrant-boot2docker-swarm
A multi-machine Docker swarm Vagrant environment
Stars: ✭ 16 (-77.78%)
Mutual labels:  vagrant, virtualbox
hassio-vagrant
Vagrant box running Hass.io / Home Assistant
Stars: ✭ 42 (-41.67%)
Mutual labels:  vagrant, virtualbox
Ansible Vault
🔑 Ansible role for Hashicorp Vault
Stars: ✭ 189 (+162.5%)
Mutual labels:  vagrant, virtualbox
Kubernetes Vagrant Centos Cluster
Setting up a distributed Kubernetes cluster along with Istio service mesh locally with Vagrant and VirtualBox, only PoC or Demo use.
Stars: ✭ 1,750 (+2330.56%)
Mutual labels:  vagrant, virtualbox
Packer Centos 7
This build has been moved - see README.md
Stars: ✭ 223 (+209.72%)
Mutual labels:  vagrant, virtualbox
Arch Boxes
Arch-boxes provides automated builds of the Arch Linux releases for different providers and post-processors (read-only mirror)
Stars: ✭ 149 (+106.94%)
Mutual labels:  vagrant, virtualbox
Trellis
WordPress LEMP stack with PHP 8.0, Composer, WP-CLI and more
Stars: ✭ 2,295 (+3087.5%)
Mutual labels:  vagrant, virtualbox
Packer Ubuntu 1804
This build has been moved - see README.md
Stars: ✭ 101 (+40.28%)
Mutual labels:  vagrant, virtualbox
Packer Templates
Scripts and Templates used for generating Vagrant images
Stars: ✭ 219 (+204.17%)
Mutual labels:  vagrant, virtualbox
Packer Build
Packer Automated VM Image and Vagrant Box Builds
Stars: ✭ 199 (+176.39%)
Mutual labels:  vagrant, virtualbox
development-environment
A development environment for Java, Python, Node.js and Go built using Vagrant
Stars: ✭ 50 (-30.56%)
Mutual labels:  vagrant, virtualbox
Vagrantboxes
Handcrafted Arch Linux Vagrant base box with ❤️
Stars: ✭ 242 (+236.11%)
Mutual labels:  vagrant, virtualbox
Vermin
The smart virtual machines manager. A modern CLI for Vagrant Boxes.
Stars: ✭ 110 (+52.78%)
Mutual labels:  vagrant, virtualbox
guix-vm
Scripts and support necessary to make a GuixSD Virtualbox image
Stars: ✭ 18 (-75%)
Mutual labels:  vagrant, virtualbox
Rhcsa8env
This is a RHCSA8 study environment built with Vagrant/Ansible
Stars: ✭ 108 (+50%)
Mutual labels:  vagrant, virtualbox
Nixbox
NixOS Vagrant boxes [[email protected]]
Stars: ✭ 189 (+162.5%)
Mutual labels:  vagrant, virtualbox
Drupal Vm
A VM for Drupal development
Stars: ✭ 1,348 (+1772.22%)
Mutual labels:  vagrant, virtualbox
Vagrant Box Templates
Stars: ✭ 100 (+38.89%)
Mutual labels:  vagrant, virtualbox
Box
[DEPRECATED] Official, pre-packaged Vagrant Box
Stars: ✭ 197 (+173.61%)
Mutual labels:  vagrant, virtualbox
Packer
Packer helpers and templates for Docker, IIS, SQL Server and Visual Studio on Windows and Ubuntu
Stars: ✭ 242 (+236.11%)
Mutual labels:  vagrant, virtualbox

iosxrv-x64-vbox

Contributions

All contributions under this project are done so under the BSD license detailed in the LICENSE file contained in this repo.

Purpose of this repository

The purpose of this workflow is to provide an IOS XR Virtual Machine to the user in the Vagrant VirtualBox format, without being concerned with the underlying architecture or networking that the VM is running on; so that the end user can access the app-hosting Linux environment, or simply begin to play with IOS XR - all with the convenience and economic benefit of using their existing laptop hardware.

Currently this supports IOS XRv (64-bit) only but will be adapted to also handle IOS XRv 9000 images.

An IOS XRv (64-bit) VM:

Is an IOS XR Control Plane image built on with the latest XR architecture, with a 64-bit Wind River Linux (WRL) kernel.

This includes eXR – access to the WR7 Linux kernel including Netstack, giving access to the underlying server's interfaces and an app-hosting environment.

Small enough at 3G (mini) or 4G (full) to run on hardware with limited RAM (like a mac laptop).

Forwarding is supplied by SPP/Virtio - the same as the legacy IOS XRv (32-bit) platform.

This is the migration path from IOS XRv (32-bit) for education and simulation purposes.

An IOS XRv (64-bit) Vagrant Virtualbox:

Is a virtual machine image containing IOS XRv (64-bit) and metadata, that can be brought up by standard vagrant commands. E.g. vagrant add and vagrant ssh.

IOS XR is pre-installed and pre-configured in XR and WRL, with IP connectivity out of the box with an embedded Vagrantfile providing username/password and port-forwarding as well as internet connectivity (DHCP using Vagrant's IP address pool) for ease of use.

App-hosting space (WRL7) is preconfigured with a user 'vagrant', password-less SSH, domain servers so the user can access the internet; basically set up to do app development out-of-the-box.

Therefore the user does not have to worry about networking, wiring, NICs and NIC drivers, connectivity, memory allocation etc - it's all going to work out of the 'box'.

A vagrant ssh command takes the user directly to the app-hosting space, no password needed. No messy configuration of /etc/resolv.conf issues for DNS lookup.

The box also allows IOS XR Console access, via SSH if a k9 image, via telnet if not.

The iosxr_iso2vbox.py tool is:

A tool written to convert an IOS XRv (64-bit) ISO image to a Virtualbox image that can be brought up by vagrant.

The tool creates the Virtualbox image, brings it up, configures XR and opernns Linux so that future uses of the box bring it up fully networked and ready to run.

How to use this tool

  1. git clone this repo:

    git clone https://github.com/ios-xr/iosxrv-x64-vbox.git
    
  2. Install VirtualBox, Vagrant and socat (see guide below).

  3. Download the appropriate ISO file, e.g. iosxrv-fullk9-x64.iso

  4. Generate the VirtualBox box:

    ./iosxrv-x64-vbox/iosxr_iso2vbox.py iosxrv-fullk9-x64.iso
    
  5. Example with verbosity off

    iosxrv-x64-vbox/iosxr_iso2vbox.py iosxrv-fullk9-x64.iso
    [iosxr_iso2vbox.py:428 -                 main() ] Creating Vagrant VirtualBox
    [iosxr_iso2vbox.py:155 -         configure_xr() ] Logging into Vagrant Virtualbox and configuring IOS XR
    [iosxr_iso2vbox.py:584 -                 main() ] Powering down and generating Vagrant VirtualBox
    [iosxr_iso2vbox.py:614 -                 main() ] Created: /Users/rwellum/Desktop/Boxes/machines/iosxrv-fullk9-x64/iosxrv-fullk9-x64.box
    [iosxr_iso2vbox.py:624 -                 main() ] Running basic unit tests on Vagrant VirtualBox...
    [iosxr_iso2vbox.py:645 -                 main() ] Passed basic test, box /Users/rwellum/Desktop/Boxes/machines/iosxrv-fullk9-x64/iosxrv-fullk9-x64.box is sane
    
  6. Full help output

    $ iosxrv-x64-vbox/iosxr_iso2vbox.py iosxrv-fullk9-x64.iso -h
    usage: iosxr_iso2vbox.py [-h] [-o] [-s] [-d] [-v]
           ISO_FILE
    
    A tool to create an IOS XRv Vagrant VirtualBox box from an IOS XRv ISO.
    
    The ISO will be installed, booted, configured and unit-tested.
    "vagrant ssh" provides access to IOS XR Linux global-vrf namespace
    with internet access.
    
    positional arguments:
    ISO_FILE              local ISO filename or remote URI ISO filename...
    
    optional arguments:
    -h, --help            show this help message and exit
    -o, --create_ova      additionally use vboxmanage to export an OVA
    -s, --skip_test       skip unit testing
    -d, --debug           will exit with the VM in a running state. Use: socat
                          TCP:localhost:65000 -,raw,echo=0,escape=0x1d to access
    -v, --verbose         turn on verbose messages
    
    E.g.:
    box build with local iso: iosxr-xrv64-vbox/iosxr_iso2vbox.py iosxrv-fullk9-x64.iso
    box build with remote iso: iosxr-xrv64-vbox/iosxr_iso2vbox.py user@server:/myboxes/iosxrv-fullk9-x64.iso
    box build with ova export and verbose: iosxr-xrv64-vbox/iosxr_iso2vbox.py iosxrv-fullk9-x64.iso -o -v
    

The iosxr_store.py tool is:

A tool written to copy a generated box to a repository, with a generated message to an alias.

How to use this tool

$ iosxrv-x64-vbox/iosxr_store_box.py -h
usage: iosxr_store_box.py [-h] [-m MESSAGE] [-r] -s SUBDIR [-v] [-t] BOX_FILE

A tool to upload an image to a maven repo like artifactory using curl, the image typically being a vagrant virtualbox.
User can select snapshot or release, the release images get synced to devhub.cisco.com - where they are available to customers.
This tool also sends an email out to an email address or an alias to inform them of the new image.
It is designed to be called from other tools, like iosxr_ios2vbox.py.

It will rely on the following environment variables to work:
  ARTIFACTORY_USERNAME
  ARTIFACTORY_PASSWORD
  ARTIFACTORY_LOCATION_SNAPSHOT
  ARTIFACTORY_LOCATION_RELEASE
  ARTIFACTORY_SENDER
  ARTIFACTORY_RECEIVER

positional arguments:
  BOX_FILE              BOX filename

  optional arguments:
    -h, --help            show this help message and exit
    -m MESSAGE, --message MESSAGE
                          Optionally specify a reason for uploading this box
    -r, --release         upload to '$ARTIFACTORY_LOCATION_RELEASE' rather than
                          '$ARTIFACTORY_LOCATION_SNAPSHOT'.
    -s SUBDIR, --subdirectory SUBDIR
                          subdirectory to upload to, e.g '6.1.1', 'stable'
    -v, --verbose         turn on verbose messages
    -t, --test_only       test only, do not store the box or send an email

    E.g.:
    iosxrv-x64-vbox/iosxr_store_box.py iosxrv-fullk9-x64.box --release --verbose --message 'A new box because...'
    iosxrv-x64-vbox/iosxr_store_box.py iosxrv-fullk9-x64.box --release, --message 'A new box because...'
    iosxrv-x64-vbox/iosxr_store_box.py iosxrv-fullk9-x64.box -r -v -m
    'Latest box for release.'

How to install Vagrant, VirtualBox and socat

This example is specific to OS X and is a guide only, users should research what their particular environment requires to run Vagrant, VirtualBox, and Pexpect:

  • Recommend using the Homebrew package manager.
  • Make sure you install version 5.x virtualbox
  • Vagrant latest version is: 1.8.2
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew cask install virtualbox
brew cask install vagrant
brew install socat

See also: http://sourabhbajaj.com/mac-setup/Vagrant/README.html

You may need to install Pexpect too:

brew cask install python
pip install pexpect

Once box is created - how do I bring it up?

How to bring up a single node instance:

  • Add the box to Vagrant and bring up the node:

    vagrant init 'IOS XRv'
    vagrant box add --name 'IOS XRv' iosxrv-fullk9-x64.box --force
    vagrant up
    
  • Wait for vagrant to finish and prompt you

  • To access operns App Hosting / XR Linux space:

    vagrant ssh
    
  • To access XR Console:

    ssh -p 2222 [email protected]
    

    Note this port number can be changed by Vagrant, so vagrant port will list the ports.

How to bring up multiple node instances:

  • Copy a multi-node Vagrantfile from iosxrv-x64-vbox/vagrantfiles/simple-mixed-topo/Vagrantfile

  • Note that this Vagrantfile will pull the ubuntu VM from Atlas.

  • Add the box to Vagrant and bring up the topology:

    vagrant box add --name 'IOS XRv' iosxrv-fullk9-x64.box --force
    vagrant up
    
  • To access opernns App Hosting / XR Linux spaces:

    vagrant ssh rtr1
    vagrant ssh rtr2
    
  • To access XR Console:

    # List the ports assigned to a given node
    vagrant port rtr2
    # Then do: ssh vagrant@localhost -p <port from above>
    # E.g: ssh vagrant@localhost -p 2223
    # Repeat for each node
    
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].