Compare commits

...

3 Commits

Author SHA1 Message Date
Sheldan
ac93e11a47 [OPB-xxx] remove not accurate technology section 2024-03-17 13:49:31 +01:00
Sheldan
5bfe4a4aeb [OPB-xxx] upgrading abstracto version 2024-03-17 13:22:36 +01:00
Sheldan
216c578e08 [OPB-xxx] restructuring to use local postgres container for dev purposes
adding debug options to local dev version
removing deprecated flag from tilt file
2024-03-17 13:22:05 +01:00
12 changed files with 31 additions and 19 deletions

2
.env
View File

@@ -1,4 +1,4 @@
REGISTRY_PREFIX=harbor.sheldan.dev/oneplus-bot/
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
VERSION=1.6.21
ABSTRACTO_VERSION=1.5.26
ABSTRACTO_VERSION=1.5.27

2
.gitignore vendored
View File

@@ -22,5 +22,7 @@ target/
*.rar
*.tgz
Chart.lock
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

3
.tiltignore Normal file
View File

@@ -0,0 +1,3 @@
*.tgz
tilt/oneplusbot-dev/tmpcharts/
tilt/oneplusbot-dev/charts/*.tgz

View File

@@ -11,11 +11,3 @@ Custom features which were ported
- [x] Setup channel handling
- [x] Referral link handling
# Technologies used in addition to the ones provided in abstracto
- [grafana](https://github.com/grafana/grafana) for visualization of the bot status and metrics
- [Loki](https://github.com/grafana/loki) to visualize and query log files
- [pgAdmin](https://github.com/postgres/pgadmin4) to view the database
- [prometheus](https://github.com/prometheus/prometheus) for metric collection
- [postgres](https://github.com/postgres/postgres) as a database
- [loki](https://github.com/grafana/loki) for log aggregation

View File

@@ -18,7 +18,7 @@ local_resource(
docker_build_with_restart(
registry + 'oneplus-bot-image',
'./application/executable/target/jar',
entrypoint=['java', '-noverify', '-cp', '.:./lib/*', 'dev.sheldan.oneplus.bot.executable.Application'],
entrypoint=['java', '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005', '-cp', '.:./lib/*', 'dev.sheldan.oneplus.bot.executable.Application'],
dockerfile='./application/executable/Dockerfile',
live_update=[
sync('./application/executable/target/jar/BOOT-INF/lib', '/app/lib'),
@@ -33,7 +33,8 @@ docker_build(registry + 'oneplus-bot-template-data', 'deployment/image-packaging
docker_build(registry + 'oneplus-bot-private-rest-api', 'deployment/image-packaging/src/main/docker/private-rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry})
k8s_yaml(helm('deployment/helm/oneplus-bot', values=
local('cd tilt/oneplusbot-dev && helm dep up')
k8s_yaml(helm('tilt/oneplusbot-dev', values=
['./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.yaml',
'secrets://./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.secrets.yaml']
))

View File

@@ -2,8 +2,8 @@ spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
spring.datasource.username= ${DB_USER}
spring.datasource.password= ${DB_PASS}
spring.datasource.hikari.maximum-pool-size=${hikariPoolSize}
spring.jpa.hibernate.default_schema=abstracto
spring.jpa.properties.hibernate.default_schema=abstracto
spring.jpa.hibernate.default_schema=${DB_SCHEMA}
spring.jpa.properties.hibernate.default_schema=${DB_SCHEMA}
spring.quartz.jdbc.initialize-schema=never
management.metrics.tags.application=OnePlusBot
management.endpoint.health.probes.enabled=true

View File

@@ -48,7 +48,7 @@ spec:
name: db-credentials
key: dbName
- name: DB_SCHEME
value: "abstracto"
value: {{ .Values.dbCredentials.schema }}
volumeMounts:
- mountPath: "/var/db-config/"
name: database-config-mount

View File

@@ -57,6 +57,8 @@ spec:
secretKeyRef:
name: db-credentials
key: dbName
- name: DB_SCHEMA
value: {{ .Values.dbCredentials.schema }}
- name: NEWS_FORUM_POST_NOTIFICATION_SERVER_ID
value: "{{ .Values.bot.config.newsForumPostNotificationServerId }}"
- name: TOKEN

View File

@@ -48,7 +48,7 @@ spec:
name: db-credentials
key: dbName
- name: DB_SCHEME
value: "abstracto."
value: "{{ .Values.dbCredentials.schema }}."
volumeMounts:
- mountPath: "/var/template-config/"
name: template-config-mount

View File

@@ -21,7 +21,7 @@ templateDeployment:
repository: harbor.sheldan.dev/abstracto
pullPolicy: Always
image: abstracto-template-deployment
tag: 1.5.26
tag: 1.5.27
templateDeploymentData:
repository: harbor.sheldan.dev/oneplus-bot
pullPolicy: Always
@@ -32,7 +32,7 @@ dbConfigDeployment:
repository: harbor.sheldan.dev/abstracto
pullPolicy: Always
image: abstracto-db-deployment
tag: 1.5.26
tag: 1.5.27
dbConfigDeploymentData:
repository: harbor.sheldan.dev/oneplus-bot
pullPolicy: Always
@@ -44,6 +44,7 @@ dbCredentials:
userName: null
password: null
name: null
schema: abstracto
privateRestApi:
enabled: true
repository: harbor.sheldan.dev/oneplus-bot

View File

@@ -17,8 +17,8 @@
<properties>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<abstracto.version>1.5.26</abstracto.version>
<abstracto.templates.version>1.4.34</abstracto.templates.version>
<abstracto.version>1.5.27</abstracto.version>
<abstracto.templates.version>1.4.35</abstracto.templates.version>
</properties>
<modules>

View File

@@ -0,0 +1,11 @@
apiVersion: v2
description: oneplusbot dev chart
name: oneplusbot-dev
version: 1.0.0
dependencies:
- name: oneplus-bot
repository: file://../../deployment/helm/oneplus-bot
version: ">= 0.0.1"
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.12.10 # 13.x.x uses postgresql 16.x