Last active
December 29, 2023 06:59
-
-
Save shettyg/ca566545107eeec3665cd6f97718c18e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OVS/OVN installation on Centos: | |
============================== | |
# Get the kernel module RPM build for your specific kernels and install them on all the hosts. e.g: | |
sudo rpm -ivh kmod-openvswitch-2.8.2-1.el7.centos.x86_64.rpm openvswitch-kmod-2.8.2-1.el7.centos.x86_64.rpm | |
# Building the above kernel rpms. The instructions are at the below link. You only need to build the kernel module rpms. | |
# You can ignore about the need to read the fedora instructions for RHEL 7.x series. | |
http://docs.openvswitch.org/en/latest/intro/install/rhel/ | |
MASTER INSTALL OVS and OVN | |
========================== | |
if [ ! -f /etc/yum.repos.d/delorean-deps.repo ] ; then | |
curl https://trunk.rdoproject.org/centos7/delorean-deps.repo | sudo tee /etc/yum.repos.d/delorean-deps.repo | |
fi | |
sudo yum install -y openvswitch openvswitch-ovn-central openvswitch-ovn-host | |
sudo service openvswitch start | |
sudo service ovn-northd start | |
sudo service ovn-controller start | |
# Install git and pip | |
sudo yum install git python-pip -y | |
git clone https://github.com/shettyg/ovn-mesos | |
cd ovn-mesos | |
sudo pip install -r requirements.txt | |
sudo sh install_dcos.sh | |
# Dangerous next step. May loose mgmt connectivity. | |
sudo bin/ovn-mesos-util nics-to-bridge eth0 | |
cd .. | |
PREP ALL HOSTS (both agent and master) | |
================ | |
CENTRAL_IP=10.10.0.128 # This is the IP of the master | |
LOCAL_IP=10.10.0.128 # This is the IP of the host. In this example, we are running it on master. | |
ENCAP_TYPE=geneve | |
sudo ovs-vsctl set Open_vSwitch . external_ids:ovn-remote="tcp:$CENTRAL_IP:6642" \ | |
external_ids:ovn-nb="tcp:$CENTRAL_IP:6641" \ | |
external_ids:ovn-encap-ip=$LOCAL_IP \ | |
external_ids:ovn-encap-type="$ENCAP_TYPE" | |
# Below two commands only for master. For SSL, we will need more steps. | |
sudo ovn-nbctl set-connection ptcp:6641 | |
sudo ovn-sbctl set-connection ptcp:6642 | |
AGENT INSTALL OVS AND OVN | |
========================= | |
# The OVS kernel module. This rpm has to be built depending on the kernel version. | |
sudo rpm -ivh kmod-openvswitch-2.8.2-1.el7.centos.x86_64.rpm openvswitch-kmod-2.8.2-1.el7.centos.x86_64.rpm | |
modinfo openvswitch | |
if [ ! -f /etc/yum.repos.d/delorean-deps.repo ] ; then | |
curl https://trunk.rdoproject.org/centos7/delorean-deps.repo | sudo tee /etc/yum.repos.d/delorean-deps.repo | |
fi | |
sudo yum install -y openvswitch openvswitch-ovn-host | |
sudo service openvswitch start | |
sudo service ovn-controller start | |
# Install git and pip | |
sudo yum install git python-pip -y | |
git clone https://github.com/shettyg/ovn-mesos | |
cd ovn-mesos | |
sudo pip install -r requirements.txt | |
sudo sh install_dcos.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment