簡介
本文檔介紹本地實驗室中思科路由PON管理器軟體的安裝過程。
必要條件
需求
- 瞭解Linux伺服器環境
- 對Linux文本編輯器的認識
- Linux工具 — openssh-server、net-tools、ntpd
採用元件
- Linux虛擬機器(VM)
- 2個vCPU
- 8GB RAM
- 20 GB空間(最小)
- Ubuntu 20.04.06液位塔
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
組態
虛擬機器
工具
本文檔首先假設已配置虛擬機器以進行訪問,已安裝Ubuntu作業系統(OS)並配置了網路連線,已安裝「要求」中列出的工具,並且已下載路由PON zip檔案。為方便起見,我們提供了Ubuntu apt命令來下載和安裝推薦的工具。
sudo apt install net-tools
sudo apt install openssh-server
sudo apt install ntpd
拆包
1)建立安裝目錄,解壓縮Routed 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檔案的tar。
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(通過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檔案的IP以供MongoDB使用, -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指示執行了完全安裝,請驗證列出的服務是否啟動並處於運行狀態。
- 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管理器登入螢幕
參考文檔