RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
...
Launch system-config-services from a console and enable the zookeeper service from the services list.
Below is the list of components needed for a Xmidt (webPA 2.0) cluster setup. For a single node reference setup, few of the services are not mandatory hence not used.
Component | Type | Description | Used in current setup |
---|---|---|---|
Talaria | Server | Talaria maintains the secure websocket connections from the device and passes the messages from or to the device. | Yes |
Scytale | Server | Scytale accepts the inbound requests, fans out across data centers and delivers the messages to the Talaria machines that could be hosting the device connection. | Yes |
tr1d1um | Server | The Webpa micro-service that encode TR-181 requests. | Yes |
petasos | Server | Petasos helps reduce the load on the Talaria machines during mass reboot cases by calculating which specific Talaria a device should connect to & redirecting the incoming request. | No |
caduceus | Server | Caduceus provides the pub-sub message delivery mechanism for xmidt. | No |
parodus | Client | Parodus is the light weight client that reaches out to the xmidt cloud to establish the connection. | Yes |
Code Block |
---|
a) Import the GPG Key (Required once, common for all the packages) $ rpm --import https://github.com/Comcast/tr1d1um/releases/download/0.0.1-65/RPM-GPG-KEY-comcast-webpa b) Install the packages $ rpm -Uvh https://github.com/Comcast/scytale/releases/download/0.1.1-83/scytale-0.1.1-83.el6.x86_64.rpm $ rpm -Uvh https://github.com/Comcast/talaria/releases/download/0.1.1-153/talaria-0.1.1-153.el6.x86_64.rpm $ rpm -Uvh https://github.com/Comcast/tr1d1um/releases/download/0.1.1-228/tr1d1um-0.1.1-228.el6.x86_64.rpm Note: Change version number for downloading the required package. |
If pre-built packages are already installed as explained in previous section & we want to use the same, skip to configuration section
Required for compiling server components written in go language.
Code Block |
---|
$ sudo yum install golang |
Glide is a package manager for Go that is conceptually similar to package managers for other languages. Glide provides the following functionality:
...
Code Block |
---|
$ wget -c https://github.com/Masterminds/glide/releases/download/v0.13.1/glide-v0.13.1-linux-amd64.tar.gz $ tar -xzf glide-v0.13.1-linux-amd64.tar.gz -C /opt $ echo "export PATH=$PATH:/opt/linux-amd64/" >> $HOME/.bash_profile |
Code Block |
---|
1. create a directory in $HOME say webpa_modules $ mkdir $HOME/webpa_modules && cd $HOME/webpa_modules 2. Checkout the components from GitHub repository. $ git clone https://github.com/Comcast/talaria.git $ git clone https://github.com/Comcast/scytale.git $ git clone https://github.com/Comcast/tr1d1um.git |
Code Block |
---|
1. Set the GOPATH & change to the source directory, e.g. $ export GOPATH=$HOME/webpa_modules/petasos/ $ cd $HOME/webpa_modules/petasos/src/petasos 2. Resolve package dependencies using glide. $ glide install --strip-vendor 3. Build the component from source $ go build petasos 4. Create the package $ mkdir $HOME/rpmbuild $ ./build_rpm.sh --no-sign 5. Install the locally built webPA component package e.g. $ cd /root/rpmbuild/RPMS/x86_64/ $ rpm -Uvh petasos-0.1.1-87.el6.x86_64.rpm |
...
Note |
---|
If the script terminates with "error: Bad owner/group: /root/webpa_modules/petasos/petasos.spec" change the ownership to match current user name $ chown root.root petasos.spec |
Anchor | ||||
---|---|---|---|---|
|
WebPA server components as well as requesting application has to use a autorization token for bearer authentication. We can either use a basic authorization token or make use of a key server for obtaining a bearer token.
...
Code Block |
---|
1. Using openssl command to generate the base64 encoded token. [root@webpa-node1 ~]# openssl enc -base64 <<< "webpa@1234567890" [OUTPUT] : d2VicGFAMTIzNDU2Nzg5MAo= 2. Using Linux coreutils tools to generate the base64 encoded token [root@webpa-node1 ~]# echo "webpa@1234567890"|base64 [OUTPUT] : d2VicGFAMTIzNDU2Nzg5MAo= |
Edit the configuration file & modify port number for running talaria service in a different port (default value is 8080).
Code Block | ||
---|---|---|
| ||
{ "port": 8080, "hcport": 8888, "pprofport": 9999, "discoveryClient": { "staticNodes": ["https://localhost:8585" ] }, "log" : { "file" : "talariaLog.log", "level" : "DEBUG", "maxSize" : 5242880, "maxBackup" : 3 } } |
Edit the configuration file under /etc/scytale and modify following values
...
Code Block | ||
---|---|---|
| ||
{ "fqdn": "192.168.30.105", "server": "192.168.30.105", "primary": { "address": ":6000" }, "health": { "address": ":6001" }, "pprof": { "address": ":6002" }, "fanout": { "method": "POST", "endpoints": ["http://192.168.30.105:8080/api/v2/device/send"], "authorization": "QWxhZGRpbjpPcGVuU2VzYW1l" }, "log" : { "file" : "stdout", "level" : "DEBUG", "json": true }, "aws": { "accessKey": "fake", "secretKey": "fake", "env": "fake", "sns": { "region": "us-east-1", "topicArn": "arn:aws:sns:us-east-1:999999999999:fake", "urlPath" : "/api/v2/aws/sns" } }, "authHeader": "d2VicGFAMTIzNDU2Nzg5MA==" } |
Edit the configuration file from /etc/tr1d1um to set following parameters
...