The easiest way to set up a regional EFM broker for DOT demo purposes is to have it accessible via the Internet. This could be something like a public VPS “Droplet” from DigitalOcean, or a self-hosted VM with static NAT for the connection .
TCP port 8443 is the only port that needs to be exposed to the Internet. This can even be mapped to an alternate port in the static NAT configuration if necessary as long as the IR829 upstream broker configuration matches the new port.
The recommended sizing for this demo is a system with 4 vCPU, 8GB RAM, and 80-160GB of storage. The OS should be a recent version of x86 64-bit Linux. This documentation was tested and validated on Ubuntu 16.04 LTS.
root
or use sudo su -
as an admin user
apt install software-properties-common unzip python
add-apt-repository ppa:webupd8team/java
apt update
apt install oracle-java8-installer
Accept the Oracle Java license agreement when prompted
adduser efm
mkdir -p /opt/cisco/kinetic
chown efm:efm /opt/cisco/kinetic
mkdir /var/log/parstream
chown efm:efm /var/log/parstream
tee -a /etc/security/limits.conf << EOT
# Higher open file limit for Cisco Kinetic/Parstream
* hard nofile 131072
* soft nofile 131072
root hard nofile 131072
root soft nofile 131072
EOT
EFM-1.2.0.zip
EFM-1-2-0.zip
in the unzipped EFM-1.2.0
folder to the EFM server into the efm
user’s home directory
Pay attention to the spelling of
EFM-1-2-0.zip
This file is found inside the initial downloaded zip archive which is namedEFM-1.2.0.zip
. Noting this subtle difference will save you from unnecessarily sending the entire zip archive over to the server and having to rununzip
twice.
efm
user that was created above
unzip EFM-1-2-0.zip
cd EFM-1-2-0
./efm-linux install
Select the defaults when prompted, except for the following
y
to reconfigure the EFM Message Broker server configuration
efmAdmin
password and save it for future reference
vi /opt/cisco/kinetic/efm_server/server.json
Edit these settings to match the following lines:
"quarantine": true,
"allowAllLinks": false,
cert.pem
and key.pem
files in /opt/cisco/kinetic/efm_server/certs/
to use a valid SSL certificate
efm
user can read the private key and the certificate itself is secure from being overwritten
chmod 444 /opt/cisco/kinetic/efm_server/certs/cert.pem
chmod 400 /opt/cisco/kinetic/efm_server/certs/key.pem
rm /opt/cisco/kinetic/efm_server/certs/server.csr
These custom SSL certificate steps are optional, but recommended. There is a valid wildcard SSL certificate for iotvehicle.net available that can be used for this purpose. Otherwise, any valid SSL certificate that matches the regional EFM server FQDN can be used. Make sure the files are in plaintext PEM format.
efm
user’s .bashrc
file
tee -a ~/.bashrc << EOT
# ParStream Settings
export PARSTREAM_HOME=/opt/cisco/kinetic/parstream
export LD_LIBRARY_PATH=\$PARSTREAM_HOME/lib:\$LD_LIBRARY_PATH
export PATH=\$PARSTREAM_HOME/bin:\$PATH
EOT
.bashrc
changes with a source ~/.bashrc
or log out and log in again before proceeding to the next section
Note that this is only one command with no line breaks
/opt/cisco/kinetic/dart-sdk/bin/dart /opt/cisco/kinetic/efm_server/bin/daemon.dart start
cd /opt/cisco/kinetic/parstream/examples/noauthentication
parstream-server first &
This information is for future reference only. Don’t do this right now.
If you need to stop the host VPS or VM to perform maintenance or take a snapshot, you’ll want to gracefully shut down EFM and ParStream first. You can follow the steps above to start them again.
Note that this is only one command with no line breaks
/opt/cisco/kinetic/dart-sdk/bin/dart /opt/cisco/kinetic/efm_server/bin/daemon.dart stop
Pause between each command to make sure it has finished before continuing.
pnc -p 9042
ALTER SYSTEM CLUSTER SHUTDOWN;
quit;
cd
mkdir sql
cd sql
wget -O parstream_tables.zip -L 'https://cisco.box.com/shared/static/3u5v2s97se3oajkskfm356sewb4herv3.zip'
unzip parstream_tables.zip
rm parstream_tables.zip
pnc -p 9042 < rwis_data.sql
pnc -p 9042 < crash_data.sql
You should see messages that sayTable 'rwis_data' successfully created.
andTable 'crash_data' successfully created.