简介
本文档介绍在本地实验室中安装Cisco Routed PON Manager软件的步骤。
先决条件
要求
- Linux服务器环境知识
- Linux文本编辑器的知识
- Linux工具- openssh-server、net-tools、ntpd
使用的组件
- Linux虚拟机(VM)
- 2 个 vCPU
- 8GB RAM
- 20 GB空间(最小)
- Ubuntu 20.04.06液晶
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
配置
虚拟机
工具
本文档首先假定已配置VM进行访问,已安装Ubuntu操作系统(OS)并已配置网络连接,已安装“要求”中列出的工具,并且已下载路由PON zip文件。为简单起见,我们提供了Ubuntu apt命令来下载和安装推荐的工具。
sudo apt install net-tools
sudo apt install openssh-server
sudo apt install ntpd
拆包
1)创建安装目录,将路由PON 24.1.2 zip文件解压缩到。
rpon@rpon-mgr:~$ mkdir Routed_PON_24_1_2
2)将Cisco_Routed_PON_24_1_2_Release.zip解压缩到分配的目录中。
rpon@rpon-mgr:~/PON_Mgr_24_1_2$ unzip Cisco_Routed_PON_24_1_2_Release.zip
Archive: Cisco_Routed_PON_24_1_2_Release.zip
inflating: PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign.tar.gz
inflating: PON_MANAGER_SIGNED_CCO/README
inflating: PON_MANAGER_SIGNED_CCO/verify.tar.gz
3)将目录(cd)更改为新创建的PON_MANAGER_SIGNED_CCO文件夹并列出(ls)文件。
rpon@rpon-mgr:~/PON_Mgr_24_1_2/PON_MANAGER_SIGNED_CCO$ ls -la
total 29120
drwxrwxr-x 2 rpon rpon 4096 Jun 13 09:26 .
drwxrwxr-x 3 rpon rpon 4096 Jun 13 09:26 ..
-rw-rw-r-- 1 rpon rpon 29792662 Mar 15 05:21 R4.0.0-Cisco-UB2004-sign.tar.gz
-rw-rw-r-- 1 rpon rpon 1966 Mar 15 05:21 README
-rw-rw-r-- 1 rpon rpon 11502 Mar 15 05:21 verify.tar.gz
注意:列出的自述文件说明了文件验证过程。此安装演练过程中不执行此步骤。
4)使用tar -xvf R4.0.0-Cisco-UB2004-sign.tar.gz解压缩R4.0.0-Cisco-UB2004-sign.tar.gz文件。
rpon@rpon-mgr:~/PON_Mgr_24_1_2/PON_MANAGER_SIGNED_CCO$ tar -xvf R4.0.0-Cisco-UB2004-sign.tar.gz
R4.0.0-Cisco-UB2004-sign/
R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004.tar.gz.signature
R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004.tar.gz
5) CD转到R4.0.0-Cisco-UB2004-sign目录并列出文件。
rpon@rpon-mgr:~/PON_Mgr_24_1_2/PON_MANAGER_SIGNED_CCO$ cd R4.0.0-Cisco-UB2004-sign/
rpon@rpon-mgr:~/PON_Mgr_24_1_2/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign$ ls -la
total 29112
drwxr-xr-x 2 rpon rpon 4096 Mar 15 04:51 .
drwxrwxr-x 3 rpon rpon 4096 Jun 13 09:26 ..
-rw-r--r-- 1 rpon rpon 29796139 Mar 15 04:51 R4.0.0-Cisco-UB2004.tar.gz
-rw-r--r-- 1 rpon rpon 3546 Mar 15 04:51 R4.0.0-Cisco-UB2004.tar.gz.signature
6) Untar R4.0.0-Cisco-UB2004-tar.gz via tar -xvf R4.0.0-Cisco-UB2004.tar.gz。
rpon@rpon-mgr:~/PON_Mgr_24_1_2/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign$ tar -xvf R4.0.0-Cisco-UB2004.tar.gz
---- snipped for brevity -----
7)现在已为此目录创建一个名为R4.0.0-Cisco-UB2004 CD的新目录。
注意:这是要安装、卸载、检查状态和其他PON控制器JSON文件的Shell脚本的位置。
rpon@rpon-mgr:~/PON_Mgr_24_1_2/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ ls -la
total 116
drwxr-xr-x 7 rpon rpon 4096 Mar 14 11:11 .
drwxr-xr-x 3 rpon rpon 4096 Jun 13 09:26 ..
-rw-r--r-- 1 rpon rpon 8196 Mar 14 11:10 .DS_Store
-rwxr-xr-x 1 rpon rpon 13650 Mar 14 11:10 get-support-info.sh
drwxr-xr-x 3 rpon rpon 4096 Mar 14 11:10 grafana_dashboards
-rwxr-xr-x 1 rpon rpon 25392 Mar 14 11:10 install.sh
-rw-r--r-- 1 rpon rpon 1493 Mar 14 11:11 PonCntlInit.json
drwxr-xr-x 2 rpon rpon 4096 Mar 14 11:10 R4.0.0-Firmware
drwxr-xr-x 5 rpon rpon 4096 Mar 14 11:14 R4.0.0-Netconf-UB2004
drwxr-xr-x 6 rpon rpon 4096 Mar 14 11:14 R4.0.0-PonManager-UB2004
-rw-r--r-- 1 rpon rpon 7949 Mar 14 11:11 README.txt
-rwxr-xr-x 1 rpon rpon 2349 Mar 14 11:10 status.sh
drwxr-xr-x 2 rpon rpon 4096 Mar 14 11:10 tools
-rwxr-xr-x 1 rpon rpon 2245 Mar 14 11:10 uninstall.sh
-rwxr-xr-x 1 rpon rpon 8605 Mar 14 11:11 upgrade.sh
安装
查看README.txt文件,了解安装步骤。此安装使用选项2进行新安装。
rpon@rpon-mgr:~/PON_Mgr_24_1_2/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ cat README.txt
--- snipped for brevity ---
Option 2: New Installation
===========================
Step 1 : Verify System Requirements:
------------------------------------
a) Verify system is running ubuntu version 20.04
user@system:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: bionic
b) Verify the ethernet interfaces are configured on the ubuntu system
1) Look for your Ethernet Interfaces: "ifconfig" or "ip a". <<< make note of interfaces listed >>>
2) There are multiple ways to configure interfaces on Ubuntu 18.04 and 20.04
3) The simplest way is via Netplan
4) Netplan is located in the /etc/netplan directory
5) There will be a file similar in name to "01-network-manager-all.yaml"
6) Edit this file with your favorite editor such as "nano" or "vi"
c) user@system:~$ sudo nano /etc/netplan/<net-plan-name>.yaml
Sample Netplan text <<< Make sure indentation is consistent >>>
network:
version: 2
renderer: NetworkManager
ethernets:
eno1: <<< MCMS IP Interface >>>
dhcp4: no <<< No DHCP >>>
dhcp6: no <<< No DHCP >>>
addresses: [172.16.41.5/24] <<< Static IPv4 >>>
gateway4: 172.16.41.1 <<< IPv4 default Gateway >>>
nameservers: <<< DNS Addresses >>>
vlans: <<< Configured VLANs >>>
vlan4090: <<< "l2EthInterfaceName" VLAN named vlan4090 assigned to PON Controller Interface >>>
id: 4090 <<< VLAN number >>>
link: eno2 <<< PON Controller Interface >>>
d) After finished editing, Save and exit, then enter "netplan apply" to enable new configuration.
e) Verify ubuntu system has connectivity to Internet
Step 2 : Installation
---------------------
a) Run the installation script "install.sh":
user@system:<install_directory>/R4.0.0-UB2004$ sudo ./install.sh -e <l2EthInterfaceName>
This script will do the following:
• Install MongoDB
• Install MCMS PON Manager
• Install MCMS Netconf Server
• Install PON Controller and UMT Relay (using the Ethernet interface specificed)
Required:
-e <l2EthInterfaceName> interface name of L2 port
Optional:
-d <databaseIpAaddress> IP address of MongoDB database
-n <databaseName> MongoDB database name for PON Manager
-m Install only PonManager/MongoDB/NETCONF
-c Install only PonController
defaults:
-d <databaseIpAddress> = 127.0.0.1
-n <databaseName> = tibit_pon_controller
Informational: How to verify all processes are running
=======================================================
a) Verify MongoDB is running
user@system:~$ sudo systemctl status mongod.service
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-08-30 11:56:38 PDT; 3 days ago
Main PID: 15035 (mongod)
CGroup: /system.slice/mongod.service
└─15035 /usr/bin/mongod --config /etc/mongod.conf
b) Verify MCMS PON Manager Apache Web Server is running
user@system:~$ sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Fri 2019-08-16 15:19:09 PDT; 1 weeks 2 days ago
Process: 2981 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
Main PID: 8471 (apache2)
---- Removed addtional information regarding PON Controller as this is installed in the XR Router so these instructions do not apply to the VM. ---
Netplan
使用linux文本文件编辑器(nano、vi),使用安装文件夹README.txt中提供的模板编辑/etc/netplan/目录中的YAML文件。填充特定于网络和虚拟机的IP信息。
rpon@rpon-mgr:~/PON-mgr-24.1.2/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ sudo nano /etc/netplan/01-network-manager-all.yaml
network:
version: 2
renderer: NetworkManager
network:
ethernets:
ens192: <- This VM's network adapter is ens192. If the default is NOT ens192, change this value to the desired network adapter
dhcp4: no
dhcp6: no
addresses: [IPv4 address and subnet]
gateway4: [V4Gateway]
nameservers:
addresses: [DNS Server(s)]
vlans:
vlan.4090:
id: 4090
link: [VM network adapter name]
注意:完成后,使用nano进行编辑;按Control + O保存文件,然后按Control X退出nano。在VIM中,使用:wq!保存并退出。
注意:sudo netplan的用法—debug apply在测试应用程序之前的netplan时非常有用。
通过cat查看文件以验证netplan配置是否正确。此输出只是实验示例,请使用特定于网络的IP地址。完成并从文本编辑器中退出之后,请运行sudo netplan apply。
实验示例:
rpon@rpon-mgr:~/PON-mgr-24.1.2/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ cat /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
ethernets:
ens192:
dhcp4: no
dhcp6: no
addresses: [10.122.140.232/28]
gateway4: 10.122.140.225
nameservers:
addresses: [172.18.108.43,172.18.108.34]
vlans:
vlan4090:
id: 4090
link: ens192
rpon@rpon-mgr:~/PON-mgr-24.1.2/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ sudo netplan apply
程序包安装
使用所选参数执行安装。对于此安装,使用-e、-d和-m。根据README.txt, -e告知安装程序要使用的VM上的以太网接口, -d设置应用于mongo.conf文件以供MongoDB使用的IP, -m安装PON Manager、MongoDB和NETCONF。
示例:
sudo ./install.sh -e ens192 -d [IPaddr] -m
注意:如果是新VM,在添加和更新依赖项时,安装时间最多可以相差5分钟。安装完成后,将生成一条日志消息。
rpon@rpon-mgr:~/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ sudo ./install.sh -e ens192 -d 10.122.140.232 -m
--- Installation snipped for brevity ---
Installation complete!
MCMS Component Versions:
PON Manager: R4.0.0
PON NETCONF: R4.0.0
PON Controller: Not Installed
注意:PON控制器托管在XR路由器上,因此无需在VM上安装。
确认
服务状态检查
对已安装的服务执行状态检查,以验证它们是否通过位于同一安装目录中的status.sh脚本启动并正在运行。
注意:如果按照-m所示执行了完全安装,请验证列出的服务是否为up且处于运行状态。
- mongod.service
- apache2.service
- tibit-netopeer2-server.service
- tibit-netconf.service
示例:
rpon@rpon-mgr:~/PON-mgr-24.1.2/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ sudo ./status.sh
MCMS Component Versions:
PON Manager: R4.0.0
PON NETCONF: R4.0.0
PON Controller: Not Installed
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-06-12 19:45:37 EDT; 2min 49s ago
Main PID: 54731 (mongod)
Memory: 74.7M
CGroup: /system.slice/mongod.service
└─54731 /usr/bin/mongod --config /etc/mongod.conf
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-06-12 19:46:44 EDT; 1min 42s ago
Main PID: 62165 (apache2)
Tasks: 123 (limit: 9419)
Memory: 18.6M
CGroup: /system.slice/apache2.service
├─62165 /usr/sbin/apache2 -k start
├─62167 /usr/sbin/apache2 -k start
├─62168 /usr/sbin/apache2 -k start
└─62169 /usr/sbin/apache2 -k start
● tibit-netopeer2-server.service - Tibit Communications, Inc. Netopeer2 Server
Loaded: loaded (/lib/systemd/system/tibit-netopeer2-server.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-06-12 19:47:04 EDT; 1min 21s ago
Process: 63029 ExecStart=/opt/tibit/netconf/bin/start_netopeer2_server.sh (code=exited, status=0/SUCCESS)
Main PID: 63035 (netopeer2-serve)
Tasks: 7 (limit: 9419)
Memory: 5.4M
CGroup: /system.slice/tibit-netopeer2-server.service
└─63035 /opt/tibit/netconf/bin/netopeer2-server -v 1 -t 55
● tibit-netconf.service - Tibit Communications, Inc. NetCONF Server
Loaded: loaded (/lib/systemd/system/tibit-netconf.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-06-12 19:47:04 EDT; 1min 21s ago
Process: 63023 ExecStartPre=/opt/tibit/netconf/bin/shm_clean.sh (code=exited, status=0/SUCCESS)
Process: 63027 ExecStartPre=/opt/tibit/netconf/bin/sysrepocfg --copy-from startup -d running (code=exited, status=0/SUCCESS)
Main PID: 63028 (tibit-netconf)
Tasks: 17 (limit: 9419)
Memory: 49.4M
CGroup: /system.slice/tibit-netconf.service
├─63028 /opt/tibit/netconf/bin/tibit-netconf
└─63037 /opt/tibit/netconf/bin/tibit-netconf
11. 打开Internet浏览器并输入虚拟机的IP。
PON Manager登录屏幕
参考文档