-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Splitting monolith app to micro services (#1490)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
- Loading branch information
1 parent
b362698
commit a6fa756
Showing
68 changed files
with
2,222 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/artifactrepo/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# | ||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others | ||
# | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
version: '3.7' | ||
|
||
services: | ||
# --------------------- | ||
# MySQL service | ||
# --------------------- | ||
mysql: | ||
image: "mysql:8.0" | ||
environment: | ||
MYSQL_DATABASE: "hawkbit" | ||
# MYSQL_USER: "root" is created by default in the container for mysql 8.0+ | ||
MYSQL_ALLOW_EMPTY_PASSWORD: "true" | ||
restart: always | ||
ports: | ||
- "3306:3306" | ||
labels: | ||
NAME: "mysql" | ||
|
||
# --------------------- | ||
# RabbitMQ service | ||
# --------------------- | ||
rabbitmq: | ||
image: "rabbitmq:3-management-alpine" | ||
hostname: "rabbitmq" | ||
environment: | ||
RABBITMQ_DEFAULT_VHOST: "/" | ||
RABBITMQ_DEFAULT_USER: "guest" | ||
RABBITMQ_DEFAULT_PASS: "guest" | ||
ports: | ||
- "15672:15672" | ||
- "5672:5672" | ||
deploy: | ||
restart_policy: | ||
condition: on-failure | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# | ||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others | ||
# | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
version: '3.7' | ||
|
||
services: | ||
# --------------------- | ||
# Postgres service | ||
# --------------------- | ||
postgres: | ||
image: "postgres:16.1" | ||
ports: | ||
- "5432:5432" | ||
deploy: | ||
restart_policy: | ||
condition: on-failure | ||
environment: | ||
POSTGRES_USER: "postgres" | ||
POSTGRES_PASSWORD: "admin" | ||
POSTGRES_DB: "hawkbit" | ||
|
||
# --------------------- | ||
# RabbitMQ service | ||
# --------------------- | ||
rabbitmq: | ||
image: "rabbitmq:3-management-alpine" | ||
hostname: "rabbitmq" | ||
environment: | ||
RABBITMQ_DEFAULT_VHOST: "/" | ||
RABBITMQ_DEFAULT_USER: "guest" | ||
RABBITMQ_DEFAULT_PASS: "guest" | ||
ports: | ||
- "15672:15672" | ||
- "5672:5672" | ||
deploy: | ||
restart_policy: | ||
condition: on-failure | ||
|
82 changes: 82 additions & 0 deletions
82
hawkbit-runtime/docker/docker-compose-micro-services-mysql.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# | ||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others | ||
# | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
version: '3.7' | ||
|
||
include: | ||
- docker-compose-deps-mysql.yml | ||
|
||
services: | ||
|
||
# --------------------- | ||
# HawkBit DDI | ||
# --------------------- | ||
hawkbit-ddi: | ||
image: "hawkbit/hawkbit-ddi-server:latest-mysql" | ||
environment: | ||
- 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit' | ||
- 'SPRING_RABBITMQ_HOST=rabbitmq' | ||
- 'SPRING_RABBITMQ_USERNAME=guest' | ||
- 'SPRING_RABBITMQ_PASSWORD=guest' | ||
- 'SPRING_DATASOURCE_USERNAME=root' | ||
restart: always | ||
ports: | ||
- "8081:8081" | ||
labels: | ||
NAME: "hawkbit-ddi" | ||
|
||
# --------------------- | ||
# HawkBit DMF | ||
# --------------------- | ||
hawkbit-dmf: | ||
image: "hawkbit/hawkbit-dmf-server:latest-mysql" | ||
environment: | ||
- 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit' | ||
- 'SPRING_RABBITMQ_HOST=rabbitmq' | ||
- 'SPRING_RABBITMQ_USERNAME=guest' | ||
- 'SPRING_RABBITMQ_PASSWORD=guest' | ||
- 'SPRING_DATASOURCE_USERNAME=root' | ||
restart: always | ||
labels: | ||
NAME: "hawkbit-dmf" | ||
|
||
# --------------------- | ||
# HawkBit MGMT | ||
# --------------------- | ||
hawkbit-mgmt: | ||
image: "hawkbit/hawkbit-mgmt-server:latest-mysql" | ||
environment: | ||
- 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit' | ||
- 'SPRING_RABBITMQ_HOST=rabbitmq' | ||
- 'SPRING_RABBITMQ_USERNAME=guest' | ||
- 'SPRING_RABBITMQ_PASSWORD=guest' | ||
- 'SPRING_DATASOURCE_USERNAME=root' | ||
restart: always | ||
ports: | ||
- "8080:8080" | ||
labels: | ||
NAME: "hawkbit-mgmt" | ||
|
||
|
||
# --------------------- | ||
# HawkBit MGMT | ||
# --------------------- | ||
hawkbit-vv8ui: | ||
image: "hawkbit/hawkbit-vv8-ui:latest-mysql" | ||
environment: | ||
- 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit' | ||
- 'SPRING_RABBITMQ_HOST=rabbitmq' | ||
- 'SPRING_RABBITMQ_USERNAME=guest' | ||
- 'SPRING_RABBITMQ_PASSWORD=guest' | ||
- 'SPRING_DATASOURCE_USERNAME=root' | ||
restart: always | ||
ports: | ||
- "8082:8082" | ||
labels: | ||
NAME: "hawkbit-vv8-ui" |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2023 Bosch.IO GmbH and others | ||
# | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
set -xe | ||
|
||
VERSION=0.4.0-SNAPSHOT | ||
FLAVOUR="standard" | ||
MVN_REPO=~/.m2/repository | ||
|
||
while getopts v:f:r: option | ||
do | ||
case "${option}" | ||
in | ||
v)VERSION=${OPTARG};; | ||
f)FLAVOUR=${OPTARG};; | ||
r)MVN_REPO=${OPTARG};; | ||
esac | ||
done | ||
|
||
echo "hawkBit version : ${VERSION}" | ||
echo "docker image flavour : ${FLAVOUR}" | ||
echo "maven repository : ${MVN_REPO}" | ||
|
||
if [ ${FLAVOUR} == "mysql" ] | ||
then | ||
DOCKER_FILE="Dockerfile_dev-mysql" | ||
TAG_SUFFIX="-mysql" | ||
else | ||
DOCKER_FILE="Dockerfile_dev" | ||
TAG_SUFFIX="" | ||
fi | ||
|
||
echo "docker file : ${DOCKER_FILE}" | ||
|
||
docker build -t hawkbit/hawkbit-ddi-server:${VERSION}${TAG_SUFFIX} -t hawkbit/hawkbit-ddi-server:latest${TAG_SUFFIX} --build-arg HAWKBIT_APP=hawkbit-ddi-server --build-arg HAWKBIT_VERSION=${VERSION} -f ${DOCKER_FILE} "${MVN_REPO}" | ||
docker build -t hawkbit/hawkbit-dmf-server:${VERSION}${TAG_SUFFIX} -t hawkbit/hawkbit-dmf-server:latest${TAG_SUFFIX} --build-arg HAWKBIT_APP=hawkbit-dmf-server --build-arg HAWKBIT_VERSION=${VERSION} -f ${DOCKER_FILE} "${MVN_REPO}" | ||
docker build -t hawkbit/hawkbit-mgmt-server:${VERSION}${TAG_SUFFIX} -t hawkbit/hawkbit-mgmt-server:latest${TAG_SUFFIX} --build-arg HAWKBIT_APP=hawkbit-mgmt-server --build-arg HAWKBIT_VERSION=${VERSION} -f ${DOCKER_FILE} "${MVN_REPO}" | ||
docker build -t hawkbit/hawkbit-vv8-ui:${VERSION}${TAG_SUFFIX} -t hawkbit/hawkbit-vv8-ui:latest${TAG_SUFFIX} --build-arg HAWKBIT_APP=hawkbit-vv8-ui --build-arg HAWKBIT_VERSION=${VERSION} -f ${DOCKER_FILE} "${MVN_REPO}" |
Oops, something went wrong.