Versions Compared

Key

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

Table of Contents

Source code repository

Xconf consist consists of two 2 web applications - Xconf dataservice and Xconf admin. Xconf DataService is the app that the STBs talk to.  Xconf Xconf Admin allows humans to enter all the information necessary for Xconf to provide the correct information to STBs.

This repo contains the source code for both the applications -  https://github.com/rdkcentral/xconfserver 

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

1. Install Java JDK

Java JDK version should be 8.  Get the supported version from Oracle or use the OpenJDK packages.

...

Check your installation using the command : java  -version

2. Install Maven (Version 3.6.0)

Maven version should be 3 +. 

...

  • sudo apt update
  • sudo apt install maven
  • Check the installation using : mvn -version

3. Download xconf server code

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

4. Install and setup Cassandra(Version 3.11.9)

Install Cassandra

To install Cassandra , follow the below steps

  • 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

Note :  For the next step, make sure that python is installed. Because cqlsh is python based command line tool. If python is not installed , use this command : sudo apt install python2.7

...

  • To exit from cqlsh prompt, 
        cqlsh> quit

Configuration and Service startup

1. Start Cassandra Service

  • To start an Xconf application, start the Cassandra server by executing the following commands:  

...

  • 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.

a. Build Project

  • Go to the xconf-server folder and run the following command to download all dependencies.

...

  • 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.

...

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.

...

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 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 in below link:

...

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.

...

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

Configuration and Validation of services

Admin UI Common Configuration

Below steps will affect all the features in 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.

...

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


Feature Validation (LogUpload)

Configuration

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

...

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


Verification

a.Verification of log upload settings test page.

...

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


Feature Validation (Telemetry)


  1. Telemetry configuration can be done by adding a permanent profile which contains below objects
    1. Upload repository
    2. Profile options (Header, content, frequency etc.)
  2. Creating a targeting rule which is basically mapping the profile to a set of MAC/IP/Device etc.

Configuration

  1. Create a permanent profile Telemetry - > Permanent Profiles -> Create

...

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

Verification

a. Verification of telemetry test page.

...

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

Feature Validation (Firmware update)

Configuration


1.  Firmware config can be created via Firmware - > Firmware Configs -> Create. Here we can define the file name and version of the image/firmware that need to be downloaded to the CPE device. The models that we defined in Common → Models section will be available here, We can select the needed models by clicking on it.

...

Panel
titleSite Navigation: http://<XCONF_SERVER>:19093 >> Firmware >> Download Location Round Robin Filter

Import and Export Feature

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.

...