Versions Compared

Key

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

...

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.

Build from Source

If pre-built packages are already installed as explained in previous section & we want to use the same, skip to configuration section

...

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


Downloading the

...

source code

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

...

Note

If build_rpm.sh prompts for password, modify the rpmbuild command to disable the signing option

yes "" | rpmbuild -ba \

--define "_signature gpg" \

--define "_ver $release" \

--define "_releaseno ${BUILD_NUMBER}" \

--define "_fullver $new_release" \

${NAME}.spec

Note
ifIf 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

...

We can use either of the below 2 methods to generate a basic authorization string.

Code Block
1. UseUsing openssl command to generate the base64 encoded token.
[root@webpa-node1 ~]# openssl enc -base64 <<< "webpa@1234567890"
[OUTPUT] : d2VicGFAMTIzNDU2Nzg5MAo=
2. UseUsing Linux coreutils tools to generate the base64 encoded token
[root@webpa-node1 ~]# echo "webpa@1234567890"|base64
[OUTPUT] : d2VicGFAMTIzNDU2Nzg5MAo=


Talaria configuration

Edit the configuration file & modify port number for running talaria service in a different port (default value is 8080).

Code Block
title/etc/talaria/talaria.json
{
        "port": 8080,
        "hcport": 8888,
        "pprofport": 9999,
        "discoveryClient": {
                "staticNodes": ["https://localhost:8585" ]
        },

        "log" : {
                "file"      : "talariaLog.log",
                "level"     : "DEBUG",
                "maxSize"   : 5242880,
                "maxBackup" : 3
        }
}

Scytale configuration

...

Edit the configuration file under /etc/scytale

...

and modify following values

...

a)

"fqdn":

...

Fully qualified domain name of the server
b) "server": Listening IP address (using "localhost" will allow connections only from the current machine.)

c) "endpoints": Under "fanout" section, change the port value to match to the one where talaria service is listening.

d) "authHeader": Auth token Use the auth token which was generated in previous section

e)  "file" : Under "log" section, change the value from "stdout" to a file name if we need to redirect debug messages to a separate log file.

f) Add the "aws" section with following values for supressing few error messages 

Anchor
fake-aws
fake-aws

   "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"
           }
   },

This will set AWS & SNS parameters with fake ones since we don't use actual keys and SNS (amazon simple notification service) in the current setup.

Code Block
titleSample configuration [/etc/scytale/scytale.json]
{
	"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=="
}


tr1d1um configuration

Edit the configuration file from /etc/tr1d1um to set following parameters

"fqdn"             : Fully qualified domain name of server

"server"          : IP Address to which the service has to listen

"version"        : Current version of the service

"region"          : Region of deployment

"flavor"           : Development, Production etc.

"address"       : Under "primary" section, change the value to point to the port where tr1d1um service will listen for incoming requests.

"targetURL"   : Change to IP-Address:Port value where SCYTALE service is running.

"authHeader" : Auth token Use the auth token which was generated in previous section.

"aws"              : Add fake values as described above

...

Code Block
title/etc/tr1d1um/tr1d1um.json
{
	"fqdn": "192.168.30.105",

	"server": "192.168.30.105",
	"version": "0.1.1-228",
	"region": "india",
	"flavor": "lab", 
	
	"primary": {
		"address": ":6003"
	},

	"health": {
		"address": ":6004",
		"logInterval": "60s",
		"options": [
			"PayloadsOverZero",
			"PayloadsOverHundred",
			"PayloadsOverThousand",
			"PayloadsOverTenThousand"
		]
	},

	"pprof": {
		"address": ":6005"
	},
	
	"metrics": {
		"address": ":8082"
	},
	
	"log": {
		"file"      : "tr1d1um.log",
		"level"     : "DEBUG",
		"maxSize"   : 52428800,
		"maxBackup" : 10,
		"json"      : true
	},

	"aws": {
		"accessKey": "fake-accessKey",
		"secretKey": "fake-secretKey",
		"env": "fake-env",
		"sns": {
			"region": "fake-region",
			"topicArn": "fake-sns-topic",
			"urlPath" : "/api/v2/aws/sns"
		}
	},

	"targetURL": "http://192.168.30.105:6000",
	"supportedServices": ["config"],
	"authHeader": "d2VicGFAMTIzNDU2Nzg5MA=="
}