Docs: Add configuration and usage instructions for the hawkbit-update-server
It would be helpful if we'd provide a README.md with configuration and usage instructions for the hawkbit-update-server consistent with our other components like for example hawkbit/hawkbit-repository/hawkbit-repository-jpa-init/README.md.
What shall be explained more in that readme? The update server does initialize the database by itself.
IMO putting references to the implicit auto-configurations in
- hawkbit/hawkbit-monolith/hawkbit-update-server/src/main/resources/application.properties,
- hawkbit/hawkbit-monolith/hawkbit-update-server/src/main/resources/application-mysql.properties and
- hawkbit/hawkbit-monolith/hawkbit-update-server/src/main/resources/application-postgresql.properties
into the README.md would be little overhead and sufficient (configuration interface can be referenced for non-developer people).
The default behavior is still implicit of course (e.g. dmf is disabled by default). A corresponding note about runtime configure-ability via docker compose 'SPRING_APPLICATION_JSON={"hawkbit.dmf.enabled": true}' would prevent a lot of unnecessary questions in other github issues and the gitter chats I guess.
It would be helpful to provide a reference to docs.spring.io/spring-boot/ > Encrypting Properties (Spring Boot lacks a built-in support for encrypting property values).
@avgustinmm ATM I'm not able to setup a strict health-check based service dependency chain in the mysql docker compose setup.
services:
mysql:
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
start_period: 10s
start_interval: 1s
interval: 5s
timeout: 2s
retries: 1
rabbitmq:
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
start_period: 10s
start_interval: 1s
interval: 5s
timeout: 2s
retries: 1
hawkbit-update-server:
healthcheck:
test: ["CMD", "curl", "-f", "localhost"]
start_period: 30s
start_interval: 1s
interval: 5s
timeout: 2s
retries: 1
depends_on:
mysql:
condition: service_healthy
rabbitmq:
condition: service_healthy
hawkbit-simple-ui:
depends_on:
hawkbit-update-server:
condition: service_started -> no strict service_healthy possible ATM
In general the hawkbit-update-server is running (APIs available and query-able, etc.). What's the minimal set of SPRING_* environment variables which need to be passed to the hawkbit-update-server (to override implicitly set auto-configured Spring properties) to make it run healthy?
Is it possible to cleanly disable the DMF component and API? If so: How?
I've created a Dockerfile with entrypoint.sh script which allows to cleanly inject Spring Boot application properties via env vars. In general the approach works cause I can inject SPRING_PROFILES_ACTIVE and the like. I tried to disable the DMF component and API with SPRING_HAWKBIT_DMF_ENABLED=false. However the hawkbit-update-server still tries to connect to the rabbitmq service (AMQP).
hawkbit-update-server-1 | org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused
...
hawkbit-update-server-1 | <skipped cause noise only here> o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
which should be optional as well.
As a consequence the hawkbit-update-server potentially never results in a service_healthy state. (There is no docker compose file which checks the healthy-ness of the hawkbit-update-server at all. E.g. the hawkbit-simple-ui could do so cause it depends on the backend to be available).