RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Webconfig is a configuration management server. RDK devices download configurations from this server during bootup or notified when updates are available.
The project is written in GO and opensourced to RDK community - https://github.com/rdkcentral/webconfig/blob/develop/README.md
Objective here is to setup the Webconfig server using opensourced repo that can be used by RDK reference platform.
~# go version go version go1.20.3 linux/amd64 ~# cassandra -v 4.1.1 :~# ps -ef | grep cassa cassand+ 222987 1 0 May04 ? 02:01:43 /usr/bin/java
** Note:
After build, modify "config/sample_webconfig.conf" based on the server ip and port detail
$ export WEBCONFIG_KEY=`head -c 32 /dev/random | base64` $ mkdir -p /app/logs/webconfig $ cd /go/src/github.com/rdkcentral/webconfig $ make $ bin/webconfig-linux-amd64 -f config/sample_webconfig.conf
curl -s -i "http://webconfig.rdkcentral.com:9007/api/v1/device/d83add0d178f/document/privatessid" -H 'Content-type: application/msgpack' --data-binary @privatessid.msgpack -X POST curl -s -i "http://webconfig.rdkcentral.com:9007/api/v1/device/d83add0d178f/document/moca" -H 'Content-type: application/msgpack' --data-binary @moca.msgpack -X POST
cqlsh:webconfig> select * from xpc_group_config where cpe_mac='D83ADD0D178F'; cpe_mac | group_id | error_code | error_details | expiry | params | payload | state | updated_time | version --------------+-------------+------------+---------------+--------+--------+------------------------------------------------------------------------------------------------------------------------------------+-------+---------------------------------+----------- D83ADD0D178F | moca | null | null | null | null | 0x81a6456e61626c65a474727565 | 2 | 2023-05-16 23:48:41.941000+0000 | 683076856 D83ADD0D178F | privatessid | 0 | | null | null | 0x8c105971de71bd30ae8a6d0fb10973174a97a0da0bd372b87f2342c132c554421de36916a06721d18cc1226d2a830b4af4297aa91611af89de4bf78b59859707 | 2 | 2023-05-16 23:48:24.845000+0000 | 563331257 (2 rows) cqlsh:webconfig>
~# curl -s "http://webconfig.rdkcentral.com:9007/api/v1/device/d83add0d178f/config" --2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI Content-type: application/msgpack Etag: 683076856 Namespace: moca ▒▒Enable▒true --2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI Content-type: application/msgpack Etag: 563331257 Namespace: privatessid ▒▒2.4▒rdkm_2.4▒5▒rdkm_5 --2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI--
root@RaspberryPi-Gateway:~# cat /rdklogs/logs/WEBCONFIGlog.txt.0 230512-19:23:24.866983 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: ********** Starting component: webconfig ********** 230512-19:23:24.867832 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: NonRoot feature is enabled, dropping root privileges for webconfig process 230512-19:23:24.877486 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: webconfigRbusInit is success. ret is 0 230512-19:23:24.877605 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: Registering parameters Device.X_RDK_WebConfig.RfcEnable, Device.X_RDK_WebConfig.ForceSync, Device.X_RDK_WebConfig.URL Device.X_RDK_WebConfig.SupplementaryServiceUrls.Telemetry 230512-19:23:24.891403 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: psm_get success ret 0 for parameter Device.X_RDK_WebConfig.RfcEnable and value true 230512-19:23:24.891498 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: rbus reg status returned is 0 230512-19:23:24.893344 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: Checked CR - System is ready, proceed with webconfig startup 230512-19:23:24.893605 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: systemReadyTime is 1683919404 230512-19:23:24.893694 [mod=WEBCONFIG, lvl=ERROR] [tid=19031] WEBCONFIG: Waiting for Webconfig.Upstream event subscription for 300s 230512-19:23:49.974359 [mod=WEBCONFIG, lvl=INFO] [tid=19033] WEBCONFIG: eventSubHandler: action=subscribe eventName=Webconfig.Upstream 230512-19:23:54.896324 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: WebConfig Rfc is enabled, starting initWebConfigMultipartTask. 230512-19:23:54.896679 [mod=WEBCONFIG, lvl=INFO] [tid=19031] WEBCONFIG: WebConfigMultipartTask Thread created Successfully. 230512-19:23:54.901241 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Webconfig Notification thread created Successfully 230512-19:23:54.902217 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Producer added webcfgdb->name root, webcfg->version 0, success_doc_count 1 230512-19:23:54.932167 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Firmware Upgrade start time is 0 230512-19:23:54.932275 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Firmware Upgrade end time is 10800 230512-19:23:54.932349 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Starting initEventHandlingTask 230512-19:23:54.932633 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Webconfig event handling thread created Successfully 230512-19:23:54.932796 [mod=WEBCONFIG, lvl=INFO] [tid=19525] WEBCONFIG: Registering RBUS event Element 230512-19:23:54.932903 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: processWebcfgEvents thread created Successfully 230512-19:23:54.932983 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Webconfig is ready to process requests. set webcfgReady to true 230512-19:23:54.933904 [mod=WEBCONFIG, lvl=INFO] [tid=19525] WEBCONFIG: registerWebcfgEvent success 230512-19:23:54.935766 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: getSerialNumber 230512-19:23:54.978899 WEBCONFIG: read file script is called 230512-19:23:54.987155 WEBCONFIG: CURL_RESPONSE path is /tmp/.cURLresponse 230512-19:23:54.989856 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Failed to read token from /etc/parodus/parodus_read_file.sh. Proceeding to create new token. 230512-19:23:55.026802 WEBCONFIG: No /nvram/certs/devicecert_1.pk12 using static cert 230512-19:23:55.035109 WEBCONFIG: No /usr/bin/GetConfigFile to fetch /tmp/.cfgStaticxpki 230512-19:23:55.043432 WEBCONFIG: Failure configuration file missing 230512-19:23:55.046095 [mod=WEBCONFIG, lvl=ERROR] [tid=19521] WEBCONFIG: Failed to create new token 230512-19:23:55.048610 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: reboot reason is unknown 230512-19:23:55.048779 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: versionsList is NONE-REBOOT 230512-19:23:55.048851 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: version_header formed IF-NONE-MATCH:NONE-REBOOT 230512-19:23:55.048919 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: schema_header formed Schema-Version: v1.0 230512-19:23:55.048982 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: supportedVersion fetched is NULL 230512-19:23:55.049047 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: supportedDocs_header formed X-System-Supported-Docs: 16777247,33554435,50331649,67108865,83886081,100663297,117440513,134217729,201326594,218103809,251658241 230512-19:23:55.051273 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: bootTime_header formed X-System-Boot-Time: 1683918788 230512-19:23:55.066136 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: FwVersion_header formed X-System-Firmware-Version: rdkb-generic-broadband-image_rdk-next_20230511162210 230512-19:23:55.066239 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: status_header formed X-System-Status: Operational 230512-19:23:55.066309 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: currentTime_header formed X-System-Current-Time: 1683919435 230512-19:23:55.066376 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: systemReadyTime_header formed X-System-Ready-Time: 1683919404 230512-19:23:55.066571 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: uuid_header formed Transaction-ID: fb00cd07-4c80-469f-9eb3-274207052570 230512-19:23:55.068773 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: productClass_header formed X-System-Product-Class: XB3 230512-19:23:55.088049 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: ModelName_header formed X-System-Model-Name: RPI 230512-19:23:55.088163 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: The get_global_supplementarySync() is 0 230512-19:23:55.091787 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: docList is root 230512-19:23:55.091871 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Webconfig root ConfigURL is http://webconfig.rdkcentral.com?group_id=root 230512-19:23:55.092049 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: Interface fetched from Device.properties is erouter0 230512-19:23:55.092117 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: g_interface fetched is erouter0 230512-19:23:55.092180 [mod=WEBCONFIG, lvl=INFO] [tid=19521] WEBCONFIG: curl Ip resolve option set as default mode root@RaspberryPi-Gateway:~#