You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


Scope


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. 


Pre Requisites 


  • Access to Webconfig VM  -  52.88.24.78
  • HostName - http://webconfig.rdkcentral.com
  • Need random base64 encoded key  "WEBCONFIG_KEY "
  • GO version 1.17 and above 
  • Cassandra should be running 


~# 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

Build And Run Application


** 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

Set Data to DB 


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


Verify data in DB

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>


RDK Device downloads data

~# 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--
  • No labels