Code format hawkbit-runtime (#1947)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-05 11:38:12 +02:00
committed by GitHub
parent 548c8d28a6
commit 3e469fa58c
49 changed files with 621 additions and 566 deletions

View File

@@ -3,15 +3,15 @@ hawkBit Sandbox
## Try out the update server in our hawkBit sandbox
- try out Management API https://hawkbit.eclipseprojects.io/rest/v1/targets (don't forget basic auth header; username: demo, passwd: demo)
- try out DDI API https://hawkbit.eclipseprojects.io/DEFAULT/controller/v1/MYTESTDEVICE
- try out Management API https://hawkbit.eclipseprojects.io/rest/v1/targets (don't forget basic auth header; username:
demo, passwd: demo)
- try out DDI API https://hawkbit.eclipseprojects.io/DEFAULT/controller/v1/MYTESTDEVICE
## Sandbox Setup
**1. File Structure**
**1. File Structure**
Copy the files to the respective location on the VM.
Copy the files to the respective location on the VM.
```
/
@@ -35,11 +35,12 @@ Reset the Sandbox once a week with a cron-job and log its output.
$ sudo /.sandbox/scripts/initialize-cronjobs.sh
```
**3. Nginx Reverse Proxy**
Start the stack for the Nginx reverse proxy with Let's Encrypt support. Thanks to JrCs for providing the Docker container
and instructions with his [Docker-Letsencrypt-Nginx-Companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion).
Start the stack for the Nginx reverse proxy with Let's Encrypt support. Thanks to JrCs for providing the Docker
container
and instructions with
his [Docker-Letsencrypt-Nginx-Companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion).
```
$ docker stack deploy -c /.sandbox/stacks/sandbox/docker-compose-stack.yml proxy

View File

@@ -27,21 +27,21 @@ services:
nginx:
image: "jwilder/nginx-proxy"
ports:
- 80:80
- 443:443
- 80:80
- 443:443
networks:
- proxy
- proxy
volumes:
- certificates:/etc/nginx/certs:ro
- vhost:/etc/nginx/vhost.d
- challange:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- certificates:/etc/nginx/certs:ro
- vhost:/etc/nginx/vhost.d
- challange:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
deploy:
replicas: 1
restart_policy:
condition: on-failure
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
# ---------------------
# lets encrypt nginx-proxy companion
@@ -49,12 +49,12 @@ services:
letsencrypt:
image: "jrcs/letsencrypt-nginx-proxy-companion"
networks:
- proxy
- proxy
volumes:
- certificates:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
- vhost:/etc/nginx/vhost.d
- challange:/usr/share/nginx/html
- certificates:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
- vhost:/etc/nginx/vhost.d
- challange:/usr/share/nginx/html
deploy:
replicas: 1
restart_policy:

View File

@@ -28,18 +28,18 @@ services:
hawkbit:
image: "hawkbit/hawkbit-update-server:latest"
networks:
- proxy_proxy
- sandbox
- proxy_proxy
- sandbox
deploy:
restart_policy:
condition: on-failure
environment:
- 'SPRING_PROFILES_ACTIVE=cloudsandbox'
- 'SPRING_RABBITMQ_HOST=rabbitmq'
- 'SPRING_RABBITMQ_USERNAME=guest'
- 'SPRING_RABBITMQ_PASSWORD=guest'
- 'VIRTUAL_HOST=hawkbit.eclipseprojects.io'
- 'LETSENCRYPT_HOST=hawkbit.eclipseprojects.io'
- 'SPRING_PROFILES_ACTIVE=cloudsandbox'
- 'SPRING_RABBITMQ_HOST=rabbitmq'
- 'SPRING_RABBITMQ_USERNAME=guest'
- 'SPRING_RABBITMQ_PASSWORD=guest'
- 'VIRTUAL_HOST=hawkbit.eclipseprojects.io'
- 'LETSENCRYPT_HOST=hawkbit.eclipseprojects.io'
# ---------------------
# hawkBit simulator
@@ -47,16 +47,16 @@ services:
simulator:
image: "hawkbit/hawkbit-device-simulator:latest"
networks:
- sandbox
- sandbox
deploy:
restart_policy:
condition: on-failure
environment:
- 'SPRING_RABBITMQ_VIRTUALHOST=/'
- 'SPRING_RABBITMQ_HOST=rabbitmq'
- 'SPRING_RABBITMQ_PORT=5672'
- 'SPRING_RABBITMQ_USERNAME=guest'
- 'SPRING_RABBITMQ_PASSWORD=guest'
- 'SPRING_RABBITMQ_VIRTUALHOST=/'
- 'SPRING_RABBITMQ_HOST=rabbitmq'
- 'SPRING_RABBITMQ_PORT=5672'
- 'SPRING_RABBITMQ_USERNAME=guest'
- 'SPRING_RABBITMQ_PASSWORD=guest'
# ---------------------
# RabbitMQ service
@@ -64,7 +64,7 @@ services:
rabbitmq:
image: "rabbitmq:3-management"
networks:
- sandbox
- sandbox
deploy:
restart_policy:
condition: on-failure