Code Monkey home page Code Monkey logo

kura-container's Introduction

Eclipse Kura™ container image Docker Automated build

This is a container image running Eclipse Kura™.

Use the following command to run it:

docker run -p 8080:8080 ctron/kura

Once the image is started you can navigate your browser to http://localhost:8080 and log in using the credentials admin : admin.

Note: The Git repository is now ctron/kura-container and the Docker repository ctron/kura.

Enabling the interactive console

By default the Kura instance will run without an Equinox console on the TTY. You can enable the interactive console by passing the argument -console to the container, be sure to also enable the interactive TTY support for the container:

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

Different tags/branches

The container image is provided in different branches:

Branch Description
develop Points to some commit in the current development branch of Kura.
latest (default) Points to the latest released version of Kura
x.y.z Points to a specific release of Kura.

Also see: https://hub.docker.com/r/ctron/kura/tags

Making use of Apache Felix File Install

This image includes Apache Felix FileInstall, which monitors a directory and loads all OSGi bundles it detects during runtime. Adding a new bundle is as easy as dropping an OSGi JAR file into a directory. Uninstalling is done by deleting the file and updates are simply done by overwriting the bundle with a newer version.

File Install loads bundles from /load which is also defined as a docker volume, so that you can link this up with your container host:

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

Now you can access /home/user/path/to/bundles on your host machine and bundles will be loaded by Kura inside the docker container.

Note: It may be that a bundle, which is first installed, needs to be manually started using the Kura Web UI.

Running with JMX enabled

Running with JMX or debugging enabled can sometimes be quite helpful. However it is disabled by default.

On Linux

If you want to run the image with JMX enabled use the following command on Linux:

docker run -ti -eJAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xdebug -Xrunjdwp:transport=dt_socket,address=9011,server=y,suspend=n" -p 8080:8080 --expose 9010 --expose 9011 -p 9010:9010 -p 9011:9011 ctron/kura

On Windows

If you want to run the image with JMX enabled use the following command on Windows:

docker run -ti -eJAVA_OPTS="-Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=<IP> -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xdebug -Xrunjdwp:transport=dt_socket,address=9011,server=y,suspend=n" -p 8080:8080 --expose 9010 --expose 9011 -p 9010:9010 -p 9011:9011 ctron/kura

Where is the Docker address, you can find it by using ipconfig and search for DockerNAT address, for instance:

Ethernet adapter vEthernet (DockerNAT):
Connection-specific DNS Suffix  . :
IPv4 Address. . . . . . . . . . . : 10.0.75.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

The JMX port defined is 9010 and the Remote debug port is 9011. Both ports are not exposed by default and have to be exposed from the command line using --expose 9010 --expose 9011.

Re-Building

This docker container is being built by re-using the Intel UP² CentOS 7 image of Kura. It temporarily sets up the container for building a specific Git commit of Kura and then removes all development dependencies, installing and configuring Kura to run insider a container. This allows you to pick a specific Kura commit, or re-build everything from your forked Git repository.

If you want to re-build the image, check out this repository and simply run docker build . on the command line.

You can also build a different commit of Kura by changing the environment variable KURA_COMMIT for the build. This can be changed in the Dockerfile itself, or e.g. using OpenShift source-to-image in the build configuration.

Packed build

The build also allows you to set the environment variable PACKED to true, in which case the build will pack the installed version of Kura and delete it from the image before finishing the build. The start scripts will detect this and unpack the Kura instance before commencing with the actual startup. This can be used to create persistent instance containers, which only take the Kura from the container image for the first start. All following starts will use the unpacked Kura binaries. This allows you to upgrade the instance using the Kura upgrade flow, and make the changes of the update persistent as well. See the OpenShift deployment for more information about this use case.

Running in OpenShift / OKD

There also is an OpenShift template, which can be used to deploy this image into OpenShift. This deplyoment allows you to run the image in either emphermal, data persistence or instance persistence mode. Read more at: openshift/README.md

Building extended images

If you want to add additional content to the Kura installation inside the container image, it is possible to extend the installation.

See extensions/camel-additions for an example.

kura-container's People

Contributors

apupier avatar ctron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kura-container's Issues

Logs

Hi,

How can i see the error log for my bundle ?
Because i deploy my bundle and it is in ACTIVE state however without any application logs. So probably it fails during activation with some reason

Thanks

Deploy error in Red Hat OpenShift 3.6

Trying to deploy on a fresh OpenShift V3.6 cluster via the provided template.

Getting

[INFO] ------------------------------------------------------------------------

  | [INFO] Building org.eclipse.kura.api 1.2.0
  | [INFO] ------------------------------------------------------------------------

.
.
.

[ERROR] Plugin biz.aQute.bnd:bnd-baseline-maven-plugin:3.4.0-SNAPSHOT or one of its dependencies could not be resolved: Failure to find biz.aQute.bnd:bnd-baseline-maven-plugin:jar:3.4.0-SNAPSHOT in https://bndtools.ci.cloudbees.com/job/bnd.master/lastSuccessfulBuild/artifact/dist/bundles/ was cached in the local repository, resolution will not be reattempted until the update interval of bnd-snapshots has elapsed or updates are forced -> [Help 1]

  | [ERROR]
  | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  | [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  | [ERROR]
  | [ERROR] For more information about the errors and possible solutions, please read the following articles:
  | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
  | error: build error: The command '/bin/sh -c dnf -y update && dnf -y install git java-1.8.0-openjdk-devel maven procps-ng zip unzip tar psmisc telnet dos2unix net-tools hostname && git clone https://github.com/eclipse/kura.git && cd kura && git checkout $KURA_COMMIT && ( cd /kura && git apply --verbose /kura.patch && mvn -B -f target-platform/pom.xml clean install $MAVEN_PROPS -Dequinox.download.url=http://dentrassi.de/download/eclipse/equinox-SDK-Neon.1.zip && mvn -B -f kura/manifest_pom.xml clean install $MAVEN_PROPS -Pspeedup && mv kura/distrib/src/main/resources/fedora25 kura/distrib/src/main/resources/fedora25-nn && mvn -B -f kura/distrib/pom.xml clean install $MAVEN_PROPS -Pfedora25 -nsu ) && /kura/kura/distrib/target/kura_3.0.0_fedora25-nn_installer.sh && dnf remove -y git java-1.8.0-openjdk-devel maven && dnf install -y jre-1.8.0-openjdk-headless && rm -Rf /kura /root/.m2 /kura.patch && dnf -y clean all && mkdir -p /opt/eclipse/kura/kura/packages && cd /opt/eclipse/kura/kura/packages && curl -O https://repo1.maven.org/maven2/de/dentrassi/kura/addons/de.dentrassi.kura.addons.utils.fileinstall/0.2.2/de.dentrassi.kura.addons.utils.fileinstall-0.2.2.dp && echo "de.dentrassi.kura.addons.utils.fileinstall=file:/opt/eclipse/kura/kura/packages/de.dentrassi.kura.addons.utils.fileinstall-0.2.2.dp" > /opt/eclipse/kura/kura/dpa.properties && echo "felix.fileinstall.disableNio2=true" >> /opt/eclipse/kura/kura/config.ini && mkdir /opt/eclipse/kura/load && chmod a+rw -R /opt/eclipse && find /opt/eclipse -type d | xargs chmod a+x && chmod a+rwx /var/log' returned a non-zero code: 1

Any idea what's going wrong?

Subscribe doesn’t work

Hello,
I have tried to subscribe to a kapua topic with this dockerised kura and it never worked.
I have the folowing error:
error
In the device log it says that there is a problem with "the exeption bundle US".
It works on kura with eclipse ide.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.