Eclipse hawkBit - Software Updates in IoT

hawkBit logo Process

Eclipse hawkBit is a domain independent back-end system for rolling out software updates to constrained edge devices as well as more powerful controllers and gateways connected to IP based networking infrastructure.

The project was started in November 2015, the initial contribution by Bosch followed soon after. The idea was from the beginning to create a set of Spring (Boot) modules that can be used to create a standalone software update cloud service or alternatively embed hawkBit into an existing application.

hawkBit provides a repository for devices and software artifacts combined with a software update management focused on IoT use cases. That includes APIs and a user interfaces for repository and update management (Management UI & API) operations.

For direct device integration hawkBit offers a simple HTTP based API with JSON payload (Direct Device Integration API – DDI). It allows device integrators to separate concerns by means of having distinguished channels for business data and general device management tasks on one side and software update on the other.

Indirect device integration (allows projects to leverage hawkBit on top of another connectivity layer) is provided with the Device Management Federation API (DMF) that is currently based on AMQP 0.9 but the goal is to offer an alternative based on Eclipse Hono in the future.

Indirect integration is especially useful if a constrained device cannot handle a TLS/HTTP connection, is supporting a standard device management protocol that covers also the software update part (e.g. TR-069, OMA-DM, LWM2M) or the device is already connected to a back-end and hawkBit is introduced later on.

This combination of UI and API for repository management and software update management in addition to the direct and indirect device integration options and last but not least the flexible Spring (Boot) based programming model offers hawkBit users several options for leveraging its capabilities:

  • Run hawkBit without the need to write even one line of code (except on the device) with DDI API and Management UI.
  • Run hawkBit as an extra service that is integrated into the IoT system landscape with DMF and Management API.
  • Embed hawkBit modules into another Java/Spring based cloud service.
  • In addition, all kinds of combinations depending on the use case.

hawkbit Process

Getting Started

Unfortunately, the project has not managed to provide release on maven central until now. As a result, a GitHub clone followed by a maven build is required.

 Listing 1 – Clone and build

$ git clone https://github.com/eclipse/hawkbit.git
$ mvn clean install

 End

hawkBit comes with an example Spring Boot app that contains its core functionality. Run it directly from your IDE or from the command line:

 Listing 2 – Run the example app

$ java -jar ./examples/hawkbit-example-app/target/hawkbit-example-app-0.2.0-SNAPSHOT.jar --hawkbit.dmf.rabbitmq.enabled=false

 End

If you open your browser you see hawkBit’s Management UI under http://localhost:8080/UI

Deployment Management Process

However, an empty system is kind of boring so we run two of the simulators that come with the project. First, the device simulator that connects to the hawkBit server through the HTTP based Direct Device Integration (DDI) API. Note: the simulator supports the AMQP based Device Management Federation (DMF) API as well.

 Listing 3 – Run the device simulator

$ java –jar ./examples/hawkbit-device-simulator/target/hawkbit-device-simulator-0.2.0-SNAPSHOT.jar --hawkbit.device.simulator.amqp.enabled=false
$ curl "http://localhost:8083/start?amount=10&api=ddi&polldelay=10"

 End

We got devices in the system now. We will also need software to install. Again we will keep it simple by means of skipping the use of real artifacts but instead creating software package metadata only. For that hawkBit offers a Management API simulator:

 Listing 4 – Generate data

$ java -jar ./examples/hawkbit-example-mgmt-simulator/target/hawkbit-example-mgmt-simulator-0.2.0-SNAPSHOT.jar

 End

After that we are ready to update our simulated devices. Happy deploying 😃



Deployment Gif

Status & Roadmap

The main goals for 2016 were modularization of the code base after the initial contribution, add more examples, offer better runtime scalability and come up with a first release. Things are looking good; last item missing on our list is actually the release.

2017 will be a all about the integration with other Eclipse IoT projects, especially Hono.

About the Authors

Kai Zimmermmann

Kai Zimmermann
Bosch SI