GithubHelp home page GithubHelp logo

lvxingtu / carprov Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sandermak/carprov

0.0 1.0 0.0 22.67 MB

Small example of how an 'embedded' application can be modularized

Shell 4.09% Java 95.91%

carprov's Introduction

Example code for 'Provisioning the IoT'

This repo contains a sample application that is used for the presentation 'Provisioning the IoT' by Paul Bakker and Sander Mak. Slides for this talk can be found here.

The application itself is a small dashboard with apps that could run as an in-car entertainment system:

The dashboard with some apps

Technology

The sample app is created with a JavaFX user-interface. Under the hood, OSGi is used to create separate modules for the dashboard and each of the apps. In our demo, we deploy these bundles in a modular fashion to targets using Apache ACE.

Building and running the code

You need a Java 8 JDK installed to build the code. There are two ways two build:

  • offline, using Gradle: ./gradlew build
  • interactive, by importing the projects into an Eclipse installation with the BndTools plugin installed

In both cases, the bundles end up in the generated folders of the subprojects.

You can run the sample by right-clicking carprov.dashboard/carprov.bndrun in Eclipse and selecting 'Run as -> Bnd OSGi Run Launcher'. Alternatively you can create a runnable jar containing all modules. Do this with ./gradlew export and start the exported jar directly: java -jar carprov.dashboard/generated/distributions/executable/carprov.jar

Demo scenario

In order to reproduce the demo scenario of the talk, you need to run an Apache ACE server and at least one target to provision to. They can run on the same machine or on different machines. Start by downloading Apache ACE (binary distribution) and unpack it. Then, run the server:

java -jar server-allinone/server-allinone.jar

You can verify it is running correctly by going to the ACE UI (login with default user/password d/f). Now, we need to run a target that receives the actual software we want to provision. You can do this by running the ace-demo/scripts/car1-target-launch.sh script from the server-allinone/store directory of the ACE installation. You can do this on the same machine or on a different machine. Just make sure to update the address of the agent.discovery.serverurls in the script to point to where your ACE server is running.

After starting the target, you should see car1 coming up as target in the ACE UI after clicking retrieve. You can now proceed and upload the bundles from ace-demo/bundles (or your own bundles) and link them to features/distributions/targets to start provisioning.

carprov's People

Watchers

James Cloos avatar

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.