Kura over Docker

Rhiot project decides recently to support mainly Kura Eclipse Platform. Our project will provides some code and extension for Kura like Camel integration and lots of other stuff. We have some new Camel component dedicated for Kura Platform (gpio, cloud, wifi). We want use this platform because it is OSGi compliant sotfware, focused to IoT universe, supported by Eclipse Foundation and Eurotech. Kura runs on RaspberryPi, but if you don’t have yet a RaspberryPi device we will show how to run Kura into Docker.

In this post we will see :

How to use Kura with Docker into an almost real environment.

Requisites

  • Docker installation
    • sorry I will use Mac for this example
  • your best terminal application

Docker

Docker setup

First of all, you have to setup your Docker environment, Docker’s documentation is very easy to understand. Just follow correct documentation depending about your architecture (Linux or MacOs)

docker-machine start default
eval "$(docker-machine env default)"

Build Kura-Debian Image

After starting Docker machine, we will build our debian-kura image. We gonna download docker file, and run correct command to built it.

Just build it via command below

curl https://gist.githubusercontent.com/gautric/3eed453c8ae313cb7112/raw/98c9665523a1dca7469c411c08e13ad6da73689b/Dockerfile -O
docker build -t debian-kura .

you should get an output like this

Successfully built aabbccddee0011

Run Kura-Debian Image

Now if everything goes well, we can run it via commands below

docker run -i -p 80:80 -t debian-kura

or via the Docker Hub image

docker run -i -p 80:80 -t gautric/debian-kura

You can change -i to -d to run image into daemon mode.

If everything is ok, you should get osgi> prompt. Now, you can use and deploy Kura Platform as you want.

If you are on MacOs X platform, just use http://192.168.99.100 if you are on Linux platform, just use http://127.0.0.1 should work well.

NB

We are running Kura Platform into Docker env. You cannot access to low level api like GPIO and other stuff like this. But it is enough to start a quick sample project into Kura platform.

Conclusion

Even if, we run it into Docker environment, you can use this Kura OSGi Platform as you want. Be careful, some low level api cannot be use directly. But soon I will propose to use this stuff into real RaspberryPi environment.

Stay tuned !!!

Please feel free to send me your feedback below or via Apropos or via Contact form.

Tag

Date