PostgreSQL support (#932)
* PostgreSQL support Signed-off-by: Andrey Voronkov <avoronkov@enapter.com> * Add Enapter (c) to licenses. Signed-off-by: Andrey Voronkov <avoronkov@enapter.com> * Remove PostgreSQL dockerfiles and generator Signed-off-by: Andrey Voronkov <avoronkov@enapter.com> * Add ENAPTER license header to the valid headers list. Signed-off-by: Andrey Voronkov <avoronkov@enapter.com> * Fix sp_rollout table boolean value Signed-off-by: Andrey Voronkov <avoronkov@enapter.com>
This commit is contained in:
@@ -21,7 +21,7 @@ $ docker-compose up -d
|
||||
```
|
||||
|
||||
|
||||
## C: Docker Stack
|
||||
## C: Docker Stack
|
||||
|
||||
Start the hawkBit Update Server and Device Simulator together with an MySQL and RabbitMQ instance as services within a swarm
|
||||
|
||||
@@ -30,16 +30,16 @@ $ docker swarm init
|
||||
$ docker stack deploy -c docker-compose-stack.yml hawkbit
|
||||
```
|
||||
|
||||
# Access
|
||||
# Access
|
||||
|
||||
| Service / Container | URL | Login | A | B | C |
|
||||
|---|---|---|---|---|---|
|
||||
| hawkBit Update Server | [http://localhost:8080/](http://localhost:8080/) | admin:admin | ✓ | ✓ | ✓ |
|
||||
| hawkBit Device Simulator | [http://localhost:8083/](http://localhost:8083/) | - | | | ✓ |
|
||||
| MySQL | localhost:3306/hawkbit | root | | ✓ | ✓ |
|
||||
| RabbitMQ | [http://localhost:15672](http://localhost:15672) | guest:guest | | ✓ | ✓ |
|
||||
| hawkBit Update Server | [http://localhost:8080/](http://localhost:8080/) | admin:admin | ✓ | ✓ | ✓ |
|
||||
| hawkBit Device Simulator | [http://localhost:8083/](http://localhost:8083/) | - | | | ✓ |
|
||||
| MySQL | localhost:3306/hawkbit | root | | ✓ | ✓ |
|
||||
| RabbitMQ | [http://localhost:15672](http://localhost:15672) | guest:guest | | ✓ | ✓ |
|
||||
|
||||
# Configuration
|
||||
# Configuration
|
||||
|
||||
You can override application.properties by setting an environment variable SPRING_APPLICATION_JSON for hawkbit container.
|
||||
```
|
||||
@@ -58,4 +58,4 @@ hawkbit:
|
||||
"hawkbit.server.im.users[0].lastname": "HawkBit",
|
||||
"hawkbit.server.im.users[0].permissions": "ALL"
|
||||
}'
|
||||
```
|
||||
```
|
||||
|
||||
4
hawkbit-runtime/docker/generator/generate.sh
Normal file → Executable file
4
hawkbit-runtime/docker/generator/generate.sh
Normal file → Executable file
@@ -23,5 +23,5 @@ cp ./template/KEY-mysql "../$HAWKBIT_VERSION-mysql/KEY"
|
||||
cp ./template/Dockerfile "../$HAWKBIT_VERSION/Dockerfile"
|
||||
cp ./template/Dockerfile-mysql "../$HAWKBIT_VERSION-mysql/Dockerfile"
|
||||
|
||||
sed -i '' -e "s/{{BASE_IMAGE}}/${BASE_IMAGE}/g; s/{{HAWKBIT_VERSION}}/$HAWKBIT_VERSION/g" "../$HAWKBIT_VERSION/Dockerfile"
|
||||
sed -i '' -e "s/{{HAWKBIT_VERSION}}/$HAWKBIT_VERSION/g; s/{{MARIADB_DRIVER_VERSION}}/$MARIADB_DRIVER_VERSION/g" "../$HAWKBIT_VERSION-mysql/Dockerfile"
|
||||
sed -i -e "s/{{BASE_IMAGE}}/${BASE_IMAGE}/g; s/{{HAWKBIT_VERSION}}/$HAWKBIT_VERSION/g" "../$HAWKBIT_VERSION/Dockerfile"
|
||||
sed -i -e "s/{{HAWKBIT_VERSION}}/$HAWKBIT_VERSION/g; s/{{MARIADB_DRIVER_VERSION}}/$MARIADB_DRIVER_VERSION/g" "../$HAWKBIT_VERSION-mysql/Dockerfile"
|
||||
|
||||
@@ -59,6 +59,10 @@
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
|
||||
# This profile adds basic configurations for a MySQL DB usage.
|
||||
# This profile adds basic configurations for a MySQL DB usage.
|
||||
# Keep in mind that you need the MariaDB driver in your classpath on compile.
|
||||
# see https://www.eclipse.org/hawkbit/guides/runhawkbit/
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# Copyright (c) 2020 Enapter Co.,Ltd.
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License v1.0
|
||||
# which accompanies this distribution, and is available at
|
||||
# http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
|
||||
# This profile adds basic configurations for a PostgreSQL usage.
|
||||
# Keep in mind that you need the PostgreSQL driver in your classpath on compile.
|
||||
# see https://www.eclipse.org/hawkbit/guides/runhawkbit/
|
||||
|
||||
spring.jpa.database=POSTGRESQL
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/hawkbit
|
||||
spring.datasource.username=postgres
|
||||
spring.datasource.password=
|
||||
spring.datasource.driverClassName=org.postgresql.Driver
|
||||
@@ -27,7 +27,7 @@ spring.rabbitmq.virtual-host=/
|
||||
spring.rabbitmq.host=localhost
|
||||
spring.rabbitmq.port=5672
|
||||
|
||||
# Define own users instead of default "admin" user:
|
||||
# Define own users instead of default "admin" user:
|
||||
#hawkbit.server.im.users[0].username=hawkbit
|
||||
#hawkbit.server.im.users[0].password={noop}isAwesome!
|
||||
#hawkbit.server.im.users[0].firstname=Eclipse
|
||||
|
||||
Reference in New Issue
Block a user