In this guide we describe how to setup a full featured hawkBit based on a production ready infrastructure.
It is based on the hawkBit update server.
The update server can in fact be run stand alone. However, only with an embedded H2, no Device Management Federation API and no artifact storage.
This guide describes a target architecture that is more like one that you will expect in a production system:
- hawkBit Update Server
- MariaDB / MySQL or PostgreSQL for the repository
- RabbitMQ for DMF communication
- You have a working hawkBit core build.
As mentioned you can create your own application with hawkBit inside.
For this you can either edit the existing application.properties
or create a new profile:
spring.jpa.database: MYSQL
spring.datasource.url: jdbc:mariadb://localhost:3306/YOUR_SCHEMA
spring.datasource.username: YOUR_USER
spring.datasource.password: YOUR_PWD
spring.datasource.driverClassName: org.mariadb.jdbc.DriverThe update server ships with a mysql profile (application-mysql.properties) with these settings for a local
MariaDB/MySQL (jdbc:mariadb://localhost:3306/hawkbit, user root), which you can activate with
--spring.profiles.active=mysql.
Alternatively, you can use PostgreSQL:
spring.jpa.database: POSTGRESQL
spring.datasource.url: jdbc:postgresql://localhost:5432/YOUR_SCHEMA
spring.datasource.username: YOUR_USER
spring.datasource.password: YOUR_PWD
spring.datasource.driverClassName: org.postgresql.DriverThe update server ships with a postgresql profile (application-postgresql.properties) with these settings for a
local PostgreSQL (jdbc:postgresql://localhost:5432/hawkbit, user postgres), which you can activate with
--spring.profiles.active=postgresql.
RabbitMQ is needed for the Device Management Federation API (DMF) and for the remote events between hawkBit instances (see Clustering). In the update server (monolith) it is disabled by default:
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration
hawkbit.dmf.enabled=false
hawkbit.events.remote.enabled=falseTo enable it, remove the RabbitAutoConfiguration exclusion (e.g. spring.autoconfigure.exclude=) and set
hawkbit.dmf.enabled=true (for DMF) and/or hawkbit.events.remote.enabled=true (for remote events).
Defaults are already provided for a standard Rabbit installation. Otherwise configure the following in
application.properties of the update server (or of each service in micro-service mode):
spring.rabbitmq.username: guest
spring.rabbitmq.password: guest
spring.rabbitmq.virtualHost: /
spring.rabbitmq.host: localhost
spring.rabbitmq.port: 5672See update server
Enjoy hawkBit with a real database, artifact storage and all interfaces available.