运维调试记录:Ubuntu14.04下部署Opendaylight Nitrogen集群


建议参考官网教程:Setting Up Clustering


一、实验环境

  • 主机节点系统版本: Ubuntu 14.04 (64bit)
odl@mpodl:~$ uname -a
Linux mpodl 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  • 主机节点硬件配置:单核CPU+4GB内存+50GB硬盘
odl@mpodl:~$ sudo lshw        
    description: Computer
    product: Standard PC (i440FX + PIIX, 1996) ()
    vendor: QEMU
    version: pc-i440fx-trusty
    width: 64 bits
    capabilities: smbios-2.4 dmi-2.4 vsyscall32
    configuration: boot=normal uuid=053D43B6-2E3C-CEA4-4C52-833DDD1749BE
  *-core
       description: Motherboard
       physical id: 0
     # CPU信息 
     *-cpu
          description: CPU
          product: QEMU Virtual CPU version 2.0.0
          vendor: Intel Corp.
          physical id: 401
          bus info: cpu@0
          slot: CPU 1
          size: 2GHz
          capacity: 2GHz
          width: 64 bits
     # 内存信息
     *-memory
          description: System Memory
          physical id: 1000
          size: 4GiB
     # 硬盘信息
     *-disk
           description: ATA Disk
           product: QEMU HARDDISK
           physical id: 0.0.0
           bus info: scsi@0:0.0.0
           logical name: /dev/sda
           version: 0
           serial: QM00001
           size: 50GiB (53GB)
           *-volume:0
                description: EXT4 volume
                vendor: Linux
                physical id: 1
                bus info: scsi@0:0.0.0,1
                logical name: /dev/sda1
                logical name: /
                version: 1.0
                serial: 65d80188-ddfb-4f08-8018-a0c2e1da8af3
                size: 46GiB
                capacity: 46GiB
           *-volume:1
                description: Extended partition
                physical id: 2
                bus info: scsi@0:0.0.0,2
                logical name: /dev/sda2
                size: 4093MiB
                capacity: 4093MiB
  • 集群环境:3台主机节点
Cluster_Node1: Ubuntu 14.04 -- [IP_Addr]=192.168.1.124
Cluster_Node2: Ubuntu 14.04 -- [IP_Addr]=192.168.1.125
Cluster_Node3: Ubuntu 14.04 -- [IP_Addr]=192.168.1.104

二、部署方法

1. 下载Opendaylight Nitrogen

在每台主机节点上执行如下命令,下载tar.gz格式的压缩包到用户目录下的ODL_N子目录:

odl@mpodl:~/ODL_N$ wget -P . https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/karaf/0.7.2/karaf-0.7.2.tar.gz

或在官网下载,然后通过xftp软件从本地上传到服务器的Opendaylight运行环境中。

官网地址:https://www.opendaylight.org/technical-community/getting-started-for-developers/downloads-and-documentation

2. 安装Opendaylight Nitrogen

在每台主机节点上执行如下命令,解压压缩包到ODL_N子目录:

odl@mpodl:~/ODL_N$ tar -zxvf karaf-0.7.2.tar.gz

解压完成,即认为Opendaylight Nitrogen安装成功。

3. 配置Opendaylight Nitrogen集群

在每台主机节点下执行如下命令,完成集群脚本配置工作:

命令格式:sudo bash ./karaf-0.7.2/bin/configure_cluster.sh [index] [seed_node_list]

其中,[index]为正整数,表示在[seed_node_list]中对应哪个主机节点上配置集群脚本。另外,[seed_node_list]是组成集群的各个主机节点对应的IP地址列表,以空格或逗号隔开。

因此,具体执行命令如下:

# Cluster_Node1: IP=192.168.1.124
odl@mpodl:~/ODL_N$ sudo bash ./karaf-0.7.2/bin/configure_cluster.sh 1 192.168.1.124 192.168.1.125 192.168.1.104

# Cluster_Node2: IP=192.168.1.125
odl@mpodl:~/ODL_N$ sudo bash ./karaf-0.7.2/bin/configure_cluster.sh 2 192.168.1.124 192.168.1.125 192.168.1.104

# Cluster_Node3: IP=192.168.1.104
odl@mpodl:~/ODL_N$ sudo bash ./karaf-0.7.2/bin/configure_cluster.sh 3 192.168.1.124 192.168.1.125 192.168.1.104

当执行完之后,结果如下所示:

# Cluster_Node1: IP=192.168.1.124
odl@mpodl:~/ODL_N$ sudo bash ./karaf-0.7.2/bin/configure_cluster.sh 1 192.168.1.124 192.168.1.125 192.168.1.104
################################################
##             Configure Cluster              ##
################################################
Configuring unique name in akka.conf
Configuring hostname in akka.conf
Configuring data and rpc seed nodes in akka.conf
modules = [

    {
        name = "inventory"
        namespace = "urn:opendaylight:inventory"
        shard-strategy = "module"
    },
    {
        name = "topology"
        namespace = "urn:TBD:params:xml:ns:yang:network-topology"
        shard-strategy = "module"
    },
    {
        name = "toaster"
        namespace = "http://netconfcentral.org/ns/toaster"
        shard-strategy = "module"
    }
]
Configuring replication type in module-shards.conf
############
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值