zoukankan      html  css  js  c++  java
  • OVN简单部署

    部署OVN实验环境

    网络拓扑

    ### Central节点
    # cat ifcfg-eth0
    TYPE=Ethernet
    BOOTPROTO=static
    DEFROUTE=yes
    PEERDNS=yes
    NAME=eth0
    DEVICE=eth0
    ONBOOT=yes
    IPADDR=192.168.30.100
    NETMASK=255.255.255.0
    GATEWAY=192.168.30.2
    DNS1=114.114.114.114
    
    ### Node节点
    # cat ifcfg-eth0
    TYPE=Ethernet
    BOOTPROTO=static
    DEFROUTE=yes
    NAME=eth0
    DEVICE=eth0
    ONBOOT=yes
    IPADDR=192.168.30.101
    NETMASK=255.255.255.0
    GATEWAY=192.168.30.2
    DNS1=114.114.114.114
    

    安装软件包

    ### Central节点
    # wget -O /etc/yum.repos.d/ovs.repo https://copr.fedorainfracloud.org/coprs/leifmadsen/ovs-stable-release/repo/epel-7/leifmadsen-ovs-stable-release-epel-7.repo
    # yum install -y openvswitch-ovn-central.x86_64 openvswitch-ovn-host.x86_64
    # systemctl enable ovn-northd openvswitch ovn-controller
    # systemctl start ovn-northd ovn-controller
    ### 关闭防火墙和SELINUX
    # systemctl stop firewalld
    # systemctl disable firewalld
    
    ### Node节点
    # wget -O /etc/yum.repos.d/ovs.repo https://copr.fedorainfracloud.org/coprs/leifmadsen/ovs-stable-release/repo/epel-7/leifmadsen-ovs-stable-release-epel-7.repo
    # yum install -y openvswitch.x86_64 openvswitch-ovn-host.x86_64
    # systemctl enable openvswitch ovn-controller
    # systemctl start ovn-controller
    ### 关闭防火墙和SELINUX
    # systemctl stop firewalld
    # systemctl disable firewalld
    

    配置OVN

    ### Central节点
    # ovn-nbctl set-connection ptcp:6641:192.168.30.100
    # ovn-sbctl set-connection ptcp:6642:192.168.30.100
    # netstat -lntp
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd
    tcp        0      0 192.168.30.100:6641     0.0.0.0:*               LISTEN      1488/ovsdb-server
    tcp        0      0 192.168.30.100:6642     0.0.0.0:*               LISTEN      1496/ovsdb-server
    # ovs-vsctl set open . external-ids:ovn-remote=tcp:192.168.30.100:6642
    # ovs-vsctl set open . external-ids:ovn-encap-type=geneve
    # ovs-vsctl set open . external-ids:ovn-encap-ip=192.168.30.100
    # netstat -antp | grep ovn-controller
    tcp        0      0 192.168.30.100:38926    192.168.30.100:6642     ESTABLISHED 1482/ovn-controller
    
    ### Node节点
    # ovs-vsctl set open . external-ids:ovn-remote=tcp:192.168.30.100:6642
    # ovs-vsctl set open . external-ids:ovn-encap-type=geneve
    # ovs-vsctl set open . external-ids:ovn-encap-ip=192.168.30.101
    # netstat -antp | grep ovn-controller
    tcp        0      0 192.168.30.101:42020    192.168.30.100:6642     ESTABLISHED 1484/ovn-controller
    
  • 相关阅读:
    CSS 专业技巧
    MyBatisPlus大于等于、小于等于等等函数
    最新国内手机号校验正则表达式
    前端自动化测试----百度搜索功能实战
    pytest:数据驱动;结合allure生成测试报告
    pytest:参数化用例
    pytest:多线程并行和分布式执行;结合pytest-html生成测试报告
    pytest:自动执行fixture;fixture传递参数
    pytest:conftest.py文件
    pytest:通过scope控制fixture的作用范围
  • 原文地址:https://www.cnblogs.com/silvermagic/p/7666134.html
Copyright © 2011-2022 走看看