美文网首页
虚拟化-ovn入门到精通(二)

虚拟化-ovn入门到精通(二)

作者: 小白说互联网 | 来源:发表于2022-01-02 15:12 被阅读0次

    大家好,我是小白。 继续给大家分享一下openstack和kubernetes下热门的SDN技术ovn ,今天了解一下ovn的安装部署。

    ovn 安装部署

    基于CentOS 7 x86_64

    | 10.175.160.66 | Central | 网卡eth0/eth1 |

    | 10.175.160.59 | Node1 | 网卡eth0/eth1 | vm1/vm11 |

    | 10.175.160.60 | Node2 | 网卡eth0/eth1 | vm2/vm12 |

    一、 系统初始化

    配置repo源,ovn/ovs版本2.11.0

    #vim /etc/yum.repos.d/stein.repo

    [openstack-stein]

    name=OpenStack Stein Repository

    #baseurl=http://mirror.centos.org/centos/7/cloud/$basearch/openstack-stein/

    mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=cloud-openstack-stein

    gpgcheck=0

    enabled=1

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud

    关闭防火墙/selinux

    #systemctl stop firewalld

    #systemctl disable firewalld

    二、部署服务

    Central 节点

    # yum install -y openvswitch-ovn-central.x86_64 openvswitch-ovn-host.x86_64

    #yum install libibverbs -y

    # systemctl enable ovn-northd openvswitch ovn-controller

    # systemctl start ovn-northd ovn-controller

    Node节点

    # yum install -y openvswitch.x86_64 openvswitch-ovn-host.x86_64

    #yum install libibverbs -y

    #systemctl enable openvswitch ovn-controller

    #systemctl start ovn-controller

    三、 配置OVN

    配置ovs与ovn相连接

    central节点

    #export Centralip=10.175.160.66

    #ovn-nbctl set-connection ptcp:6641:$Centralip

    #ovn-sbctl set-connection ptcp:6642:$Centralip

    #netstat -ntlp

    #ovs-vsctl set open . external-ids:ovn-remote=tcp:$Centralip:6642

    overlay网络使用geneve,当然支持geneve,vxlan,gre等

    #ovs-vsctl set open . external-ids:ovn-encap-type=geneve

    #ovs-vsctl set open . external-ids:ovn-encap-ip=$Centralip

    node 1 节点

    #export Centralip=10.175.160.66

    #export NodeIP=10.175.160.59

    #ovs-vsctl set open . external-ids:ovn-remote=tcp:$Centralip:6642

    #ovs-vsctl set open . external-ids:ovn-encap-type=geneve

    #ovs-vsctl set open . external-ids:ovn-encap-ip=$NodeIP

    node2 节点

    #export Centralip=10.175.160.66

    #export NodeIP=10.175.160.60

    #ovs-vsctl set open . external-ids:ovn-remote=tcp:$Centralip:6642

    #ovs-vsctl set open . external-ids:ovn-encap-type=geneve

    #ovs-vsctl set open . external-ids:ovn-encap-ip=$NodeIP

    所有服务器重启一下

    #reboot

    至此安装完成~

    排错

    net_mlx5: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory

    net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5)

    PMD: net_mlx4: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory

    PMD: net_mlx4: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx4)

    解决:#yum install libibverbs -y

    相关文章

      网友评论

          本文标题:虚拟化-ovn入门到精通(二)

          本文链接:https://www.haomeiwen.com/subject/pmbzqrtx.html