First, disclaimer: I’m an HP employee. HP’s a major contributor to the OpenSwitch project. Just thought you should know in case you think that affects my opinion here.
If you need more info on the OpenSwitch project, you can check out the first post in this series here.
Getting our hands dirty
This section comes down into three steps, if you don’t follow these steps, you won’t succeed. I’m not going to go into details on these steps as I’m assuming you can figure this out if you found this blog. 🙂
– Install Virtual Box
– Install Vagrant
– Install Docker Toolbox
I’m running OpenSwitch on a Windows box in this case as the documentation covers the ‘IX build. I’m running on this natively on OSX which also means that I’ve got to install the docker toolbox plugin to get docker containesr to work. I’m also assuming that you’ve already installed Virtual Box and Vagrant for the following section.
Installing Vagrant Plugin
From a terminal window, run the vagrant plugin install vagrant-reload command from the CLI. This should show the following output.
Installing the OpenSwitch Dev Environment
For this section, I’m assuming you have already downloaded the vagrant files from here into your working directory.
Running the Docker Toolbox Plugin
Run the Docker QuickStart Terminal application and wait for the virtual box image to come to a running state. You should be able to see the following
From the terminal, navigate to where you have unzipped the OpenSwitch vagrant files that you downloaded from here. Run vagrant up command from the CLI. At this point some magic happens ( read more on Vagrant here if you’ve never worked with this tool before. Magic is obviously not magic, but I just don’t feel like explaining the whole process in this post. )
On a OSX box, you’re not running as root so you may end up with the following window
If you hit this, don’t worry, just SUDO it!
Accessing the OpenSwitch
From the same terminal window issue the sudo vagrant ssh command to be able to access the shell (CLI) of the OpenSwitch.
If you are successful, you should see the following output. Notice the shell has changed to vagrant@switch
Accessing the network interface
From the vagrant@switch prompt, issue the sudo vtysh command and you will now have access to an industry standard hierarchical CLI like we all know and love!
My thoughts so far
Getting this up and running has been relatively painless. There were a couple of small things to get it running that were particular to OSX which was not covered on the OpenSwitch quick start guide. Nothing that a little patience and google didn’t help me cover in a few minutes though. The install experience was pretty easy. The guides were pretty accurate and the getting this up and running should be something most of us can follow without much trouble.
OpenSwitch doesn’t have what I would call a robust network stack at this point in time, but we’re still really early in this world. Now that I’ve got it up and running, I’m looking forward to starting to look at the alternate interfaces such as OVSDB and REST as described here.
Anyone else got this up and running yet? Thoughts? Let me know in the comments below!
7 thoughts on “Installing OpenSwitch”
On Windows, the command prompt or other terminal/shell program used (I use Babun) must be ‘Run as Administrator’ or failures occur with copious Ruby level output.
I also faced network related issues, with errors around vagrant being unable to find the new Host Only adapter it creates (and it does create it). In the end I had to add a line (and a comma at the end of the proceeding one) like so in the …/host/Vagrantfile:
config.vm.network “private_network”, type: “dhcp”,
Virtualbox automatically creates the internal network specified (openswitch).
A few failed vagrant up attempts later (probably due to apt-get install issues) it finally worked.
Oddly I don’t see a VM running in VirtualBox (although one called ops-host was created initially).
Thanks for the comments. I’ll give this a go on wi cows and see how it comes out. My only windows box has a corporate build on it, so it’s less than reliable with e host based firewall and IPS. Leads to some interesting problems which I’d rather not deal with. 🙂
Might have to spin up a VM to test.
It would be nice if I could just run this as a Docker container rather than get the whole ‘development environment’ but I well understand the reasons it is that way right now. If you know of an easy way, do let me know. I’ve got the Docker base image (via a pull of openswitch/genericx86-64) but can’t get it to start, will dig some more.
I’ll do some digging and see what I can find out. Looks like there’s an IRC chat on Friday so maybe I’ll ask there.
Brave new world!
Is there documentation on how to run openswitch on mininet?
Thanks! It’s definitely an interesting project.
The documentation is definitely one place in the project that could use some work. I don’t think my coding skills are good enough yet to contribute to the project in lines of code, but I’m hoping to take a crack at helping to improve some of the docs while I continue on this journey.
I know there’s a Docker image that uses mininet, but I didn’t see the docs for it on the website. I would suggest either hitting up the IRC channel or the mailing list to see if someone on the development team can put some rough docs together?
Hoping to spend some additional time next week again with OpenSwitch. If the day job allows me the time I’m hoping for another couple of posts.
Sorry. Just saw this. I’ll see if I can put something together.