1. 程式人生 > >Build OpenVSwitch and OVN

Build OpenVSwitch and OVN

master rpm evel star png 3.x fix check load

OVN 作為OpenVSwitch的功能模塊,每次OVN與OpenVSwitch一起發布,OVN與OpenVSwitch源代碼放在ovs代碼庫:https://github.com/openvswitch/ovs.git

Build OpenVSwitch and OVN

 1 # *Linux Environment: CentOS 73.10.0-327.18.2.el7.x86_64)
 2   
 3 # Install depen package
 4 yum install gcc make python-devel openssl-devel kernel-devel graphviz 
5 kernel-debug-devel autoconf automake rpm-build redhat-rpm-config 6 libtool checkpolicy selinux-policy-devel 7 8 # Download code 9 git clone https://github.com/openvswitch/ovs.git 10 11 # Start build 12 cd $OVS_DIR 13 # Bootstrapping 14 ./boot.sh 15 # Configuring (special --prefix and --with-linux e.g ./configure --with-linux=/lib/modules/$(uname
-r)/build) 16 ./configure 17 #Build 18 make 19 20 # 安裝方式一 源代碼安裝 21 make install 22 ## Install kernel modules 23 make modules_install 24 ## Start service 25 ### Start openvswitch service 26 /usr/local/share/openvswitch/scripts/ovs-ctl start --system-id=random 27 ### Start ovn-northd 28 /usr/local/share/openvswitch/scripts/ovn-ctl start_northd
29 ### Start ovn-controller 30 /usr/local/share/openvswitch/scripts/ovn-ctl start_controller 31 32 # 安裝方式二 RPM包安裝 33 ## Package RPM openvswitch and ovn 34 make rpm-fedora RPMBUILD_OPT="--without check" 35 ## Build kernel OVS Tree Datapath (specila kernal version, e.g make rpm-fedora-kmod RPMBUILD_OPT=-D "kversion 4.3.4-300.fc23.x86_64") 36 make rpm-fedora-kmod 37 ## Look for rpm from $OVS_DIR/rpm/rpmbuild/RPMS/x86_64 38 ### Install kernel OVS Tree Datapath 39 yum localinstall openvswitch-kmod-2.6.90-1.el7.centos.x86_64.rpm 40 ### Install OVS 41 yum localinstall openvswitch-2.6.90-1.el7.centos.x86_64.rpm 42 ### Install OVN 43 #### Install ovn common package 44 yum localinstall openvswitch-ovn-common-2.6.90-1.el7.centos.x86_64.rpm 45 #### Install ovn northd service 46 yum localinstall openvswitch-ovn-central-2.6.90-1.el7.centos.x86_64.rpm 47 #### Install ovn controller service 48 yum localinstall openvswitch-ovn-host-2.6.90-1.el7.centos.x86_64.rpm 49 ## Start service 50 ### Start openvswitch service 51 systemctl start openvswitch.service 52 ### Start ovn-northd 53 systemctl start ovn-northd 54 ### Start ovn-controller 55 systemctl start ovn-controller

使用NAT功能(基於Connection tracking),需要安裝OVS Tree Datapath。

技術分享

技術分享

參考文檔

https://github.com/openvswitch/ovs/blob/master/Documentation/faq/releases.rst

https://github.com/openvswitch/ovs/blob/master/Documentation/intro/install/fedora.rst

Build OpenVSwitch and OVN