Ciena PON Controller

  Copyright (c) 2022-2025 by Ciena Corporation, All Rights Reserved

This document provides instructions for installing the PON Controller binary package.


Install Steps
-------------

Use the following steps to install the PON Controller:

1. From a Linux shell, unpack the .zip file depending on the Ubuntu version and CPU architecture,
and change to the new unpacked directory.

    For Ubuntu 20.04 running on Intel/AMD-based systems:
        unzip 5.2.0-PonController-UB2004-amd64.zip
        cd R5.2.0-PonController-UB2004-amd64

    For Ubuntu 20.04 running on ARM-based systems:
        unzip 5.2.0-PonController-UB2004-arm64.zip
        cd R5.2.0-PonController-UB2004-arm64

    For Ubuntu 22.04 running on Intel/AMD-based systems:
        unzip 5.2.0-PonController-UB2204-amd64.zip
        cd R5.2.0-PonController-UB2204-amd64

    For Ubuntu 22.04 running on ARM-based systems:
        unzip 5.2.0-PonController-UB2204-arm64.zip
        cd R5.2.0-PonController-UB2204-arm64

    For Redhat Enterprise Linux 8 running on Intel/AMD-based sysystems:
        unzip 5.2.0-PonController-RHEL8-x86_64.zip
        cd R5.2.0-PonController-RHEL8-x86_64

2.
    a. (Ubuntu) Use 'apt' to install the PON Controller .deb package.
    Note: the installation requires root level privileges.

        sudo apt-get install ./tibit-poncntl_R5.2.0_amd64.deb

    b. (Red Hat) Use 'dnf' to install the PON Controller .rpm package.
    Note: the installation requires root level privileges.

        sudo dnf install ./tibit-poncntl-R5.2.0-rc99.el8.x86_64.rpm

3. Configure the network interface and Mongo Database settings in
'/etc/tibit/poncntl/PonCntlInit.json'.
    {
        "CNTL": {
            "Auth": false,
            "CFG Version": "R5.2.0",
            "DHCPv4": false,
            "UMT interface": "tibitvirt"
        },
        "DEBUG": {},
        "JSON": {
            "databaseDir": "/opt/tibit/poncntl/database/",
            "defaultDir": "/opt/tibit/poncntl/database/"
        },
        "Local Copy": {
            "CNTL-STATE": false,
            "OLT-STATE": false,
            "ONU-STATE": false
        },
        "Logging": {
            "Directory": "/var/log/tibit",
            "FileCount": 3,
            "FileSize": 10240000
        },
        "MongoDB": {
            "auth_db": "tibit_users",
            "auth_enable": false,
            "ca_cert_path": "/etc/tibit/ca.pem",
            "host": "127.0.0.1",
            "name": "tibit_pon_controller",
            "password": "",
            "port": "27017",
            "tls_enable": false,
            "username": "",
            "dns_srv": false,
            "db_uri": "",
            "replica_set_enable": false,
            "replica_set_name": "rs0",
            "replica_set_hosts":
                [
                "10.10.10.5:27017",
                "10.20.10.20:27999",
                "mongo02.example.com:17999"
                ]
        },
        "interface": "enp0s8.4090"
    }


Note that the "host" parameter has a dual syntax.

If db_uri is present and non-empty, then it overrides all other MongoDB settings.

If dns_srv==false and replica_set_enable==true then "replica_set_hosts" is used to get the MongoDB server IP/FQDN and port number.
If dns_srv==true, then "port" is ignored as the port number is acquired from the DNS SRV record.

If dns_srv=false, then "host" must contain an IP address or hostname that resolves to an IP address.
If dns_srv=true, then "host" must contain an FQDN that will be used to lookup SRV records for MongoDB. (See below)
If replica_set_enable=false, then replica_set_name and replica_set_hosts is ignored.
If replica_set_enable=true and dns_srv=false, then "host" is ignored and "replica_set_hosts" is used. "replica_set_hosts" will need to contain a list of host:port entries.
If replica_set_enable=true, replica_set_name must contain the name of the replicaSet parameter that is common to the members in the set.
If replica_set_enable=true, then replica_set_hosts must be configured OR dns_srv must be set to true and the "host" parameter must contain the FQDN to use to lookup the SRV records.


MongoDB SRV records:
To use DNS-based MongoDB server discovery, ensure that your DNS server is configured with SRV records with the form:

Record                            TTL   Class    Priority Weight Port  Target
_mongodb._tcp.server.example.com. 86400 IN SRV   0        5      27317 mongodb1.example.com.
_mongodb._tcp.server.example.com. 86400 IN SRV   0        5      27017 mongodb2.example.com.

See https://docs.mongodb.com/manual/reference/connection-string/ for more information



4. Import firmware, device pictures, and ONU service configuration files into the
database. To do this, change to the PON Controller installation directory and run
the JsonToMongo python script.

    cd /opt/tibit/poncntl/bin
    sudo ./JsonToMongo -c /etc/tibit/poncntl/PonCntlInit.json

5. Restart the Tibit PON Controller using Linux systemd scripts.

    sudo systemctl restart tibit-poncntl



Uninstall Steps
---------------

The uninstall process deletes the Tibit PON Controller binaries and configuration files. This
script completely removes the /etc/tibit/poncntl and /opt/tibit/poncntl directories from
the file system.

Uninstall steps:

1.
    a. (Ubuntu) Use 'apt' to uninstall the PON Controller service.
    Note: uninstall requires root level privileges.
    Note: this will completely remove the /etc/tibit/poncntl and /opt/tibit/poncntl directories.

        sudo apt-get purge tibit-poncntl

    b. (RedHat) Use 'dnf' to uninstall the PON Controller service.
    Note: uninstall requires root level privileges.
    Note: this will completely remove the /etc/tibit/poncntl and /opt/tibit/poncntl directories.

        sudo dnf remove tibit-poncntl

2. If you see the following warning during 'apt-get purge', use 'rm -rf /opt/tibit/poncntl' to
completely remove the /opt/tibit/poncntl directory.

dpkg: warning: while removing tibit-poncntl, directory '/opt/tibit/poncntl/database' not empty so not removed


Running the Software
--------------------

This section provides a list of commands for administering the PON Controller
software.

Use the following command to start the PON Controller:

    sudo systemctl start tibit-poncntl

Use the following command to restart the PON Controller:

    sudo systemctl restart tibit-poncntl

Use the following command to stop the PON Controller:

    sudo systemctl stop tibit-poncntl

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

    sudo systemctl status tibit-poncntl

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

    sudo 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.
