# Copyright (c) 2025, Ciena Corporation

Version: R5.2.0

Option 1: Upgrade to R5.2.0
===========================

	Step 1: Upgrade
	---------------
		a) Run the upgrade script "upgrade.sh":

		  user@system:<install_directory>/R5.2.0-UB2004$ sudo ./upgrade.sh

			This script will do the following:
			•	Creates a backup of MongoDB
			•	Upgrades MCMS PON Manager
			•	Upgrades PON Controller and UMT Relay
			•	Upgrades Netconf server (if installed)


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 >>>
                      search: [local]                   <<< Search on local machine first >>>
                      addresses: [8.8.8.8, 8.8.4.4]     <<< external DNS servers >>>
                  eno2:                                 <<< PON Controller Interface >>>
                    dhcp4: no                           <<< No DHCP >>>
                    dhcp6: no                           <<< No DHCP >>>
                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>/R5.2.0-UB2004$ sudo ./install.sh -e <l2EthInterfaceName>

			This script will do the following:
			•	Install MongoDB (downloads from repo.mongo.org)
			•	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
		      ocs: https://docs.mongodb.org/manual
		 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)

	c) Verify PON Controller is running

		user@system:~/$ sudo systemctl status tibit-poncntl.service
		● tibit-poncntl.service - Tibit Communications, Inc. PON Controller
		   Loaded: loaded (/lib/systemd/system/tibit-poncntl.service; enabled; vendor preset: enabled)
		   Active: active (running) since Fri 2019-12-20 13:27:14 PST; 2min 45s ago
		 Main PID: 29363 (PonCntl)
		    Tasks: 7 (limit: 4915)
		   CGroup: /system.slice/tibit-poncntl.service
		           ├─29363 /opt/tibit/poncntl/PonCntl
		           └─29371 /opt/tibit/poncntl/PonCntl


Informational: How to Restart Processes
=======================================

	a) Restart PON Controller

		user@system:~$ sudo systemctl restart tibit-poncntl.service

	b) Restart MongoDB

		user@system:~$ sudo systemctl restart mongod.service

	c) Restart PON Manager/Apache Web Server

		user@system:~$ sudo systemctl restart apache2.service

====================================
Below is a list of commands for administering the PON Controller software.

Use the following command to start the PON Controller:

    systemctl start tibit-poncntl

Use the following command to restart the PON Controller:

    systemctl restart tibit-poncntl

Use the following command to stop the PON Controller:

    systemctl stop tibit-poncntl

Use the following command to check the status of the PON Controller:

    systemctl status tibit-poncntl

Use the following command to view log messages generated by the PON Controller process:

    tail -f /var/log/tibit/ponCntl.log

Use the following command to display the most recent console messages logged by
the PON Controller process:

    journalctl -r -u tibit-poncntl

Use the following command to \"tail\" console messages logged by the PON Controller
process (similar to tail -f):

    journalctl -f -u tibit-poncntl

Note: The systemd journaling system logs both console messages (stdout and stderr) and
Syslog messages from PON Controller process by default. Disable either Console or Syslog
logging in the PON Controller Configuration in MongoDB (CNTL-CFG) to avoid the duplicate
log messages.
