Skip to content

ctron/kura-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eclipse Kura™ examples Travis

This is a repository containing examples for Eclipse Kura™.

Pre-requisites

You will need the following pre-requisites in order compile and use these examples:

  1. A local installation of Java 1.8.x
  2. A local installation of Apache Maven 3.5.x
  3. A local installation of Git
  4. A Eclipse Kura capable device version 3.2+

Java 8

Java 8 is required as build and runtime environment.

Apache Maven 3.5.x

The build process requires Apache Maven 3.5.x. Earlier versions are not supported.

Git

It is necessary to clone this repository with Git.

There is no requirement for a specific version or distribution of git. You will just need "some git tool". All following examples will however assume you have the classic git command line tool installed. So you may need to adapt to your local setup.

Eclipse Kura

You will of course need a Kura capable device with support for Camel. You will need version 3.2 or newer of Kura.

Note: If you are using ESF, you will need to install the "FUSE addon" in order to have support of Apache Camel as ESF does not ship Camel/FUSE out of the box.

Also see Dockerized Emulator if you don't have a Kura device at hand.

Perform the build

First you need to check out the sources:

git clone https://github.com/ctron/kura-examples
cd kura-examples

Now you can trigger the build:

mvn clean install

This will create .dp packages in the various target folders which you can directly upload to your Kura device or to the Kura emulator.

Running with the dockerized emulator

There is a dockerized Kura emulator available at ctron/kura-emulator.

The simplest way to start it is:

docker run -ti -p 8080:8080 ctron/kura-emulator

A which will start the emulator and export the web console on port 8080. The default credentials for the Kura Web UI are admin/admin.

The docker container also includes Apache Felix File Install so that if you run the docker container with:

docker run -ti -p 8080:8080 -v /home/user/path/to/bundles:/opt/eclipse/kura/load:z ctron/kura-emulator

You can drop the bundles (the jar files, not the dp packages) into your directory /home/user/path/to/bundles on the host and Kura will pick them up.

Of course you may need to adapt the path to your local setup and you may also drop the trailing :z if you are not running SElinux.

The Kura emulator image is based on the Kura 3.2.0 release, adding a few necessary patches to let it run inside of docker.

The container can also be run on Windows and Mac OS X.

If you encounter a message on startup like the following, then this may be ignored:

!ENTRY org.eclipse.equinox.ds 1 0 2017-03-17 10:18:43.618
!MESSAGE Could not bind a reference of component org.eclipse.kura.core.configuration.CloudConfigurationHandler. The reference is: Reference[name = CloudService, interface = org.eclipse.kura.cloud.CloudService, policy = dynamic, cardinality = 0..1, target = (kura.service.pid=org.eclipse.kura.cloud.CloudService), bind = setCloudService, unbind = unsetCloudService]