Versions Compared

Key

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

...

Software Requirements (Reference setup)

Component


Recommendation

System/OS

Ubuntu 18.04.1 LTS   64 bit
Disk space> 5GB
GITVersion 2.17.1
Python2.7x
Maven3.6.0
Java/JDKJava 8 (JDK version 1.8.0_282)

Installation of dependencies

...

We can download the latest xconfserver code from https://github.com/rdkcentral/xconfserver. The latest version of the code is available in main branch.

...

  • Download the tarball file for the version 3.11.9 : 
    $ wget -c https://archive.apache.org/dist/cassandra/3.11.9/apache-cassandra-3.11.9-bin.tar.gz  
  • Unpack the tarball :  
    $ tar -xvf  apache-cassandra-3.11.9-bin.tar.gz
  • Step into apache-cassandra-3.11.9 folder :
    $ cd apache-cassandra-3.11.9
  • To start Cassandra, run the following command
    $ sudo bin/cassandra
  • To verify that Cassandra is up and running, enter the following command :
    $ bin/nodetool status

Configure Cassandra

...

  • schema.cql file is available in 'xconf-angular-admin/src/test/resources/schema.cql'. We can use this cql file to create a corresponding schema . Open another terminal , step into apache-cassandra-3.11.9 folder and  run the following command
           $ bin/cqlsh -f  { path-to-the-schem.cql file}
         eg : $ bin/cqlsh  -f ~/xconf/xconfserver/xconf-angular-admin/src/test/resources/schema.cql
  • To check if tables are created successfully, we can use cqlsh 
  • To start cqlsh, step into cassandra folder and enter the command:
     bin/cqlsh  $ bin/cqlsh 
  • It gives cassandra cqlsh prompt as output. To check if all the tables are present enter the following commands in cqlsh prompt :
          cqlsh>  USE "demo";  
 
       cqlsh>  DESCRIBE KEYSPACE;
  • To exit from cqlsh prompt, we can use the command :  
        cqlsh> quit

Configuration and Service startup

...

  • To start an Xconf application, start the Cassandra server by executing the following commands:  
        $   cd apache-cassandra-3.11.9
        $   sudo bin/cassandra
  • Status of xconf server can be verified by using  the command
     $     bin/nodetool status

2. Configure and Start Application Services


Build and run steps mentioned below is based on these steps - https://github.com/rdkcentral/xconfserver#run-application.

...

  • Go to the xconf-server folder and run the following command to download all dependencies.
       $   cd ~/xconf/xconfserver
  • Run the following command from the xconfserver folder 
      $     mvn clean install


b. Configure Angular Admin UI

For first time application deployment, create a "service.properties"  file under the path xconfserver/xconf-angular-admin/src/main/resources/service.properties with the following contents.

The sample service.properties file will be available in xconf-angular-admin/src/test/resources/service.properties, the below content is

...

copied from the sample with a modification in cassandra port.

...

Code Block
languagejava
themeFadeToGrey

                  

...

cassandra.keyspaceName=demo

...


cassandra.contactPoints=127.0.0.1

...


cassandra.username=

...


cassandra.password=

...


cassandra.port=9042

...


cassandra.authKey=

...



dataaccess.cache.tickDuration=60000

...


dataaccess.cache.retryCountUntilFullRefresh=10

...


dataaccess.cache.changedKeysTimeWindowSize=900000

...


dataaccess.cache.reloadCacheEntries=false

...


dataaccess.cache.reloadCacheEntriesTimeout=1

...


dataaccess.cache.reloadCacheEntriesTimeUnit=DAYS

...


dataaccess.cache.numberOfEntriesToProcessSequentially=10000

...


dataaccess.cache.keysetChunkSizeForMassCacheLoad=500

...


dataaccess.cache.changedKeysCfName=XconfChangedKeys4


  • Go to xconf-angular-admin folder
      $  cd  cd ~/xconf/xconfserver/xconf-angular-admin
  • Run the following command from xconf-angular-admin folder
     $   mvn jetty:run -DappConfig=${path-to-service-properties} -f pom.xml
  • For first time run only, we need to specify the path to service.properties . For the subsequent runs execute the below command in the folder xconfserver/xconf-angular-admin:          mvn

     $ mvn jetty:run

To run the admin UI launch it as http://<XCONF-SERVER-IP>:19093/admin/  in any browser. This will redirect to the login page.

...

If the user wants only read permissions ,then enter username and password for the login as user and user respectively.

c. Configure DataService

For first time application deployment, create a "service.properties"  file under the path xconfserver/xconf-dataservice/src/main/resources/service.properties with the following contents. The sample service.properties file will be available in xconf-dataservice/src/test/resources/service.properties, the below content is taken from there and modified with change in cassandra port.

Code Block
languagejava
themeFadeToGrey
cassandra.keyspaceName=demo

...


cassandra.contactPoints=127.0.0.1

...


cassandra.username=

...


cassandra.password=

...


cassandra.port=9042

...


cassandra.authKey=

...



dataaccess.cache.tickDuration=60000

...


dataaccess.cache.retryCountUntilFullRefresh=10

...


dataaccess.cache.changedKeysTimeWindowSize=900000

...


dataaccess.cache.reloadCacheEntries=false

...


dataaccess.cache.reloadCacheEntriesTimeout=1

...


dataaccess.cache.reloadCacheEntriesTimeUnit=DAYS

...


dataaccess.cache.numberOfEntriesToProcessSequentially=10000

...


dataaccess.cache.keysetChunkSizeForMassCacheLoad=500

...


dataaccess.cache.changedKeysCfName=XconfChangedKeys4


  • Step into xconf-dataservice folder
     
    $ cd   cd ~xconf/xconfserver/xconf-dataservice
  • Run the following command from xconf-angular-admin folder
     $   mvn jetty:run -DappConfig=${path-to-service-properties} -f pom.xml
  • For first time run only, we need to specify the path to service.properties . For the subsequent runs execute the below command in the folder xconfserver/xconf-dataservice:

     $    mvn jetty:run      
  run

To launch the application go to http://<XCONF-SERVER-IP>:19092/queries/environments .  To verify, add an entry in the environments tab of the xconf Xconf admin application and check whether the same is updated here in data service.

  • Data Service Endpoints


    The endpoints available in data service is listed and described here - in below link:

https://github.com/rdkcentral/xconfserver#endpoints

NOTE: To run the Admin UI and data service applications in background start jetty server as follows: nohup mvn jetty:run &

3. Expected build issues

...

Below exceptions

...

may be observed during the mvn clean install . This is an exception from unit test , but the tests will run successfully.

...

Build process may stall for some time but the build will be successful and the application can be launched successfully. So it can be

...

ignored as well.

Code Block
languagejava
themeRDark
[INFO] Running com.comcast.xconf.CompleteTestSuite

...



no libsigar-amd64-linux.so in java.library.path

...



org.hyperic.sigar.SigarException: no libsigar-amd64-linux.so in java.library.path

...


                at org.hyperic.sigar.Sigar.loadLibrary(Sigar.java:172)

...


                at org.hyperic.sigar.Sigar.<clinit>(Sigar.java:100)

...


                at org.apache.cassandra.utils.SigarLibrary.<init>(SigarLibrary.java:47)

...


                at org.apache.cassandra.utils.SigarLibrary.<clinit>(SigarLibrary.java:28)

...


                at org.apache.cassandra.service.StartupChecks$7.execute(StartupChecks.java:216)

...


                at org.apache.cassandra.service.StartupChecks.verify(StartupChecks.java:112)

...


                at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:196)

...


                at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:601)

...


                at org.cassandraunit.utils.EmbeddedCassandraServerHelper$1.run(EmbeddedCassandraServerHelper.java:133)

...


                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

...


                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

...


                at java.lang.Thread.run(Thread.java:748)

...


Solution : This exception can be resolved by copying the .so file to the path /usr/lib.

...

Below steps will affect all the features in xconf Xconf system and should be configured after initial setup. Go to the steps given in site navigation step and press on create button to create new entries.

Define Environments

Panel
titleSite Navigation: <xconf-server>:19093 >> Common >> Environments | Example URL:

Define Models

Panel
titleSite Navigation: http://<XCONF-SERVER>:19093 >> Common >> Models | Example URL :

Define MAC List

(This will be used to target certain list of MACs against a particular feature configuration)

...

Panel
titleSite Navigation http://<XCONF-SERVER>:19093 >> Common >> MAC List | Example URL :
 

Define IP list

Panel
titleSite Navigation http://<XCONF-SERVER>:19093 >> Common >> IP List | Example URL :

 


Feature Validation(RFC)

Configuration

RDK Feature control configuration can be added by adding below 2 sections

  1. Define the Feature
  2. Define the Feature Rule

Define the feature:

A new feature can be defined via RFC-> Feature -> Create. 'Feature Name' should be unique and understandable, 'Config data' should be key value pairs.

Panel
titleSite Navigation | http://<XCONF_SERVER>:19093 >> RFC >> Feature

Define the Feature Rule

Feature rule is to map devices to a particular feature. A new feature rule can be created via RFC->feature rule -> Create

Panel
titleSite Navigation | http://<XCONF_SERVER>:19093 >> RFC >> Feature Rule

Verification

a. Verification of feature and feature rule via test page.

After creating the feature and feature rule, go to RFC->Test page and give a parameter that will match the one of the rules that you have created. Then The matched rule and the json JSON response will be displayed like similar to below example.

Panel
titleSite Navigation: http://<XCONF_SERVER>:19093 >> RFC >> TestPage

    2b.  Verification via curl command

The curl command mocks the request being sent from an STB like below and sample response is also given. It can be given as a curl command or as a get request via postman or browser

eg :

$ curl 'http://<XCONF_IP>:19092/featureControl/getSettings?estbMacAddress= B8:27:EB:94:71:82’

(Here the feature rule mapped to this particular mac address will be obtained)

 

Sample Response:

{

...

Code Block
{
    "featureControl": {

...



        "features": [

...

            {

...


            {
                "name": "EmulatorFeature",

...


                "effectiveImmediate":

...

 true,
                "enable":

...

 false,

...



                "configData": {

...


                    "ENABLE_AAMP": "false"

...


                },

...



                "featureInstance": "AAMP-mock feature"

...

            }

        ]

    }


            }
        ]
    }
}

Client end verification (RPI)

Verification and setup from RPI

CURL Commandcurl 'http://<XCONF_IP>:19092/featureControl/getSettings?estbMacAddress=B8:27:EB:FF:54:95&firmwareVersion=rdk-generic-hybrid-wpe-image_default_20190702100618&env=pi&model=RPI&ecmMacAddress=B8:27:EB:FF:54:95&controllerId=2504&channelMapId=2345&vodId=15660&partnerId=&accountId=Unknown&version=2'
CPE Script (RDK-V)/lib/rdk/RFCbase.sh
CPE Service (RDK-V)/lib/systemd/system/rfc-config.service

...

1. Create upload repository via DCM->Upload repository -> Create.   Here we can add where to configure the log upload, ie i.e. the upload url URL and its protocol.

Panel
titleSite Navigation | http://<XCONF_SERVER>:19093 >> DCM >> UploadRepository

...

5.  Edit the Log upload Setting (Create schedule & Add the upload repository created beforehand).


Verification

a.Verification of log upload settings test page.

After creating the feature and feature rule, go to DCM->Test page and give a parameter that will match the one of the formulas that you have created. Then matched rule and the settings will be displayed like below

Panel
titleSite Navigation: <xconf-server>:19093 >> DCM >> Test Page



2b. Verification via curl command

The curl command mocks the request being sent from an STB like below and sample response is also given. It can be given as a curl command or as a get request via postman or browser

eg :

$ curl 'http://<XCONF_IP>: 19092/loguploader/getSettings?estbMacAddress=B8:27:EB:94:71:82’. 

 Sample response : 

Code Block
{

...


    "urn:settings:GroupName": "RPI_Device_Settings",

...



    "urn:settings:CheckOnReboot":

...

 true,
    "urn:settings:CheckSchedule:cron": "10 00 * * *",

...


    "urn:settings:CheckSchedule:DurationMinutes": 0,

...


    "urn:settings:LogUploadSettings:Message":

...

 null,

...



    "urn:settings:LogUploadSettings:Name": "Log upload settings test",

...


    "urn:settings:LogUploadSettings:NumberOfDays": 5,

...



    "urn:settings:LogUploadSettings:UploadRepositoryName": "Upload repository test",

...


    "urn:settings:LogUploadSettings:RepositoryURL": "http://35.155.171.121/xconf/logupload.php",

...


    "urn:settings:LogUploadSettings:UploadOnReboot":

...

 false,
    "urn:settings:LogUploadSettings:UploadImmediately":

...

 false,
    "urn:settings:LogUploadSettings:upload":

...

 true,

    "urn:settings:LogUploadSettings:UploadSchedule:cron": "10 00 * * *",

...


    "urn:settings:LogUploadSettings:UploadSchedule:levelone:cron":

...

 null,
    "urn:settings:LogUploadSettings:UploadSchedule:leveltwo:cron":

...

 null,
    "urn:settings:LogUploadSettings:UploadSchedule:levelthree:cron":

...

 null,
    "urn:settings:LogUploadSettings:UploadSchedule:DurationMinutes": 0,

...


    "urn:settings:VODSettings:Name":

...

 null,
    "urn:settings:VODSettings:LocationsURL":

...

 null,
    "urn:settings:VODSettings:SRMIPList":

...

 null
}

Client end verification (RPI)

CURL Commandcurl 'http://<XCONF_IP>:19092/loguploader/getSettings?estbMacAddress=B8:27:EB:FF:54:95&firmwareVersion=rdk-generic-hybrid-wpe-image_default_20190702100618&env=dev&model=RPI&ecmMacAddress=B8:27:EB:FF:54:95&controllerId=2504&channelMapId=2345&vodId=15660&timezone=&partnerId=&accountId=Unknown&version=2'
CPE Script (RDK-V)

/lib/rdk/StartDCM.sh

/lib/rdk/DCMscript.sh

CPE Service (RDK-V)/lib/systemd/system/dcm-log.service

...

Panel
titleSite Navigation: http://<XCONF_SERVER>:19093 >> Changes


     3.  Create Create targeting rule via Telemetry -> Targeting rules. Targeting rules is to map the profiles with rules.

Panel
titleSite Navigation: http://<XCONF_SERVER>:19093 >> Telemetry >> Targeting Rule

Verification

a. Verification of telemetry test page.

After creating the permanent profile and targeting rules, go to Telemetry->Test page and give a parameter that will match the one of the rule that you have created. Then matched rule will be displayed like below.

Panel
titleSite Navigation: <xconf-server>:19093 >> Telemetry >> Test Page


      2b.  Verification via curl command

The curl command mocks the request being sent from an STB like below and sample response is also given. It can be given as a curl command or as a get request via postman or browser. The same url used for logupload verification is used here, the response will have telemetry settings data like below (urn:settings:TelemetryProfile)

eg :

$ curl 'http://<XCONF_IP>: 19092/loguploader/getSettings?estbMacAddress=B8:27:EB:94:71:82’

Sample Response :

Code Block
{

...


    "urn:settings:GroupName": "RPI_Device_Settings",

...



    "urn:settings:CheckOnReboot":

...

 true,
    "urn:settings:CheckSchedule:cron": "10 00 * * *",

...


    "urn:settings:CheckSchedule:DurationMinutes": 0,

...


    "urn:settings:LogUploadSettings:Message":

...

 null,

...



    "urn:settings:LogUploadSettings:Name": "Log upload settings test",

...


    "urn:settings:LogUploadSettings:NumberOfDays": 5,

...



    "urn:settings:LogUploadSettings:UploadRepositoryName": "Upload repository test",

...


    "urn:settings:LogUploadSettings:RepositoryURL": "http://35.155.171.121/xconf/logupload.php",

...


    "urn:settings:LogUploadSettings:UploadOnReboot":

...

 false,
    "urn:settings:LogUploadSettings:UploadImmediately":

...

 false,
    "urn:settings:LogUploadSettings:upload":

...

 true,
    "urn:settings:LogUploadSettings:UploadSchedule:cron": "10 00 * * *",

...



    "urn:settings:LogUploadSettings:UploadSchedule:levelone:cron":

...

 null,
    "urn:settings:LogUploadSettings:UploadSchedule:leveltwo:cron":

...

 null,
    "urn:settings:LogUploadSettings:UploadSchedule:levelthree:cron":

...

 null,
    "urn:settings:LogUploadSettings:UploadSchedule:DurationMinutes": 0,

...


    "urn:settings:VODSettings:Name":

...

 null,
    "urn:settings:VODSettings:LocationsURL":

...

 null,
    "urn:settings:VODSettings:SRMIPList":

...

 null,

...



    "urn:settings:TelemetryProfile": {

...



        "id": "b160a5a8-c753-4e71-b267-992965a4437b",

...


        "telemetryProfile": [

...



            {

...


                "header": "Firewall",

...


                "content": "starting firewall service",

...


                "type": "FirewallDebug.txt",

...


                "pollingFrequency": "1"

...

            }

...


            }
        ],

...



        "schedule": "5",

...


        "expires": 0,

...


        "telemetryProfile:name": "Permanent profile test",

...


        "uploadRepository:URL": "http://35.155.171.121/xconf/logupload.php",

...


        "uploadRepository:uploadProtocol": "HTTP"

...



    }

...


}

Client end verification (RPI)

CURL Commandcurl 'http://<XCONF_IP>:19092/loguploader/getSettings?estbMacAddress=B8:27:EB:FF:54:95&firmwareVersion=rdk-generic-hybrid-wpe-image_default_20190702100618&env=dev&model=RPI&ecmMacAddress=B8:27:EB:FF:54:95&controllerId=2504&channelMapId=2345&vodId=15660&timezone=&partnerId=&accountId=Unknown&version=2'
CPE Script (RDK-V)

/lib/rdk/DCMscript.sh

/lib/rdk/dca_utility.sh

CPE Service (RDK-V)/lib/systemd/system/dcm-log.service

...

2.  To create a firmware template, go to Firmware → Firmware templates. Enter the ID name. Select priority from the 'Priority' drop down menu. Add conditions

Panel
titleSite Navigation: http://<XCONF_SERVER>:19093 >> Firmware >>Firmware Templates

...

3.  Firmware rule can be create via Firmware -> Firmware rules -> Create. On clicking on Create button, a list of templates will be presented. We can select the required template (There will be default templates like ENV_MODEL_RULE, IP_RULE, MAC_RULE etc. and also the custom templates created from Firmware->Firmware template -> Create).

Panel
titleSite Navigation: http://<XCONF_SERVER>:19093 >> Firmware >> Firmware Rules

...

We can import and export all the configuration data from the UI itself.  This feature can be primarily used for transferring the configuration data from one xconfserver setup to the other one.

The export and import data need to be done separately for the Application - stb, xhome , and rdkcloud and sky for all the pages except those in Common tab.

To export data from a page, Click on ‘Export All’ button in that page.  The configuration data will be downloaded as a json JSON file.

To import data :

  1. Open the dropdown menu next to ‘Create’ button.
  2. From the drop down menu, click on ‘Import’.
  3. A new page will be displayed with option to browse the location of the json file JSONfile to be imported. Select the file that need to be imported.
  4. All the data from the file will be listed in the page.
  5. Click on ‘Import All’ to import all data

...