Skip to content

Instantly share code, notes, and snippets.

@John-Lin
Created May 2, 2017 07:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save John-Lin/0bbbca29dfaedbe7619c7fbae94dbbdc to your computer and use it in GitHub Desktop.
Save John-Lin/0bbbca29dfaedbe7619c7fbae94dbbdc to your computer and use it in GitHub Desktop.
OVS with Docker Networking
#!/usr/bin/env bash
apt-get update
apt-get install -y vim tree htop git
apt-get install -y openvswitch-switch
# Install docker-engine
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
apt-get update
apt-get install -y docker-engine
# Download ovs-docker shell
wget https://raw.githubusercontent.com/openvswitch/ovs/master/utilities/ovs-docker -P /usr/local/bin
chmod a+rwx /usr/local/bin/ovs-docker
# Download pipework
wget https://raw.githubusercontent.com/jpetazzo/pipework/master/pipework -P /usr/local/bin
chmod a+rwx /usr/local/bin/pipework
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provider "virtualbox" do |vb|
vb.customize ['modifyvm', :id, '--nictype1', 'Am79C973']
vb.customize ['modifyvm', :id, '--nicpromisc1', 'allow-all']
end
config.vm.provision :shell, path: "bootstrap.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment