Skip to content

Instantly share code, notes, and snippets.

@shettyg
Last active September 28, 2016 21:07
Show Gist options
  • Save shettyg/df481a90523d96a4c000ff36a31af382 to your computer and use it in GitHub Desktop.
Save shettyg/df481a90523d96a4c000ff36a31af382 to your computer and use it in GitHub Desktop.
Diff
diff --git a/vagrant/provisioning/setup-master.sh b/vagrant/provisioning/setup-master.sh
index 02add50..40c67cc 100755
--- a/vagrant/provisioning/setup-master.sh
+++ b/vagrant/provisioning/setup-master.sh
@@ -19,24 +19,25 @@ MASTER_SUBNET=$4
# FIXME(mestery): Remove once Vagrant boxes allow apt-get to work again
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update
+sudo apt-get build-dep dkms
sudo apt-get install -y graphviz autoconf automake bzip2 debhelper dh-autoreconf \
libssl-dev libtool openssl procps python-all \
- python-twisted-conch python-zopeinterface python-six
-
+ python-twisted-conch python-zopeinterface python-six \
+ dkms
git clone https://github.com/openvswitch/ovs.git
pushd ovs/
sudo DEB_BUILD_OPTIONS='nocheck parallel=2' fakeroot debian/rules binary
# Install OVS/OVN debs
popd
+sudo dpkg -i openvswitch-datapath-dkms_2.6.90-1_all.deb
sudo dpkg -i openvswitch-switch_2.6.90-1_amd64.deb openvswitch-common_2.6.90-1_amd64.deb \
ovn-central_2.6.90-1_amd64.deb ovn-common_2.6.90-1_amd64.deb \
python-openvswitch_2.6.90-1_all.deb ovn-docker_2.6.90-1_amd64.deb \
- ovn-host_2.6.90-1_amd64.deb openvswitch-datapath-dkms_2.6.90-1_all.deb
+ ovn-host_2.6.90-1_amd64.deb
# Start the daemons
-sudo /etc/init.d/openvswitch-switch stop
-sudo /etc/init.d/openvswitch-switch start
+sudo /etc/init.d/openvswitch-switch force-reload-kmod
sudo /usr/share/openvswitch/scripts/ovn-ctl stop_northd
sudo /usr/share/openvswitch/scripts/ovn-ctl start_northd
@@ -52,9 +53,6 @@ sudo /usr/share/openvswitch/scripts/ovn-ctl start_controller
# Set k8s API server IP
sudo ovs-vsctl set Open_vSwitch . external_ids:k8s-api-server="0.0.0.0:8080"
-# Create br-int
-sudo ovs-vsctl add-br --may-exist br-int
-
# Install OVN+K8S Integration
sudo apt-get install -y python-pip
sudo -H pip install --upgrade pip
diff --git a/vagrant/provisioning/setup-minion.sh b/vagrant/provisioning/setup-minion.sh
index dfb8d35..815c6e0 100755
--- a/vagrant/provisioning/setup-minion.sh
+++ b/vagrant/provisioning/setup-minion.sh
@@ -21,9 +21,11 @@ MINION_SUBNET=$5
# FIXME(mestery): Remove once Vagrant boxes allow apt-get to work again
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update
+sudo apt-get build-dep dkms
sudo apt-get install -y graphviz autoconf automake bzip2 debhelper dh-autoreconf \
libssl-dev libtool openssl procps python-all \
- python-twisted-conch python-zopeinterface python-six
+ python-twisted-conch python-zopeinterface python-six \
+ dkms
git clone https://github.com/openvswitch/ovs.git
pushd ovs/
@@ -31,14 +33,13 @@ sudo DEB_BUILD_OPTIONS='nocheck parallel=2' fakeroot debian/rules binary
# Install OVS/OVN debs
popd
+sudo dpkg -i openvswitch-datapath-dkms_2.6.90-1_all.deb
sudo dpkg -i openvswitch-switch_2.6.90-1_amd64.deb openvswitch-common_2.6.90-1_amd64.deb \
ovn-common_2.6.90-1_amd64.deb python-openvswitch_2.6.90-1_all.deb \
- ovn-docker_2.6.90-1_amd64.deb ovn-host_2.6.90-1_amd64.deb \
- openvswitch-datapath-dkms_2.6.90-1_all.deb
+ ovn-docker_2.6.90-1_amd64.deb ovn-host_2.6.90-1_amd64.deb
# Start the daemons
-sudo /etc/init.d/openvswitch-switch stop
-sudo /etc/init.d/openvswitch-switch start
+sudo /etc/init.d/openvswitch-switch force-reload-kmod
sudo ovs-vsctl set Open_vSwitch . external_ids:ovn-remote="tcp:$MASTER_OVERLAY_IP:6642" \
external_ids:ovn-nb="tcp:$MASTER_OVERLAY_IP:6641" \
@@ -52,9 +53,6 @@ sudo /usr/share/openvswitch/scripts/ovn-ctl start_controller
# Set k8s API server IP
sudo ovs-vsctl set Open_vSwitch . external_ids:k8s-api-server="$MASTER_OVERLAY_IP:8080"
-# Create br-int
-sudo ovs-vsctl add-br --may-exist br-int
-
# Install OVN+K8S Integration
sudo apt-get install -y python-pip
sudo -H pip install --upgrade pip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment