Sign inSign up

iotcosmos/ucep-pm2

By iotcosmos

Updated about 10 years ago

Complex Event Processor executed with PM2 (x86/x84 architectures)

Image
5

1.5K

iotcosmos/ucep-pm2 repository overview

Requirements

  • Access to a usable MQTT pub/sub broker

How to use this image

Execute:

$ sudo docker run -i --net host -p 1883:1883 -t iotcosmos/ucep-pm2

Please notice that the port where the PM2 Web interface is listening cannot be changed since it is necessary to launch the container using host network mode. With this configuration, docker does not considers port publishing. PM2 Web interface is available at port 8088. The password for the Web UI is: AuTh

Parameters

Dolce file

The dolce file defines the rules that are going to be used by uCEP. You can pass a specific dolce file to ucep with the following commad (docker volume functionality is used):

$ sudo docker run -i -v {absolute_path_to_folder_to_be_mounted}:{mount_point_inside_container} --net host -p 1883:1883 -t iotcosmos/ucep-pm2 -d {mount_point_inside_container}/{path_to_dolce_file}

MQTT connection

There are two methods to configure the paramters of the MQTT connection that will be used by uCEP to receive and publish events: command line parameters and configuration files.

Command line parameters

Execute the following command in order to see the list of supported command line paramters for uCEP:

$ sudo docker run -i --net host -p 1883:1883 -t iotcosmos/ucep-pm2 -h

The output will be:

  -h   help
  -mi  mptt input topic (10 characters max)
  -mo  mqtt output topic (10 characters max)
  -n   client name for mqtt subscription (10 characters max)
  -d   dolce specification file (30 characters max)
  -f   configuration file

example:
            -n trafficCep_1 bcep -mi speedCollector -mo incidencePublisher -d incidentRules.dolce

As you can see, you can define the client name, input and output topics. More complex configurations must be passed using a configuration file.

Configuration files

Execute the following command in order to pass a configuration file to uCEP (docker volume functionality is used):

$ sudo docker run -i -v {absolute_path_to_folder_to_be_mounted}:{mount_point_inside_container} --net host -p 1883:1883 -t iotcosmos/ucep-pm2 -f {mount_point_inside_container}/{path_to_conf_file}

uCEP will make use of this values in the default configuration file:

[MQTT]
portMQTT=1883
hostMQTT=localhost
topicMQTTCollect=testcepInput
topicMQTTPublish=testcepOutput
#userMQTT=default
#passwordMQTT=default

The meaning of each one of these parameters is the following:

  • portMQTT= Port used by MQTT broker (default: 1883)
  • hostMQTT= IP address where MQTT broker is being executed
  • topicMQTTCollect= MQTT topic used to receive events
  • topicMQTTPublish= MQTT topic used to publish events
  • userMQTT= User used to create the connection with MQTT broker (check your MQTT broker configuration). If anonymous connection is allowed, comment this value.
  • passwordMQTT=Password used to create the connection with MQTT broker (check your MQTT broker configuration). If anonymous connection is allowed, comment this value.

Tag summary

Content type

Image

Digest

Size

232.1 MB

Last updated

about 10 years ago

docker pull iotcosmos/ucep-pm2