...
| draw.io Diagram | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
...
| Component | Type | Description | Used in current setup |
|---|---|---|---|
| Talaria | Server | Talaria maintains the secure websocket connections from the device and passes the messages from or to the device. | Yes |
| Scytale | Server | Scytale accepts the inbound requests and delivers the messages to the Talaria machines that could be hosting the device connection. | Yes |
| tr1d1um | Server | The Webpa micro-service that encode TR-181 requests. | Yes |
| petasos | Server | Petasos helps reduce the load on the Talaria machines by calculating which specific Talaria a device should connect to & redirecting the incoming request. | No |
| caduceus | Server | Caduceus provides the pub-sub message delivery (notification) mechanism for xmidt. | No |
| parodus | Client | 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
Sample scyatle configuration : https://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 Anchor
...
Reference scytale.yaml
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.
...
For https add this section after this
https://github.com/xmidt-org/tr1d1um/blob/main/tr1d1um.
...
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
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.
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 |
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.
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 |
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 |
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.
| 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 |
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.
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.
...
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 |
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.
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
$ 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