Move all DMF artifacts in hawkbit-dmf (#2000)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-11 14:22:11 +02:00
committed by GitHub
parent f223ebf3a8
commit 25c09a7d39
21 changed files with 70 additions and 35 deletions

View File

@@ -27,12 +27,6 @@
<version>${project.version}</version> <version>${project.version}</version>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-dmf-amqp</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.hawkbit</groupId> <groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-repository-jpa</artifactId> <artifactId>hawkbit-repository-jpa</artifactId>

View File

@@ -1,6 +1,5 @@
org.eclipse.hawkbit.autoconfigure.cache.CacheAutoConfiguration org.eclipse.hawkbit.autoconfigure.cache.CacheAutoConfiguration
org.eclipse.hawkbit.autoconfigure.ddi.DDiApiAutoConfiguration org.eclipse.hawkbit.autoconfigure.ddi.DDiApiAutoConfiguration
org.eclipse.hawkbit.autoconfigure.dmf.amqp.DmfApiAutoConfiguration
org.eclipse.hawkbit.autoconfigure.mgmt.MgmtApiAutoConfiguration org.eclipse.hawkbit.autoconfigure.mgmt.MgmtApiAutoConfiguration
org.eclipse.hawkbit.autoconfigure.repository.event.EventPublisherAutoConfiguration org.eclipse.hawkbit.autoconfigure.repository.event.EventPublisherAutoConfiguration
org.eclipse.hawkbit.autoconfigure.repository.ArtifactFilesystemAutoConfiguration org.eclipse.hawkbit.autoconfigure.repository.ArtifactFilesystemAutoConfiguration

View File

@@ -14,13 +14,32 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.eclipse.hawkbit</groupId> <groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-starters</artifactId> <artifactId>hawkbit-dmf-parent</artifactId>
<version>${revision}</version> <version>${revision}</version>
</parent> </parent>
<artifactId>hawkbit-boot-starter-dmf-api</artifactId> <artifactId>hawkbit-boot-starter-dmf-api</artifactId>
<name>hawkBit :: Spring Boot Starter DMF API</name> <name>hawkBit :: Spring Boot Starter DMF API</name>
<dependencies> <dependencies>
<!-- hawkBit - START -->
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-repository-jpa</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-dmf-amqp</artifactId>
<version>${project.version}</version>
</dependency>
<!-- hawkBit - END -->
<!-- Spring - START --> <!-- Spring - START -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
@@ -36,23 +55,22 @@
</dependency> </dependency>
<!-- Spring - END --> <!-- Spring - END -->
<!-- hawkBit - START -->
<dependency> <dependency>
<groupId>org.eclipse.hawkbit</groupId> <groupId>com.h2database</groupId>
<artifactId>hawkbit-dmf-amqp</artifactId> <artifactId>h2</artifactId>
<version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.hawkbit</groupId> <groupId>com.microsoft.sqlserver</groupId>
<artifactId>hawkbit-repository-jpa</artifactId> <artifactId>mssql-jdbc</artifactId>
<version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.hawkbit</groupId> <groupId>org.postgresql</groupId>
<artifactId>hawkbit-autoconfigure</artifactId> <artifactId>postgresql</artifactId>
<version>${project.version}</version>
</dependency> </dependency>
<!-- hawkBit - END -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@@ -0,0 +1 @@
org.eclipse.hawkbit.autoconfigure.dmf.amqp.DmfApiAutoConfiguration

View File

@@ -18,6 +18,7 @@
<artifactId>hawkbit-dmf-parent</artifactId> <artifactId>hawkbit-dmf-parent</artifactId>
<version>${revision}</version> <version>${revision}</version>
</parent> </parent>
<artifactId>hawkbit-dmf-amqp</artifactId> <artifactId>hawkbit-dmf-amqp</artifactId>
<name>hawkBit :: DMF :: AMQP 0.9 Implementation</name> <name>hawkBit :: DMF :: AMQP 0.9 Implementation</name>

View File

@@ -12,12 +12,12 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.eclipse.hawkbit</groupId> <groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-dmf-parent</artifactId> <artifactId>hawkbit-dmf-parent</artifactId>
<version>${revision}</version> <version>${revision}</version>
</parent> </parent>
<artifactId>hawkbit-dmf-api</artifactId> <artifactId>hawkbit-dmf-api</artifactId>
<name>hawkBit :: DMF :: API</name> <name>hawkBit :: DMF :: API</name>

View File

@@ -19,6 +19,7 @@
<artifactId>hawkbit-dmf-parent</artifactId> <artifactId>hawkbit-dmf-parent</artifactId>
<version>${revision}</version> <version>${revision}</version>
</parent> </parent>
<artifactId>hawkbit-dmf-rabbitmq-test</artifactId> <artifactId>hawkbit-dmf-rabbitmq-test</artifactId>
<name>hawkBit :: DMF :: RabbitMq Test module</name> <name>hawkBit :: DMF :: RabbitMq Test module</name>

View File

@@ -1,48 +1,40 @@
# hawkBit DMF Server (EXPERIMENTAL!) # hawkBit DMF Server
The hawkBit DMF Server is a standalone spring-boot application with an embedded servlet container. It should be started The hawkBit DMF Server is a standalone spring-boot application with an embedded servlet container. It should be started
with at least hawkbit-mgmt-server. with at least hawkbit-mgmt-server.
## On your own workstation ## On your own workstation
### Run ### Run
```bash ```bash
java -jar hawkbit-runtime/hawkbit-dmf-server/target/hawkbit-dmf-server-*-SNAPSHOT.jar java -jar hawkbit-runtime/hawkbit-dmf-server/target/hawkbit-dmf-server-*-SNAPSHOT.jar
``` ```
_(Note: you have to add the JDBC driver also to your class path if you intend to use another database than H2.)_ _(Note: you have to add the JDBC driver also to your class path if you intend to use another database than H2.)_
Or: Or:
```bash ```bash
run org.eclipse.hawkbit.app.dmf.DMFStart run org.eclipse.hawkbit.app.dmf.DMFStart
``` ```
### Clustering (Experimental!!!) ### Clustering (Experimental)
The micro-service instances are configured to communicate via Spring Cloud Bus. You could run multiple instances of any The micro-service instances are configured to communicate via Spring Cloud Bus. You could run multiple instances of any
micro-service but hawkbit-mgmt-server. Management server run some schedulers which shall not run simultaneously - e.g. micro-service but hawkbit-mgmt-server. Management server run some schedulers which shall not run simultaneously - e.g.
auto assignment checker and rollouts executor. To run multiple management server instances you shall do some extensions auto assignment checker and rollouts executor. To run multiple management server instances you shall do some extensions
of hawkbit to ensure that they wont run schedulers simultaneously or you shall configure all instances but one to do not of hawkbit to ensure that they wont run schedulers simultaneously or you shall configure all instances but one to do not
run schedulers! run schedulers!
## Optional Protostuff for Sprign cloud bus ## Optional Protostuff for Spring cloud bus
The micro-service instances are configured to communicate via Spring Cloud Bus. Optionally, you could The micro-service instances are configured to communicate via Spring Cloud Bus. Optionally, you could
use [Protostuff](https://github.com/protostuff/protostuff) based message payload serialization for improved performance. use [Protostuff](https://github.com/protostuff/protostuff) based message payload serialization for improved performance.
**Note**: If Protostuff is enabled it shall be enabled on all microservices! **Note**: If Protostuff is enabled it shall be enabled on all microservices!
Add/Uncomment to/in your `application.properties` : Add/Uncomment to/in your `application.properties` :
```properties ```properties
spring.cloud.stream.bindings.springCloudBusInput.content-type=application/binary+protostuff spring.cloud.stream.bindings.springCloudBusInput.content-type=application/binary+protostuff
spring.cloud.stream.bindings.springCloudBusOutput.content-type=application/binary+protostuff spring.cloud.stream.bindings.springCloudBusOutput.content-type=application/binary+protostuff
``` ```
Add to your `pom.xml` : Add to your `pom.xml` :
```xml ```xml
<dependency> <dependency>
<groupId>io.protostuff</groupId> <groupId>io.protostuff</groupId>

View File

@@ -14,9 +14,10 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.eclipse.hawkbit</groupId> <groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-runtime-parent</artifactId> <artifactId>hawkbit-dmf-parent</artifactId>
<version>${revision}</version> <version>${revision}</version>
</parent> </parent>
<artifactId>hawkbit-dmf-server</artifactId> <artifactId>hawkbit-dmf-server</artifactId>
<name>hawkBit :: Runtime :: DMF Server</name> <name>hawkBit :: Runtime :: DMF Server</name>
@@ -36,4 +37,31 @@
<artifactId>spring-cloud-stream-binder-rabbit</artifactId> <artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
</project>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<outputDirectory>${baseDir}</outputDirectory>
<mainClass>${spring.app.class}</mainClass>
<layout>JAR</layout>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>

View File

@@ -24,6 +24,9 @@
<modules> <modules>
<module>hawkbit-dmf-api</module> <module>hawkbit-dmf-api</module>
<module>hawkbit-dmf-amqp</module> <module>hawkbit-dmf-amqp</module>
<module>hawkbit-boot-starter-dmf-api</module>
<module>hawkbit-dmf-server</module>
<module>hawkbit-dmf-rabbitmq-test</module> <module>hawkbit-dmf-rabbitmq-test</module>
</modules> </modules>
</project> </project>

View File

@@ -86,7 +86,6 @@
<modules> <modules>
<module>hawkbit-ddi-server</module> <module>hawkbit-ddi-server</module>
<module>hawkbit-dmf-server</module>
<module>hawkbit-mgmt-server</module> <module>hawkbit-mgmt-server</module>
<module>hawkbit-simple-ui</module> <module>hawkbit-simple-ui</module>

View File

@@ -24,6 +24,5 @@
<module>hawkbit-boot-starter</module> <module>hawkbit-boot-starter</module>
<module>hawkbit-boot-starter-mgmt-api</module> <module>hawkbit-boot-starter-mgmt-api</module>
<module>hawkbit-boot-starter-ddi-api</module> <module>hawkbit-boot-starter-ddi-api</module>
<module>hawkbit-boot-starter-dmf-api</module>
</modules> </modules>
</project> </project>