Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

draw.io Diagram
diagramNamexmidt-basic-cluster.drawio
diagramWidth1130
height598
revision13

WebPA Server components setup

...

ComponentTypeDescriptionUsed in current setup
TalariaServer

Talaria maintains the secure websocket connections from the device and passes the messages from or to the device.

Yes
ScytaleServer

Scytale accepts the inbound requests and delivers the messages to the Talaria machines that could be hosting the device connection.

Yes
tr1d1umServer

The Webpa micro-service that encode TR-181 requests.

Yes
petasosServerPetasos helps reduce the load on the Talaria machines by calculating which specific Talaria a device should connect to & redirecting the incoming request.No
caduceusServer

Caduceus provides the pub-sub message delivery (notification) mechanism for xmidt.

No
parodusClient

Parodus is the light weight client that reaches out to the xmidt cloud to establish the connection from CPE devices.

Yes

...

"certificateFile",   : Enable this section and update with server certificate files, if there are multiple certs can be combined as crt bundles  https://github.com/xmidt-org/talaria/blob/main/talaria.yaml#L60


Reference talaria.yaml

Scytale configuration

Sample scyatle configurationhttps://github.com/xmidt-org/scytale/blob/main/scytale.yaml

...

"fqdn"             : Fully qualified domain name of the server
"server"          : Listening IP address (using "localhost" will allow connections only from the current machine.)

"endpointscertificateFile"  : Enable this section and update with server certificate files, if there are multiple certs can be combined as crt bundles https://github.com/xmidt-org/scytale/blob/main/scytale.yaml#L52

"endpoints"    : Under "fanout" section, change the IP / Port value to match to the   : Under "fanout" section, change the IP / Port value to match to the one where Talaria service is listening.

...

"file"                : Under "log" section, change the value from "stdout" to a file name if we need to redirect debug messages to a separate log file.Add the "aws" section with following values for suppressing few error messages  Anchorfake-awsfake-aws

...


Reference  scytale.yaml


Tr1d1um configuration

Sample tr1d1um configuration: https://github.com/xmidt-org/tr1d1um/blob/main/tr1d1um.yaml

Edit the configuration file from /etc/tr1d1um to set following parameters

"fqdn"             : Fully qualified domain name of server

"server"          : IP Address/DNS to which the service has to listen

"version"        : Current version of the service

"region"          : Region of deployment

"flavor"           

...

: Development, Production etc.

"address"       : 

...

Under "

...

primary" section, change the value to point to the port where tr1d1um service will listen for incoming requests.

"targetURL"   : Change to IP-Address:Port value where SCYTALE service is running.

"authHeader" : Auth token Use the auth token which was generated in previous section.

This will set AWS & SNS parameters with fake ones since we don't use actual keys and SNS (amazon simple notification service) in the current setup.

Tr1d1um configuration

...

For https add this section after this

https://github.com/xmidt-org/tr1d1um/blob/main/tr1d1um.

...

yaml#L59

tls:

certificates:

 - certificateFile: "/etc/cl-certs/primary-public.pem" keyFile:

"/etc/cl-certs/primary-private.pem"

 minVersion: 771 # 0x0303, the TLS 1.2 version uint16

Reference for yaml file tr1d1um.yaml


Enable the services at boot-up

Create a systemd service as below.

Code Block
[Unit]
Description=The Xmidt API interface server.
After=network.target remote-fs.target nss-lookup.target

[Service]

Edit the configuration file from /etc/tr1d1um to set following parameters

"fqdn"             : Fully qualified domain name of server

"server"          : IP Address to which the service has to listen

"version"        : Current version of the service

"region"          : Region of deployment

"flavor"           : Development, Production etc.

"address"       : Under "primary" section, change the value to point to the port where tr1d1um service will listen for incoming requests.

"targetURL"   : Change to IP-Address:Port value where SCYTALE service is running.

"authHeader" : Auth token Use the auth token which was generated in previous section.

"aws"              : Add fake values as described previously.

Enable the services at boot-up

Create a systemd service as below.

Code Block
[Unit]
Description=The Xmidt API interface server.
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=simple
PIDFile=/run/talaria.pid
ExecStartPre=/usr/bin/rm -f /run/talaria.pid
ExecStart=/usr/bin/talaria
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutStopSec=10
KillMode=process
PrivateTmp=true
Restart=always

[Install]
WantedBy=multi-user.target

Panel
Note: Copy the talaria, scytale, tr1d1um binaries to /usr/bin and respective yaml file to /etc directory. For talaria, yaml location is /etc/talaria/talaria.yaml similarly for scytale and tr1d1um.

Ubuntu uses a systemd based boot-up mechanism. Hence below commands will enable the required services.

Code Block
$ sudo systemctl enable talaria
$ sudo systemctl enable scytale
$ sudo systemctl enable tr1d1um

WebPA Client Setup

Parodus is the client-end service running on the RDK-V CPE devices which establishes a connection with webPA service on device boot-up and delivers request-response between the webPA server & CPE device services. Parodus provides following functionalities in a CPE device.

Websocket client: Nopoll library used as Websocket Client.  It allows building pure WebSocket solutions or to provide WebSocket support to existing TCP oriented applications. Nopoll handles all the messages coming from or to the server asynchronously.

Nanomsg Server: Parodus acts as Nanomsg server to distribute messages upstream and downstream.

Configuring Parodus

RDK Video Devices

Edit parodus startup script for enabling the CPE device to use local webPA server

--webpa-url       :  Set with IP Address and Port of talaria service

--force-ipv4       : Force use of IPv4 for communication.

Code Block
vi /etc/partners_defaults.json
Update the webpa server URL
"Device.X_RDK_WebPA_Server.URL" : "https://webpa.rdkcentral.com:8080",

Restart the service after changes are done.

Code Block
# systemctl restart parodus

RDK Broadband Devices

Edit parodus startup script for enabling the CPE device to use local webPA server

ServerURL       :  Set to IP Address and Port of talaria service.

--force-ipv4       : Force use of IPv4 for communication.

Code Block
vi /etc/device.properties
ServerURL=http://<webpa-ip>:8080
WantedBy=multi-user.target

Panel
Note: Copy the talaria, scytale, tr1d1um binaries to /usr/bin and respective yaml file to /etc directory. For talaria, yaml location is /etc/talaria/talaria.yaml similarly for scytale and tr1d1um.

Ubuntu uses a systemd based boot-up mechanism. Hence below commands will enable the required services.

Code Block
$ sudo systemctl enable talaria
$ sudo systemctl enable scytale
$ sudo systemctl enable tr1d1um

WebPA Client Setup

Parodus is the client-end service running on the RDK-V CPE devices which establishes a connection with webPA service on device boot-up and delivers request-response between the webPA server & CPE device services. Parodus provides following functionalities in a CPE device.

Websocket client: Nopoll library used as Websocket Client.  It allows building pure WebSocket solutions or to provide WebSocket support to existing TCP oriented applications. Nopoll handles all the messages coming from or to the server asynchronously.

Nanomsg Server: Parodus acts as Nanomsg server to distribute messages upstream and downstream.

Configuring Parodus

RDK -E Devices


Code Block
vi /etc/partners_defaults.json
Update the webpa server URL
"Device.X_RDK_WebPA_Server.URL" : "https://webpa.rdkcentral.com:8080",

Restart start the service after changes are done.

Code Block
# systemctl restart parodus

Debugging & log files

Log files

server logs

  • WebPA server logs are distributed among following locations.
    • /var/log/<webpa-service>/ : keeps debug log files.
        • supervisord.log : Log messages related to service boot-up & initialization
        • console.out       : console logs (debug message will appear here if "file": "stdout" is configured in <webpa-service>.json file
    • /var/run/<webpa-service>/ : keeps service specific debug messages
      • <service-name>Log.log : component specific debug messages will appear here if "file" : "fileName.log" is configured in <webpa-service>.json file

Client logs

Parodus service log file is located as /opt/logs/parodus.log, provides debug information such as connection details, service initialization, which protocols are enabled/disabled etc.

Common Errors

Service fails to start (Specific to older CentOS 6.x releases)

When we see an error similar to the below, it is related to zookeeper service failed to load or not running currently. restarting zookeeper & subsequent restart of other services solves the issue.

...

RDK Broadband Devices

Edit parodus startup script for enabling the CPE device to use local webPA server

ServerURL       :  Set to IP Address and Port of talaria service.

--force-ipv4       : Force use of IPv4 for communication.

Code Block
vi /etc/device.properties
ServerURL=http://<webpa-ip>:8080

start the service after changes are done.

Code Block
# systemctl restart parodus

Debugging & log files

Log files

server logs

  • WebPA server logs are distributed among following locations.
    • /var/log/<webpa-service>/ : keeps debug log files.
        • supervisord.log : Log messages related to service boot-up & initialization
        • console.out       : console logs (debug message will appear here if "file": "stdout" is configured in <webpa-service>.json file
    • /var/run/<webpa-service>/ : keeps service specific debug messages
      • <service-name>Log.log : component specific debug messages will appear here if "file" : "fileName.log" is configured in <webpa-service>.json file

Client logs

Parodus service log file is located as /opt/logs/parodus.log, provides debug information such as connection details, service initialization, which protocols are enabled/disabled etc.

Use cases

Downstream request

...

Code Block
languagejava
titleSET Parameter
$ curl -X PATCH httphttps://<IP>:9003/api/v2/device/mac:<MAC>/config -d '{"parameters": [ {"dataType": 0, "name": "<TR181_PARAM>", "value": "<Value-to-Set>"}]}' -H 'Authorization:Basic <TOKEN>' e.g.
$ curl -X PATCH httphttps://35webpa.155rdkcentral.171.121com:9003/api/v2/device/mac:b827eb5681cdaabbccddeeff/config -d '{"parameters": [ {"dataType": 0, "name": "Device.WiFi.SSID.10001.SSID", "value": "Testing"}]}' -H 'Authorization:Basic d2VicGFAMTIzNDU2Nzg5MAo='

...

Code Block
$ curl -H "<AUTH_TOKEN>" http://<IP>:8080/api/v2/devices
e.g. curl -H "Authorization: Basic d2VicGFAMTIzNDU2Nzg5MA==" httphttps://<webpa_serverURL>:8080/api/v2/devices

...

Panel
Device.DeviceInfo.Manufacturer
Device.DeviceInfo.ManufacturerOUI
Device.DeviceInfo.ModelName
Device.DeviceInfo.SerialNumber
Device.DeviceInfo.HardwareVersion
Device.DeviceInfo.SoftwareVersion
Device.DeviceInfo.UpTime
Device.DeviceInfo.ProcessorNumberOfEntries
Device.DeviceInfo.MemoryStatus.Total
Device.DeviceInfo.MemoryStatus.Free
Device.DeviceInfo.ProcessStatus.CPUUsage
Device.DeviceInfo.ProcessStatus.ProcessNumberOfEntries


For bringing up the webpa module as a container refer this page Webpa containerization