Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 3.5 KB

base-setup.md

File metadata and controls

102 lines (68 loc) · 3.5 KB

Base hawkBit setup

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.


System Architecture

This guide describes a target architecture that is more like one that you will expect in a production system:


Prerequisites

As mentioned you can create your own application with hawkBit inside.


Configure MariaDB/MySQL connection settings

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.Driver

The 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.


Configure PostgreSQL connection settings

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.Driver

The 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.


Configure RabbitMQ (optional)

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=false

To 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: 5672

Compile & Run

Compile & Run your app

See update server


Enjoy hawkBit with a real database, artifact storage and all interfaces available.