Skip to content

Commit 3f61cfd

Browse files
authored
PR template adjusted
1 parent 260acd3 commit 3f61cfd

File tree

6 files changed

+142
-49
lines changed

6 files changed

+142
-49
lines changed

.github/pull_request_template.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
1-
---
2-
name: Pull request template
3-
about: Create a pull request to contribute to our software
4-
title: ""
5-
labels: ""
6-
assignees: ""
7-
---
1+
# Description
82

9-
## Pull Request
3+
<!-- Add a short description of what the request is all about here -->
104

11-
### Description
5+
# Issue References
126

13-
### Reference
7+
<!-- Add the corresponding issues here -->
8+
9+
# Definition of Done
1410

15-
Issues:
11+
<!-- Check all completed DoD requirements here -->
1612

17-
### Definition of Done
1813
- [ ] Acceptance criteria are met
14+
- [ ] Testing is done (unit-tests, DEV-environment)
1915
- [ ] Build/Test workflow has successfully finished
2016
- [ ] Release notes are complemented
21-
- [ ] Documentation is complemented (operator manual, system specification)
22-
- [ ] Frontend is locally smoke-tested
23-
- [ ] Side branches are deleted
24-
- [ ] Board is updated
25-
- [ ] Infrastructure is adjusted
17+
- [ ] Documentation is complemented (operator manual, system specification, etc.)
Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
11
server:
2-
port: 39146
2+
port: 50001
33

4-
spring:
4+
logging:
5+
level:
6+
root: WARN
7+
de.muenchen.dave: INFO
58

9+
db.schema: dave_ng
10+
spring:
11+
flyway:
12+
enabled: true
13+
schemas: ${db.schema}
14+
defaultSchema: ${db.schema}
615
datasource:
7-
url: jdbc:h2:mem:testdb
8-
username: sa
9-
password:
10-
# Spring JPA
11-
h2.console.enabled: true
16+
url: jdbc:postgresql://postgres:5432/dave-db
17+
username: dave
18+
password: 1234
19+
driver-class-name: org.postgresql.Driver
20+
hikari:
21+
maximum-pool-size: 20 # Increase the maximum pool size (default: 10)
22+
connection-timeout: 600000 # Connection timeout in milliseconds (default: 30000)
1223
jpa:
13-
database: H2
24+
database: postgresql
1425
hibernate:
1526
# always drop and create the db should be the best
1627
# configuration for local (development) mode. this
1728
# is also the default, that spring offers by convention.
1829
# but here explicite:
1930
ddl-auto: create-drop
2031
naming.physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
32+
2133
# Logging for database operation
2234
show-sql: false
2335
properties:
2436
hibernate:
37+
default_schema: ${db.schema}
2538
format_sql: true
2639

2740
security:
2841
# possible values: none, all, changing (With changing, only changing requests such as POST, PUT, DELETE are logged)
2942
logging.requests: all
3043
oauth2:
3144
resource:
32-
user-info-uri: ${SSO_BASE_URL}/realms/${realm}/protocol/openid-connect/userinfo
45+
user-info-uri: ${SSO_BASE_URL}/auth/realms/${realm}/protocol/openid-connect/userinfo
3346
resourceserver:
3447
jwt:
3548
issuer-uri: ${SSO_BASE_URL}/auth/realms/${realm}
@@ -45,41 +58,45 @@ spring:
4558
authorization-grant-type: client_credentials
4659
client-authentication-method: client_secret_post
4760

48-
# Define the local keycloak realm here
61+
# Management
62+
management.health.elasticsearch.enabled: false
63+
64+
# Define the keycloak realm here
4965
realm: Dave
5066

67+
elasticsearch.index.suffix: -ng
5168
elasticsearch:
5269
user: elastic
53-
password:
54-
host: localhost
70+
host: elastic
5571
port: 9200
5672
connectTimeout: 10
5773
socketTimeout: 30
5874

5975
dave:
6076
zaehlung:
61-
status-updater:
77+
status:
6278
# Alle 5 min
63-
cron: 0 0/5 * 1/1 * ?
64-
# Sollte immer knapp unter dem Cron sein
65-
shedlock: 4m
79+
updater: 0 0 * 1/1 * ?
6680
email:
67-
address: dave-dummy@muenchen.de
81+
address: dave-dummy@mail.de
6882
password: dummy
6983
url:
7084
adminportal: http://localhost:8085
7185
selfserviceportal: http://localhost:8086
7286
receiver:
73-
# Alle 1 min
74-
cron: 0 0/1 * 1/1 * ?
75-
# Sollte immer knapp unter dem Cron sein
76-
shedlock: 55s
77-
87+
# Update-Intervall in Millisekunden für den Email-Abruf
88+
update-interval: 50000000000
89+
hostname: imap.de
7890
messstelle:
79-
cron: 0 0/17 * 1/1 * ?
91+
# Alle 5 min
92+
cron: 0 0 * 1/1 * ?
93+
# Sollte immer knapp unter dem Cron sein
8094
shedlock: 4m
95+
reports:
96+
logo-icon: classpath:/pdf/images/kindl.jpg
97+
logo-subtitle: "Landeshauptstadt<br/>München<br/><b>Mobilitätsreferat</b>"
98+
99+
geodaten.eai.url: http://localhost:8088
81100

82-
geodaten:
83-
eai:
84-
url: http://localhost:8088
101+
document-storage.url: http://localhost:8089
85102

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
spring.jpa.defer-datasource-initialization: true
21
spring.sql.init.data-locations: classpath:/data/sample-data.sql

stack/.env

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ ELASTIC_PASSWORD=changeme
55
KIBANA_PASSWORD=changeme
66

77
# Version of Elastic products
8-
STACK_VERSION=8.13.4
8+
STACK_VERSION=8.13.4
9+
10+
# Elasticseach CA certificate fingerprint
11+
ELASTICSEARCH_CERT_FINGERPRINT=

stack/docker-compose.yml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: dave-stack
22

33
services:
44
setup:
5-
image: elasticsearch:${STACK_VERSION}
5+
container_name: setup
6+
image: docker.io/library/elasticsearch:${STACK_VERSION}
67
volumes:
78
- elastic-certs:/usr/share/elasticsearch/config/certs
89
user: "0"
@@ -51,10 +52,11 @@ services:
5152
retries: 120
5253

5354
elastic:
55+
container_name: elastic
5456
depends_on:
5557
setup:
5658
condition: service_healthy
57-
image: elasticsearch:${STACK_VERSION}
59+
image: docker.io/library/elasticsearch:${STACK_VERSION}
5860
volumes:
5961
- elastic-certs:/usr/share/elasticsearch/config/certs
6062
- elastic-data:/usr/share/elasticsearch/data
@@ -94,10 +96,11 @@ services:
9496
retries: 120
9597

9698
kibana:
99+
container_name: kibana
97100
depends_on:
98101
elastic:
99102
condition: service_healthy
100-
image: kibana:${STACK_VERSION}
103+
image: docker.io/library/kibana:${STACK_VERSION}
101104
volumes:
102105
- elastic-certs:/usr/share/kibana/config/certs
103106
- kibana-data:/usr/share/kibana/data
@@ -121,6 +124,7 @@ services:
121124
retries: 120
122125

123126
postgres:
127+
container_name: postgres
124128
image: postgres:16.6-alpine3.21
125129
environment:
126130
- POSTGRES_DB=dave-db
@@ -141,6 +145,7 @@ services:
141145

142146
# see https://event-driven.io/en/automatically_connect_pgadmin_to_database/
143147
pg-admin:
148+
container_name: pg-admin
144149
image: dpage/pgadmin4:8.14
145150
environment:
146151
@@ -162,6 +167,39 @@ services:
162167
user: root # see https://github.com/pgadmin-org/pgadmin4/issues/6257
163168
entrypoint: /bin/sh -c "chmod 600 /pgadmin4/pgpass; /entrypoint.sh;" # see https://www.postgresql.org/docs/current/libpq-pgpass.html#LIBPQ-PGPASS (last paragraph)
164169

170+
dave-backend:
171+
container_name: dave-backend
172+
profiles: [sample-stack]
173+
image: ghcr.io/it-at-m/dave-backend/dave-backend:latest
174+
environment:
175+
- ELASTICSEARCH_PASSWORD=${ELASTIC_PASSWORD}
176+
- ELASTICSEARCH_HTTPCACERTIFICATE=${ELASTICSEARCH_CERT_FINGERPRINT}
177+
- SPRING_PROFILES_ACTIVE=docker,no-security,debugging,sample
178+
- SSO_BASE_URL=http://sso.de
179+
ports:
180+
- "50001:50001"
181+
pull_policy: always
182+
restart: on-failure
183+
healthcheck:
184+
test: [ "CMD-SHELL", "curl http://dave-backend:50001/actuator/health | grep -q '\"status\":\"UP\"'", ]
185+
interval: 1s
186+
timeout: 5s
187+
retries: 120
188+
189+
dave-frontend:
190+
container_name: dave-frontend
191+
profiles: [sample-stack]
192+
depends_on:
193+
dave-backend:
194+
condition: service_healthy
195+
image: ghcr.io/it-at-m/dave-frontend/dave-frontend:latest
196+
environment:
197+
- SPRING_PROFILES_ACTIVE=docker,no-security
198+
- SSO_BASE_URL=http://sso.de
199+
ports:
200+
- "8082:8082"
201+
pull_policy: always
202+
165203
volumes:
166204
pg_data:
167205
elastic-certs:

stack/readme.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,48 @@ Bevor das Backend gestartet werde kann muss die application-local agepasst werde
6666
* * password:1234
6767
* elasticsearch:
6868
* * password:changeme
69-
* * http-ca-certificate: <generate>
69+
* * http-ca-certificate: <generate>
70+
71+
# DAVe sample stack
72+
73+
DAVe __sollte__ in Produktionsumgebungen via [helm chart](https://artifacthub.io/packages/helm/it-at-m/dave?modal=install) installiert und betrieben werden.
74+
75+
Aber für einen ersten Einblick in das, was DAVe zu bieten hat oder für Entwicklungsumgebungen stellen wir eine
76+
[docker-compose](https://github.com/it-at-m/dave-backend/blob/sprint/stack/docker-compose.yml)-Datei zur Verfügung,
77+
die neben der benötigten Infrastruktur auch Frontend und Backend mit einem Beispieldatensatz einer Zählstelle startet.
78+
79+
Folgende Schritte sind hierfür nötig:
80+
81+
1. Docker und Docker Compose installieren: Sie müssen Docker und Docker Compose auf Ihrem System installiert haben.
82+
Wenn Sie diese noch nicht installiert haben, können Sie die offizielle Dokumentation befolgen, um sie zu installieren.
83+
Mit den folgenden Befehlen können Sie überprüfen, ob sie installiert sind:
84+
```
85+
docker --version
86+
docker compose --version
87+
```
88+
Alternativ zu Docker kann auch [Podman](https://podman.io/) verwendet werden.
89+
90+
2. Infrastruktur starten: Die Infrastruktur-Container können mit folgenden Befehlen gestartet werden:
91+
```
92+
cd stack
93+
source .env
94+
docker compose up
95+
```
96+
97+
3. Elasticsearch Zertifikat einbinden: Folgen Sie den Anweisungen unter [Erzeugen des Fingerprints](#erzeugen-des-fingerprints),
98+
um das von Elasticsearch verwendete Zertifikat für die verschlüsselte Verbindung zu erhalten.
99+
Dann fügen Sie den Fingerprint als Umgebungsvariable ELASTICSEARCH_CERT_FINGERPRINT im [.env-File](https://github.com/it-at-m/dave-frontend/blob/sprint/stack/.env) ein
100+
und lesen die Datei nochmal ein:
101+
```
102+
source .env
103+
```
104+
105+
4. Backend und Frontend hochfahren: Fahren Sie die beiden Container wie folgt hoch:
106+
```
107+
docker compose --profile sample-stack up
108+
```
109+
110+
5. Auf die Anwendung zugreifen: Sobald alle Container betriebsbereit sind, können Sie die DAVe UI verwenden,
111+
indem Sie im Browser zu http://localhost:8082 navigieren.
112+
113+
Das war's! Sie haben den Anwendungsstack für DAVe erfolgreich installiert und gestartet.

0 commit comments

Comments
 (0)