RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
This document explains about how to build RDKB containerization image and use it. In addition it also has some useful commands which can be used to handle the containers
...
The code is developed and changes made in necessary files for containerization.
...
Go to the <workspace>
cd <workspace>
...
The above command will compile the dmcli component container.
...
Once the code generation for containerization is compiled, the image for the same is found under the path:
...
raspberrypi-rdk-broadband-lxcrdk-generic-broadband-lxc-image_default_20190327101556.rootfs.rpi-sdimg
...
The image has to be copied to the local PC using scp command:
...
The Raspberry Pi board is connected to the PC via a USB to serial converter and the logs can be checked in console or can be connected via HDMI cable to a TV and logs will be shown in the terminal.
...
1.Check for the container generated in the following path:
/container/<container_name>/
3 Three folders will be generated under <container_name>:
...
The Pi terminal should show logssimilar to the following:
5530 | root | 0.00 | /usr/bin/lxc-execute -n PSMSSP -f /container/PSMSSP/conf/lxc.conf -- /usr/bin/PsmSsp -subsys eRT . |
5534 | psm | 0.00 | /init.lxc.static –gid 705 –uid 705 -- /usr/bin/PsmSsp -subsys eRT . |
6433 | root | 0.00 | /usr/bin/lxc-execute -n CCSPPANDM -f /container/CCSPPANDM/conf/lxc.conf -- /usr/bin/gw_prov_utopia |
6435 | pandm | 0.00 | /init.lxc.static –gid 706 –uid 706 -- /usr/bin/gw_prov_utopia |
6520 | root | 0.00 | /usr/bin/lxc-execute -n DBUS -f /container/DBUS/conf/lxc.conf -- /usr/bin/dbus-daemon –system –nofork –nopidfile –systemd-activation |
6532 | dbus | 0.00 | /init.lxc.static –gid 703 –uid 703 -- /usr/bin/dbus-daemon –system –nofork –nopidfile –systemd-activation |
6574 | root | 0.00 | /usr/bin/lxc-execute -n CCSPCR -f /container/CCSPCR/conf/lxc.conf -- /usr/bin/CcspCrSsp -subsys eRT . |
6577 | ccspcr | 0.00 | /init.lxc.static –gid 704 –uid 704 -- /usr/bin/CcspCrSsp -subsys eRT . |
6737 | root | 0.00 | grep lxc |
...
1. Run respective container scripts to execute individual container when container fails in boot up process:
...
The above command can be executed to run the commands specified by lxc.conf file.
...
...
i. Service file used:
/lib/systemd/system/dbus.service
...
DBUS acts as a message bus. DBUS container contains commands which initialize the message bus and connects all the components to each other for communication. Dbus path differs for each component.
...
i. Service file used:
/lib/systemd/system/PsmSsp.service
...
Persistent Storage Manager container stores current/default system configurations and retrieves them from backup files when required on behalf of other component containers.
...
i. Service file used:
/lib/systemd/system/CcspPandMSsp.service
...
This container also handles Gateway provisioning for provisioning LAN and DOCSIS which includes IP addressing, routing and other gateway initialisation. It initiates registration of all servies on boot up.
...
i. Service file used:
/lib/systemd/system/ccspwifiagent.service
...
WiFi Agent container provides each component container, the access to data model APIs and driver specific APIs to manage WiFi specific parameters through a component specific Abstraction layer. It helps to manage and configure the gateway’s wifi access point interface.
...
i. Service file used:
/lib/systemd/system/CcspCrSsp.service
...
Component registrar acts as a centralized container for registration of all the component containers with their respective name, version, dbus path and namespace.
...
...
This command is used to quickly launch a container in an isolated environment. It mainly runs the specified command into the container via intermediate process lxc-init (forwards the received signal to starting command). Lxc-execute uses the configurations specified by the lxc-create process.
...
lxc-execute -n CCSPCR -f /container/CCSPCR/conf/lxc.conf
...
This command attaches to the container namespace and run a specified command inside, the already executing container.
...
lxc-attach -n CCSPCR -f /container/CCSPCR/conf/lxc.conf
...
hostapd is software daemon used for turning the normal network interface to accesspointaccess point.
Ex:
hostapd -B /nvram/hostapd0.conf
Get parameter value:
Ex:
dmcli eRT getv Device.WiFi.
...
Ex:
dmcli eRT setv Device.WiFi.X_CISCO_COM_EnableTelnet bool true
To execute a component:
Ex:
/usr/bin/CcspPandMSsp -subsys eRT.\
...
Host based management can be done via dmcli and WebUI.
WebUI can be used to control all the parameters and features from a client connection.
The parameters can be set or reset via a client device.
Host PC has to be connected with the Raspberry Pi board via USB to Ethernet adaptor .or by WiFi
WiFi client should be connected to the WiFi Access point RPi using the SSID(Default: RPI3-RDKB-AP0) and password(Default: rdk@1234) given.
Following are some of the screenshots captured for demonstrating the Host based management from a client connection.can be done via WebUI by opening http://10.0.0.1/ in connected client device