diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..1d8f5114
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,30 @@
+# This workflow will build a Java project with Maven
+# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
+
+name: Execute build
+
+on:
+ push:
+ branches:
+ - master
+ - feature/**
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ - name: Build with Maven
+ run: mvn -s settings.xml -B install --file pom.xml
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ user: Sheldan
+ token: ${{ secrets.ABSTRACTO_PAT }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..9267b5d0
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,38 @@
+name: Publish package to GitHub Packages
+on:
+ release:
+ types: [created]
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ persist-credentials: false
+ - name: Set up Java for publishing to GitHub Packages
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ - name: Load current version
+ id: version
+ run: echo "version=$(mvn -s settings.xml --file pom.xml -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
+ - name: Publish to GitHub Packages
+ run: mvn -s settings.xml --file pom.xml -B deploy -Dmaven.wagon.http.pool=false -DskipTests=true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ user: Sheldan
+ token: ${{ secrets.ABSTRACTO_PAT }}
+ - name: Login to GitHub Packages Docker Registry
+ uses: docker/login-action@v1
+ with:
+ registry: docker.pkg.github.com
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Push deployment container
+ working-directory: ./deployment/image-packaging/src/main/docker
+ run: docker-compose build && docker-compose push
+ env:
+ REGISTRY_PREFIX: docker.pkg.github.com/sheldan/r-austria-bot/
+ VERSION: ${{ env.version }}
+ ABSTRACTO_VERSION: 1.3.11
+ ABSTRACTO_REGISTRY_PREFIX: docker.pkg.github.com/sheldan/abstracto/
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..af7e11db
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,25 @@
+# Compiled class file
+*.class
+.idea/
+target/
+*.iml
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/application/executable/pom.xml b/application/executable/pom.xml
new file mode 100644
index 00000000..f17b11c1
--- /dev/null
+++ b/application/executable/pom.xml
@@ -0,0 +1,80 @@
+
+
+
+ dev.sheldan.raustria.bot.application
+ application
+ 1.0.0-SNAPSHOT
+
+ 4.0.0
+ executable
+
+
+ 8
+ 8
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ repackage
+
+ repackage
+
+
+ exec
+
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.postgresql
+ postgresql
+ runtime
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+
+ dev.sheldan.abstracto.core
+ core-impl
+
+
+
+ dev.sheldan.abstracto.core
+ metrics-impl
+
+
+
+
+ dev.sheldan.abstracto.scheduling
+ scheduling-impl
+
+
+
+ dev.sheldan.abstracto.modules
+ link-embed-impl
+
+
+
+ dev.sheldan.abstracto.modules
+ starboard-impl
+
+
+
+
+
\ No newline at end of file
diff --git a/application/executable/src/main/java/dev/sheldan/raustria/bot/executable/Application.java b/application/executable/src/main/java/dev/sheldan/raustria/bot/executable/Application.java
new file mode 100644
index 00000000..7be27565
--- /dev/null
+++ b/application/executable/src/main/java/dev/sheldan/raustria/bot/executable/Application.java
@@ -0,0 +1,37 @@
+package dev.sheldan.raustria.bot.executable;
+
+import dev.sheldan.abstracto.core.service.Startup;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@SpringBootApplication
+@EnableAutoConfiguration(exclude = { FreeMarkerAutoConfiguration.class })
+@ComponentScan(basePackages = {"dev.sheldan.abstracto", "dev.sheldan.raustria.bot"})
+@EnableCaching
+@EnableJpaRepositories(basePackages = {"dev.sheldan.abstracto", "dev.sheldan.raustria.bot"})
+@EntityScan(basePackages = {"dev.sheldan.abstracto", "dev.sheldan.raustria.bot"})
+@EnableTransactionManagement
+public class Application implements CommandLineRunner {
+
+ @Autowired
+ private Startup startup;
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+ @Override
+ public void run(String... args) throws Exception {
+ startup.startBot();
+ }
+
+}
diff --git a/application/executable/src/main/resources/application-local.properties b/application/executable/src/main/resources/application-local.properties
new file mode 100644
index 00000000..2f179a61
--- /dev/null
+++ b/application/executable/src/main/resources/application-local.properties
@@ -0,0 +1,21 @@
+spring.datasource.url=jdbc:postgresql://localhost:5432/abstracto
+spring.datasource.username= abstracto
+spring.datasource.password= abstracto
+spring.jpa.properties.hibernate.default_schema=abstracto
+spring.quartz.jdbc.initialize-schema=never
+
+spring.jpa.hibernate.ddl-auto = none
+
+spring.jpa.show-sql = false
+
+spring.jpa.properties.hibernate.format_sql = true
+log4j.logger.org.hibernate.SQL=trace
+log4j.logger.org.hibernate.type.descriptor.sql=trace
+log4j.logger.org.hibernate.type=trace
+
+management.metrics.tags.application=r-austria-bot
+spring.security.user.name=abstracto
+spring.security.user.password=password
+spring.security.user.roles=USER
+
+spring.application.name=RAustriaBot
\ No newline at end of file
diff --git a/application/executable/src/main/resources/application.properties b/application/executable/src/main/resources/application.properties
new file mode 100644
index 00000000..3c0f60d4
--- /dev/null
+++ b/application/executable/src/main/resources/application.properties
@@ -0,0 +1,11 @@
+spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
+spring.datasource.username= ${DB_USER}
+spring.datasource.password= ${DB_PASS}
+spring.jpa.hibernate.default_schema=${DB_NAME}
+spring.quartz.jdbc.initialize-schema=never
+management.metrics.tags.application=r-austria-bot
+spring.security.user.name= ${REST_USER_NAME}
+spring.security.user.password= ${REST_PASSWORD}
+spring.security.user.roles=USER
+
+spring.application.name=RAustriaBot
\ No newline at end of file
diff --git a/application/executable/src/main/resources/logback.xml b/application/executable/src/main/resources/logback.xml
new file mode 100644
index 00000000..c43e3a28
--- /dev/null
+++ b/application/executable/src/main/resources/logback.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+ %d{dd-MM-yyyy HH:mm:ss.SSS} %magenta([%thread]) %highlight(%-5level) %logger{36} - %msg%n
+
+
+
+
+
+
+ ${LOG_PATH}/log.log
+
+
+
+ %d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+ ${LOG_PATH}/archived/log_%d{dd-MM-yyyy}.log
+
+ 10
+ 1GB
+
+
+
+
+
+ ${LOG_PATH}/requests_log.log
+
+
+ %d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+ ${LOG_PATH}/archived/requests_log_%d{dd-MM-yyyy}.log
+
+ 10
+ 1GB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/pom.xml b/application/pom.xml
new file mode 100644
index 00000000..73821fa2
--- /dev/null
+++ b/application/pom.xml
@@ -0,0 +1,41 @@
+
+
+
+ dev.sheldan.raustria.bot
+ r-austria-bot
+ 1.0.0-SNAPSHOT
+
+ 4.0.0
+
+ pom
+
+
+ dev.sheldan.raustria.bot.application
+ application
+
+
+
+
+ dev.sheldan.abstracto
+ bundle
+ ${abstracto.version}
+ import
+ pom
+
+
+
+
+
+ executable
+
+
+
+
+ dev.sheldan.abstracto.core
+ core-int
+
+
+
+
\ No newline at end of file
diff --git a/deployment/docker-compose/pom.xml b/deployment/docker-compose/pom.xml
new file mode 100644
index 00000000..20a6370d
--- /dev/null
+++ b/deployment/docker-compose/pom.xml
@@ -0,0 +1,34 @@
+
+
+
+ dev.sheldan.raustria.bot
+ deployment
+ 1.0.0-SNAPSHOT
+
+ 4.0.0
+
+ pom
+ docker-compose
+
+
+
+
+ maven-assembly-plugin
+
+
+ assembly-docker-compose-configuration
+ package
+
+ single
+
+
+
+ src/main/assembly/docker-compose.xml
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/deployment/docker-compose/src/main/assembly/docker-compose.xml b/deployment/docker-compose/src/main/assembly/docker-compose.xml
new file mode 100644
index 00000000..370bed3a
--- /dev/null
+++ b/deployment/docker-compose/src/main/assembly/docker-compose.xml
@@ -0,0 +1,19 @@
+
+ docker-compose
+
+ zip
+
+ false
+
+
+ ./docker-compose
+ ${project.basedir}/src/main/resources/
+
+ **/*
+
+ true
+
+
+
\ No newline at end of file
diff --git a/deployment/docker-compose/src/main/resources/.env b/deployment/docker-compose/src/main/resources/.env
new file mode 100644
index 00000000..faa9356b
--- /dev/null
+++ b/deployment/docker-compose/src/main/resources/.env
@@ -0,0 +1,32 @@
+# database configuration
+DATABASE_HOST=database
+DATABASE_PORT=5432
+DATABASE_USER=abstracto
+DATABASE_NAME=abstracto
+DATABASE_PASSWORD=abstracto
+GRAFANA_DATABASE_PASSWORD=grafana
+GRAFANA_DATABASE_USER=grafana
+# deployment configuration, whether or not the container should execute the parts on startup
+EXECUTE_DEPLOYMENT=true
+EXECUTE_LIQUIBASE=true
+EXECUTE_TEMPLATES=true
+# whether or not remote debug should be enabled on the application
+REMOTE_DEBUG=false
+DEBUG_PORT=5005
+TOMCAT_PORT=8080
+# authentication for actuator endpoints
+REST_USER_NAME=abstracto
+REST_PASSWORD=password
+# port grafana will be reachable
+GRAFANA_PORT=3000
+# port prometheus will be reachable
+LOKI_PORT=3100
+PROMETHEUS_PORT=9090
+# port pg admin will be reachable
+PGADMIN_PORT=5050
+# default authentication for pg admin
+PGADMIN_DEFAULT_EMAIL=sheldan@sheldan.dev
+PGADMIN_DEFAULT_PASSWORD=admin
+TOKEN=
+YOUTUBE_API_KEY=
+R_AUSTRIA_BOT_VERSION=1.0.0
\ No newline at end of file
diff --git a/deployment/docker-compose/src/main/resources/README.md b/deployment/docker-compose/src/main/resources/README.md
new file mode 100644
index 00000000..11c76474
--- /dev/null
+++ b/deployment/docker-compose/src/main/resources/README.md
@@ -0,0 +1,10 @@
+# Setup for local docker-compose deployment
+
+* Install docker [here](https://docs.docker.com/get-docker/)
+* Install docker-compose [here](https://docs.docker.com/compose/install/).
+* Execute `docker-compose build` in `image-packaging`.
+* Fill out values in `.env` for token and database password. There are some default values, but token is required to be changed.
+* Execute `fill-prometheus-file-sh` in order to populate the prometheus config with the correct password (https://github.com/prometheus/prometheus/issues/2357)
+* Execute `docker-compose up` in this directory and wait for completion.
+* Per default pgAdmin is available on `localhost:5050` with the configured user and password. It will contain a configuration in the servers list.
+
diff --git a/deployment/docker-compose/src/main/resources/docker-compose.yml b/deployment/docker-compose/src/main/resources/docker-compose.yml
new file mode 100644
index 00000000..eec27bd5
--- /dev/null
+++ b/deployment/docker-compose/src/main/resources/docker-compose.yml
@@ -0,0 +1,146 @@
+version: '3.7'
+
+services:
+ db:
+ image: ${REGISTRY_PREFIX}r_austria_bot_database:${R_AUSTRIA_BOT_VERSION}
+ container_name: database
+ restart: always
+ environment:
+ POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
+ POSTGRES_USER: ${DATABASE_USER}
+ ports:
+ - "127.0.0.1:${DATABASE_PORT}:5432"
+ networks:
+ - raustriabot
+ volumes:
+ - r-austria-bot-db-data:/var/lib/postgresql/data
+ deployment_container:
+ container_name: deployment
+ image: ${REGISTRY_PREFIX}r_austria_bot_deployment:${R_AUSTRIA_BOT_VERSION}
+ depends_on:
+ - db
+ environment:
+ DB_PASS: ${DATABASE_PASSWORD}
+ DB_HOST: ${DATABASE_HOST}
+ DB_PORT: ${DATABASE_PORT}
+ DB_USER: ${DATABASE_USER}
+ DB_NAME: ${DATABASE_NAME}
+ ABSTRACTO_GRAFANA_DB_PASS: ${GRAFANA_DATABASE_PASSWORD}
+ ABSTRACTO_GRAFANA_DB_USER: ${GRAFANA_DATABASE_USER}
+ EXECUTE_DEPLOYMENT: ${EXECUTE_DEPLOYMENT}
+ EXECUTE_LIQUIBASE: ${EXECUTE_LIQUIBASE}
+ EXECUTE_TEMPLATES: ${EXECUTE_TEMPLATES}
+ LIQUIBASE_PATH: ${LIQUIBASE_PATH:-/liquibase}
+ POSTGRES_DRIVER_PATH: ${EXECUTE_DEPLOYMENT:-/postgres/driver.jar}
+ WAIT_HOSTS: ${DATABASE_HOST}:${DATABASE_PORT}
+ networks:
+ - raustriabot
+ bot:
+ image: ${REGISTRY_PREFIX}r_austria_bot:${R_AUSTRIA_BOT_VERSION}
+ depends_on:
+ - db
+ - deployment_container
+ restart: on-failure
+ container_name: raustriabot
+ environment:
+ TOKEN: ${TOKEN}
+ REMOTE_DEBUG: ${REMOTE_DEBUG}
+ DB_PASS: ${DATABASE_PASSWORD}
+ DB_HOST: ${DATABASE_HOST}
+ DB_PORT: ${DATABASE_PORT}
+ DB_USER: ${DATABASE_USER}
+ DB_NAME: ${DATABASE_NAME}
+ REST_USER_NAME: ${REST_USER_NAME}
+ REST_PASSWORD: ${REST_PASSWORD}
+ YOUTUBE_API_KEY: ${YOUTUBE_API_KEY}
+ command: sh -c "while ping -c1 deployment_container &>/dev/null; do sleep 1; done; echo 'Liquibase finished!' && ./start.sh"
+ ports:
+ - "127.0.0.1:${DEBUG_PORT}:5005"
+ - "127.0.0.1:${TOMCAT_PORT}:8080"
+ networks:
+ - raustriabot
+ volumes:
+ - r-austria-bot-bot-logs:/logs
+ - ./config:/config
+ pgadmin:
+ container_name: pgadmin
+ image: ${REGISTRY_PREFIX}r_austria_bot_pg_admin:${R_AUSTRIA_BOT_VERSION}
+ depends_on:
+ - db
+ environment:
+ PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
+ PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
+ ports:
+ - "127.0.0.1:${PGADMIN_PORT}:80"
+ restart: unless-stopped
+ networks:
+ - raustriabot
+ prometheus:
+ container_name: prometheus
+ image: ${REGISTRY_PREFIX}r_austria_bot_prometheus:${R_AUSTRIA_BOT_VERSION}
+ depends_on:
+ - bot
+ ports:
+ - "127.0.0.1:${PROMETHEUS_PORT}:9090"
+ restart: unless-stopped
+ networks:
+ - raustriabot
+ volumes:
+ - ./res/prometheus-scrapper-password-filled:/etc/prometheus/micrometer_password
+ - r-austria-bot-prometheus-data:/prometheus
+ grafana:
+ container_name: grafana
+ image: ${REGISTRY_PREFIX}r_austria_bot_grafana:${R_AUSTRIA_BOT_VERSION}
+ depends_on:
+ - prometheus
+ - bot
+ ports:
+ - "127.0.0.1:${GRAFANA_PORT}:3000"
+ restart: unless-stopped
+ environment:
+ DB_PASS: ${GRAFANA_DATABASE_PASSWORD}
+ DB_HOST: ${DATABASE_HOST}
+ DB_PORT: ${DATABASE_PORT}
+ DB_USER: ${GRAFANA_DATABASE_USER}
+ DB_NAME: ${DATABASE_NAME}
+ PROMETHEUS_HOST: 'prometheus'
+ PROMETHEUS_PORT: 9090
+ LOKI_HOST: 'loki'
+ LOKI_PORT: ${LOKI_PORT}
+ volumes:
+ - r-austria-bot-grafana-user-data:/var/lib/grafana
+ networks:
+ - raustriabot
+ promtail:
+ container_name: promtail
+ image: ${REGISTRY_PREFIX}r_austria_bot_promtail:${R_AUSTRIA_BOT_VERSION}
+ depends_on:
+ - bot
+ restart: unless-stopped
+ command: -config.file=/mnt/config/promtail-config.yaml
+ volumes:
+ - r-austria-bot-bot-logs:/logs
+ networks:
+ - raustriabot
+ loki:
+ container_name: loki
+ image: ${REGISTRY_PREFIX}r_austria_bot_loki:${R_AUSTRIA_BOT_VERSION}
+ depends_on:
+ - promtail
+ command: -config.file=/mnt/config/loki-config.yaml
+ ports:
+ - "127.0.0.1:${LOKI_PORT}:3100"
+ restart: unless-stopped
+ networks:
+ - raustriabot
+
+networks:
+ raustriabot:
+ driver: bridge
+ name: raustriabot-network
+
+volumes:
+ r-austria-bot-db-data:
+ r-austria-bot-grafana-user-data:
+ r-austria-bot-prometheus-data:
+ r-austria-bot-bot-logs:
\ No newline at end of file
diff --git a/deployment/docker-compose/src/main/resources/fill-prometheus-file.sh b/deployment/docker-compose/src/main/resources/fill-prometheus-file.sh
new file mode 100755
index 00000000..d0707806
--- /dev/null
+++ b/deployment/docker-compose/src/main/resources/fill-prometheus-file.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+set -o allexport
+source .env
+set +o allexport
+envsubst < res/prometheus-scrapper-password > res/prometheus-scrapper-password-filled
\ No newline at end of file
diff --git a/deployment/image-packaging/pom.xml b/deployment/image-packaging/pom.xml
new file mode 100644
index 00000000..514a0c56
--- /dev/null
+++ b/deployment/image-packaging/pom.xml
@@ -0,0 +1,166 @@
+
+
+
+ dev.sheldan.raustria.bot
+ deployment
+ 1.0.0-SNAPSHOT
+
+ 4.0.0
+
+ image-packaging
+ pom
+
+ ${project.basedir}/src/main/docker/
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ copy
+ package
+
+ copy
+
+
+
+
+
+
+
+
+ dev.sheldan.raustria.bot.application
+ executable
+ ${project.version}
+ exec
+ jar
+ true
+ ${file.basedir}/r-austria-bot/bot
+ app.jar
+
+
+
+
+ dev.sheldan.abstracto-templates.templates
+ core
+ ${abstracto.templates.version}
+ zip
+ true
+ ${file.basedir}/deployment/template-artifacts/
+ core.zip
+
+
+
+ dev.sheldan.abstracto-templates.templates
+ link-embed
+ ${abstracto.templates.version}
+ zip
+ true
+ ${file.basedir}/deployment/template-artifacts/
+ link-embed.zip
+
+
+ dev.sheldan.abstracto-templates.templates
+ starboard
+ ${abstracto.templates.version}
+ zip
+ true
+ ${file.basedir}/deployment/template-artifacts/
+ starboard.zip
+
+
+
+
+
+ dev.sheldan.abstracto-templates.translations
+ core
+ ${abstracto.templates.version}
+ zip
+ true
+ ${file.basedir}/deployment/translation-artifacts/
+ core.zip
+
+
+
+ dev.sheldan.abstracto-templates.translations
+ link-embed
+ ${abstracto.templates.version}
+ zip
+ true
+ ${file.basedir}/deployment/translation-artifacts/
+ link-embed.zip
+
+
+
+ dev.sheldan.abstracto-templates.translations
+ starboard
+ ${abstracto.templates.version}
+ zip
+ true
+ ${file.basedir}/deployment/translation-artifacts/
+ starboard.zip
+
+
+
+
+
+
+ dev.sheldan.abstracto.scheduling
+ scheduling-impl
+ ${abstracto.version}
+ liquibase
+ zip
+ true
+ ${file.basedir}/deployment/liquibase-artifacts/
+ scheduling.zip
+
+
+
+ dev.sheldan.abstracto.core
+ core-impl
+ ${abstracto.version}
+ liquibase
+ zip
+ true
+ ${file.basedir}/deployment/liquibase-artifacts/
+ core.zip
+
+
+
+ dev.sheldan.abstracto.modules
+ link-embed-impl
+ ${abstracto.version}
+ liquibase
+ zip
+ true
+ ${file.basedir}/deployment/liquibase-artifacts/
+ link-embed.zip
+
+
+
+ dev.sheldan.abstracto.modules
+ starboard-impl
+ ${abstracto.version}
+ liquibase
+ zip
+ true
+ ${file.basedir}/deployment/liquibase-artifacts/
+ starboard.zip
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/.env b/deployment/image-packaging/src/main/docker/.env
new file mode 100644
index 00000000..a889c551
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/.env
@@ -0,0 +1,6 @@
+PROMTAIL_VERSION=2.2.1
+LOKI_VERSION=2.2.1
+PROMETHEUS_VERSION=v2.28.1
+PG_ADMIN_VERSION=5.5
+GRAFANA_VERSION=8.0.6
+POSTGRES_VERSION=13.3-buster
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/database/Dockerfile b/deployment/image-packaging/src/main/docker/database/Dockerfile
new file mode 100644
index 00000000..78e491ae
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/database/Dockerfile
@@ -0,0 +1,5 @@
+ARG POSTGRES_VERSION
+FROM postgres:${POSTGRES_VERSION}
+MAINTAINER Sheldan
+VOLUME /tmp
+ADD sql/init.sql /docker-entrypoint-initdb.d/init.sql
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/database/sql/init.sql b/deployment/image-packaging/src/main/docker/database/sql/init.sql
new file mode 100644
index 00000000..176cd93c
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/database/sql/init.sql
@@ -0,0 +1 @@
+CREATE SCHEMA abstracto
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/deployment/Dockerfile b/deployment/image-packaging/src/main/docker/deployment/Dockerfile
new file mode 100644
index 00000000..3a793eaf
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/deployment/Dockerfile
@@ -0,0 +1,8 @@
+ARG ABSTRACTO_REGISTRY_PREFIX
+ARG ABSTRACTO_VERSION=latest
+FROM ${ABSTRACTO_REGISTRY_PREFIX}abstracto_deployment:${ABSTRACTO_VERSION:-latest}
+MAINTAINER Sheldan
+ADD template-artifacts /templates
+ADD translation-artifacts /translations
+ADD liquibase-artifacts /liquibase-zips
+ADD config /
diff --git a/deployment/image-packaging/src/main/docker/deployment/config/artifact_versions.json b/deployment/image-packaging/src/main/docker/deployment/config/artifact_versions.json
new file mode 100644
index 00000000..977c844e
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/deployment/config/artifact_versions.json
@@ -0,0 +1,12 @@
+{
+ "template_artifacts": ["core","starboard", "link-embed"],
+ "translation_artifacts": ["core", "starboard", "link-embed"],
+ "liquibase_artifacts": [
+ { "zip": "scheduling", "file": "scheduling-changeLog.xml" },
+ { "zip": "core", "file": "core-changeLog.xml" },
+ { "zip": "link-embed", "file": "link-embed-changeLog.xml"},
+ { "zip": "starboard", "file": "starboard-changeLog.xml"}
+ ]
+}
+
+
diff --git a/deployment/image-packaging/src/main/docker/docker-compose.yml b/deployment/image-packaging/src/main/docker/docker-compose.yml
new file mode 100644
index 00000000..af8c75a5
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/docker-compose.yml
@@ -0,0 +1,50 @@
+version: "3.7"
+
+services:
+ bot:
+ build:
+ context: r-austria-bot
+ image: ${REGISTRY_PREFIX}r_austria_bot:${VERSION:-latest}
+ database:
+ build:
+ context: database
+ args:
+ POSTGRES_VERSION: ${POSTGRES_VERSION}
+ image: ${REGISTRY_PREFIX}r_austria_bot_database:${VERSION:-latest}
+ pg_admin:
+ build:
+ context: pgAdmin
+ args:
+ PG_ADMIN_VERSION: ${PG_ADMIN_VERSION}
+ image: ${REGISTRY_PREFIX}r_austria_bot_pg_admin:${VERSION:-latest}
+ deployment_container:
+ build:
+ context: deployment
+ args:
+ ABSTRACTO_REGISTRY_PREFIX: ${ABSTRACTO_REGISTRY_PREFIX}
+ ABSTRACTO_VERSION: ${ABSTRACTO_VERSION}
+ image: ${REGISTRY_PREFIX}r_austria_bot_deployment:${VERSION:-latest}
+ prometheus:
+ build:
+ context: prometheus
+ args:
+ PROMETHEUS_VERSION: ${PROMETHEUS_VERSION}
+ image: ${REGISTRY_PREFIX}r_austria_bot_prometheus:${VERSION:-latest}
+ grafana:
+ build:
+ context: grafana
+ args:
+ GRAFANA_VERSION: ${GRAFANA_VERSION}
+ image: ${REGISTRY_PREFIX}r_austria_bot_grafana:${VERSION:-latest}
+ promtail:
+ build:
+ context: promtail
+ args:
+ PROMTAIL_VERSION: ${PROMTAIL_VERSION}
+ image: ${REGISTRY_PREFIX}r_austria_bot_promtail:${VERSION:-latest}
+ loki:
+ build:
+ context: loki
+ args:
+ LOKI_VERSION: ${LOKI_VERSION}
+ image: ${REGISTRY_PREFIX}r_austria_bot_loki:${VERSION:-latest}
diff --git a/deployment/image-packaging/src/main/docker/grafana/Dockerfile b/deployment/image-packaging/src/main/docker/grafana/Dockerfile
new file mode 100644
index 00000000..78971746
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/grafana/Dockerfile
@@ -0,0 +1,6 @@
+ARG GRAFANA_VERSION
+FROM grafana/grafana:${GRAFANA_VERSION}
+MAINTAINER Sheldan
+ADD ./provisioning /etc/grafana/provisioning
+ADD ./config.ini /etc/grafana/config.ini
+ADD ./dashboards /var/lib/grafana/dashboards
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/config.ini b/deployment/image-packaging/src/main/docker/grafana/config.ini
new file mode 100644
index 00000000..4980ea84
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/grafana/config.ini
@@ -0,0 +1,2 @@
+[paths]
+provisioning = conf/provisioning
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/dashboards/jvm-dashboard.json b/deployment/image-packaging/src/main/docker/grafana/dashboards/jvm-dashboard.json
new file mode 100644
index 00000000..dff46bd3
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/grafana/dashboards/jvm-dashboard.json
@@ -0,0 +1,1561 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": "-- Grafana --",
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "limit": 100,
+ "name": "Annotations & Alerts",
+ "showIn": 0,
+ "type": "dashboard"
+ }
+ ]
+ },
+ "description": "Dashboard for RAustria Bot spring boot monitoring (adapted from https://grafana.com/grafana/dashboards/4701)",
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 1,
+ "id": 2,
+ "iteration": 1612052492351,
+ "links": [],
+ "panels": [
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 125,
+ "panels": [],
+ "repeat": null,
+ "title": "Overview",
+ "type": "row"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": true,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": "prometheus",
+ "decimals": 1,
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "format": "s",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "gridPos": {
+ "h": 3,
+ "w": 6,
+ "x": 0,
+ "y": 1
+ },
+ "height": "",
+ "id": 63,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "70%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "process_uptime_seconds{application=\"$application\"}",
+ "format": "time_series",
+ "interval": "",
+ "intervalFactor": 2,
+ "legendFormat": "",
+ "metric": "",
+ "refId": "A",
+ "step": 14400
+ }
+ ],
+ "thresholds": "",
+ "title": "Uptime",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": true,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": "prometheus",
+ "decimals": null,
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "format": "dateTimeAsIso",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "gridPos": {
+ "h": 3,
+ "w": 6,
+ "x": 6,
+ "y": 1
+ },
+ "height": "",
+ "id": 92,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "70%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "process_start_time_seconds{application=\"$application\"}*1000",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "",
+ "metric": "",
+ "refId": "A",
+ "step": 14400
+ }
+ ],
+ "thresholds": "",
+ "title": "Start time",
+ "type": "singlestat",
+ "valueFontSize": "70%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": true,
+ "colors": [
+ "rgba(50, 172, 45, 0.97)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(245, 54, 54, 0.9)"
+ ],
+ "datasource": "prometheus",
+ "decimals": 2,
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "format": "percent",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "gridPos": {
+ "h": 3,
+ "w": 6,
+ "x": 12,
+ "y": 1
+ },
+ "id": 65,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "70%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "sum(jvm_memory_used_bytes{application=\"$application\", area=\"heap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\", area=\"heap\"})",
+ "format": "time_series",
+ "interval": "",
+ "intervalFactor": 2,
+ "legendFormat": "",
+ "refId": "A",
+ "step": 14400
+ }
+ ],
+ "thresholds": "70,90",
+ "title": "Heap used",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": true,
+ "colors": [
+ "rgba(50, 172, 45, 0.97)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(245, 54, 54, 0.9)"
+ ],
+ "datasource": "prometheus",
+ "decimals": 2,
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "format": "percent",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "gridPos": {
+ "h": 3,
+ "w": 6,
+ "x": 18,
+ "y": 1
+ },
+ "id": 75,
+ "interval": null,
+ "links": [],
+ "mappingType": 2,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "70%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ },
+ {
+ "from": "-99999999999999999999999999999999",
+ "text": "N/A",
+ "to": "0"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "sum(jvm_memory_used_bytes{application=\"$application\", area=\"nonheap\"})*100/sum(jvm_memory_max_bytes{application=\"$application\",area=\"nonheap\"})",
+ "format": "time_series",
+ "interval": "",
+ "intervalFactor": 2,
+ "legendFormat": "",
+ "refId": "A",
+ "step": 14400
+ }
+ ],
+ "thresholds": "70,90",
+ "title": "Non-Heap used",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ },
+ {
+ "op": "=",
+ "text": "x",
+ "value": ""
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 4
+ },
+ "id": 127,
+ "panels": [],
+ "repeat": null,
+ "title": "Memory",
+ "type": "row"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "grid": {
+ "leftLogBase": 1,
+ "leftMax": null,
+ "leftMin": null,
+ "rightLogBase": 1,
+ "rightMax": null,
+ "rightMin": null
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 0,
+ "y": 5
+ },
+ "hiddenSeries": false,
+ "id": 24,
+ "legend": {
+ "avg": false,
+ "current": true,
+ "max": true,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.3.7",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "sum(jvm_memory_used_bytes{application=\"$application\", area=\"heap\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "used",
+ "metric": "",
+ "refId": "A",
+ "step": 2400
+ },
+ {
+ "expr": "sum(jvm_memory_committed_bytes{application=\"$application\", area=\"heap\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "committed",
+ "refId": "B",
+ "step": 2400
+ },
+ {
+ "expr": "sum(jvm_memory_max_bytes{application=\"$application\", area=\"heap\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "max",
+ "refId": "C",
+ "step": 2400
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "JVM Heap",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "sort": 0,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "x-axis": true,
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "y-axis": true,
+ "y_formats": [
+ "mbytes",
+ "short"
+ ],
+ "yaxes": [
+ {
+ "format": "bytes",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "grid": {
+ "leftLogBase": 1,
+ "leftMax": null,
+ "leftMin": null,
+ "rightLogBase": 1,
+ "rightMax": null,
+ "rightMin": null
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 6,
+ "y": 5
+ },
+ "hiddenSeries": false,
+ "id": 25,
+ "legend": {
+ "avg": false,
+ "current": true,
+ "max": true,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.3.7",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "sum(jvm_memory_used_bytes{application=\"$application\", area=\"nonheap\"})",
+ "format": "time_series",
+ "interval": "",
+ "intervalFactor": 2,
+ "legendFormat": "used",
+ "metric": "",
+ "refId": "A",
+ "step": 2400
+ },
+ {
+ "expr": "sum(jvm_memory_committed_bytes{application=\"$application\", area=\"nonheap\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "committed",
+ "refId": "B",
+ "step": 2400
+ },
+ {
+ "expr": "sum(jvm_memory_max_bytes{application=\"$application\", area=\"nonheap\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "max",
+ "refId": "C",
+ "step": 2400
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "JVM Non-Heap",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "sort": 0,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "x-axis": true,
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "y-axis": true,
+ "y_formats": [
+ "mbytes",
+ "short"
+ ],
+ "yaxes": [
+ {
+ "format": "bytes",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "grid": {
+ "leftLogBase": 1,
+ "leftMax": null,
+ "leftMin": null,
+ "rightLogBase": 1,
+ "rightMax": null,
+ "rightMin": null
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 12,
+ "y": 5
+ },
+ "hiddenSeries": false,
+ "id": 26,
+ "legend": {
+ "alignAsTable": false,
+ "avg": false,
+ "current": true,
+ "max": true,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.3.7",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "sum(jvm_memory_used_bytes{application=\"$application\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "used",
+ "metric": "",
+ "refId": "A",
+ "step": 2400
+ },
+ {
+ "expr": "sum(jvm_memory_committed_bytes{application=\"$application\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "committed",
+ "refId": "B",
+ "step": 2400
+ },
+ {
+ "expr": "sum(jvm_memory_max_bytes{application=\"$application\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "max",
+ "refId": "C",
+ "step": 2400
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "JVM Total",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "sort": 0,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "x-axis": true,
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "y-axis": true,
+ "y_formats": [
+ "mbytes",
+ "short"
+ ],
+ "yaxes": [
+ {
+ "format": "bytes",
+ "label": "",
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {
+ "debug": "#1F78C1",
+ "error": "#BF1B00",
+ "info": "#508642",
+ "trace": "#6ED0E0",
+ "warn": "#EAB839"
+ },
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "grid": {
+ "leftLogBase": 1,
+ "leftMax": null,
+ "leftMin": null,
+ "rightLogBase": 1,
+ "rightMax": null,
+ "rightMin": null
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 24,
+ "x": 0,
+ "y": 12
+ },
+ "height": "",
+ "hiddenSeries": false,
+ "id": 91,
+ "legend": {
+ "alignAsTable": false,
+ "avg": false,
+ "current": true,
+ "hideEmpty": false,
+ "hideZero": false,
+ "max": true,
+ "min": false,
+ "rightSide": false,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": true,
+ "pluginVersion": "7.3.7",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [
+ {
+ "alias": "error",
+ "yaxis": 1
+ },
+ {
+ "alias": "warn",
+ "yaxis": 1
+ }
+ ],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase(logback_events_total{application=\"$application\"}[1m])",
+ "format": "time_series",
+ "interval": "",
+ "intervalFactor": 2,
+ "legendFormat": "{{level}}",
+ "metric": "",
+ "refId": "A",
+ "step": 1200
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Log Events",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "x-axis": true,
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "y-axis": true,
+ "y_formats": [
+ "short",
+ "short"
+ ],
+ "yaxes": [
+ {
+ "decimals": 0,
+ "format": "opm",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": "0",
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 19
+ },
+ "id": 128,
+ "panels": [],
+ "repeat": null,
+ "title": "CPU & Load",
+ "type": "row"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "grid": {
+ "leftLogBase": 1,
+ "leftMax": null,
+ "leftMin": null,
+ "rightLogBase": 1,
+ "rightMax": null,
+ "rightMin": null
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 0,
+ "y": 20
+ },
+ "hiddenSeries": false,
+ "id": 106,
+ "legend": {
+ "avg": false,
+ "current": true,
+ "max": true,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.3.7",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "system_cpu_usage{application=\"$application\"}",
+ "format": "time_series",
+ "hide": false,
+ "intervalFactor": 1,
+ "legendFormat": "system",
+ "metric": "",
+ "refId": "A",
+ "step": 2400
+ },
+ {
+ "expr": "process_cpu_usage{application=\"$application\"}",
+ "format": "time_series",
+ "hide": false,
+ "intervalFactor": 1,
+ "legendFormat": "process",
+ "refId": "B"
+ },
+ {
+ "expr": "avg_over_time(process_cpu_usage{application=\"$application\"}[1h])",
+ "format": "time_series",
+ "hide": false,
+ "intervalFactor": 1,
+ "legendFormat": "process-1h",
+ "refId": "C"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "CPU Usage",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "sort": 0,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "x-axis": true,
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "y-axis": true,
+ "y_formats": [
+ "short",
+ "short"
+ ],
+ "yaxes": [
+ {
+ "decimals": 1,
+ "format": "percentunit",
+ "label": "",
+ "logBase": 1,
+ "max": "1",
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "grid": {
+ "leftLogBase": 1,
+ "leftMax": null,
+ "leftMin": null,
+ "rightLogBase": 1,
+ "rightMax": null,
+ "rightMin": null
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 6,
+ "y": 20
+ },
+ "hiddenSeries": false,
+ "id": 93,
+ "legend": {
+ "avg": false,
+ "current": true,
+ "max": true,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.3.7",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "system_load_average_1m{application=\"$application\"}",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "system-1m",
+ "metric": "",
+ "refId": "A",
+ "step": 2400
+ },
+ {
+ "expr": "system_cpu_count{application=\"$application\"}",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "cpus",
+ "refId": "B"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Load",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "sort": 0,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "x-axis": true,
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "y-axis": true,
+ "y_formats": [
+ "short",
+ "short"
+ ],
+ "yaxes": [
+ {
+ "decimals": 1,
+ "format": "short",
+ "label": "",
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "editable": true,
+ "error": false,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "grid": {
+ "leftLogBase": 1,
+ "leftMax": null,
+ "leftMin": null,
+ "rightLogBase": 1,
+ "rightMax": null,
+ "rightMin": null
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 12,
+ "y": 20
+ },
+ "hiddenSeries": false,
+ "id": 32,
+ "legend": {
+ "avg": false,
+ "current": true,
+ "max": true,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.3.7",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "jvm_threads_live_threads{application=\"$application\"}",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "live",
+ "metric": "",
+ "refId": "A",
+ "step": 2400
+ },
+ {
+ "expr": "jvm_threads_daemon_threads{application=\"$application\"}",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "daemon",
+ "metric": "",
+ "refId": "B",
+ "step": 2400
+ },
+ {
+ "expr": "jvm_threads_peak_threads{application=\"$application\"}",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "peak",
+ "refId": "C",
+ "step": 2400
+ },
+ {
+ "expr": "process_threads{application=\"$application\"}",
+ "format": "time_series",
+ "interval": "",
+ "intervalFactor": 2,
+ "legendFormat": "process",
+ "refId": "D",
+ "step": 2400
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Threads",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "sort": 0,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "x-axis": true,
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "y-axis": true,
+ "y_formats": [
+ "short",
+ "short"
+ ],
+ "yaxes": [
+ {
+ "decimals": 0,
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {
+ "blocked": "#bf1b00",
+ "new": "#fce2de",
+ "runnable": "#7eb26d",
+ "terminated": "#511749",
+ "timed-waiting": "#c15c17",
+ "waiting": "#eab839"
+ },
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {
+ "custom": {}
+ },
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 18,
+ "y": 20
+ },
+ "hiddenSeries": false,
+ "id": 124,
+ "legend": {
+ "alignAsTable": false,
+ "avg": false,
+ "current": true,
+ "max": true,
+ "min": false,
+ "rightSide": false,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.3.7",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "jvm_threads_states_threads{application=\"$application\"}",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "{{state}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Thread States",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ }
+ ],
+ "refresh": "30s",
+ "schemaVersion": 26,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "allValue": null,
+ "current": {
+ "selected": true,
+ "text": "raustriabot",
+ "value": "raustriabot"
+ },
+ "datasource": "prometheus",
+ "definition": "",
+ "error": null,
+ "hide": 0,
+ "includeAll": false,
+ "label": "Application",
+ "multi": false,
+ "name": "application",
+ "options": [],
+ "query": "label_values(application)",
+ "refresh": 2,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ }
+ ]
+ },
+ "time": {
+ "from": "now-1h",
+ "to": "now"
+ },
+ "timepicker": {
+ "now": true,
+ "refresh_intervals": [
+ "5s",
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h"
+ ],
+ "time_options": [
+ "5m",
+ "15m",
+ "1h",
+ "6h",
+ "12h",
+ "24h",
+ "2d",
+ "7d"
+ ]
+ },
+ "timezone": "browser",
+ "title": "JVM (Micrometer)",
+ "uid": "YryNLtLMk",
+ "version": 1
+}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/dashboards/r-austria-bot-logs.json b/deployment/image-packaging/src/main/docker/grafana/dashboards/r-austria-bot-logs.json
new file mode 100644
index 00000000..bce6d2d0
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/grafana/dashboards/r-austria-bot-logs.json
@@ -0,0 +1,65 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": "-- Grafana --",
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 0,
+ "id": 4,
+ "links": [],
+ "panels": [
+ {
+ "datasource": "Loki",
+ "gridPos": {
+ "h": 14,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 2,
+ "options": {
+ "dedupStrategy": "none",
+ "enableLogDetails": true,
+ "showLabels": false,
+ "showTime": false,
+ "sortOrder": "Descending",
+ "wrapLogMessage": true
+ },
+ "targets": [
+ {
+ "expr": "{job=\"r-austria-bot-logs\", filename=\"/logs/log.log\"}",
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "title": "RAustria Bot logs",
+ "type": "logs"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 30,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": []
+ },
+ "time": {
+ "from": "now-3h",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "RAustria Bot logs",
+ "uid": "1uGb0q4nz",
+ "version": 2
+}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/dashboards/r-austria-bot-status-dashboard.json b/deployment/image-packaging/src/main/docker/grafana/dashboards/r-austria-bot-status-dashboard.json
new file mode 100644
index 00000000..f190a9a9
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/grafana/dashboards/r-austria-bot-status-dashboard.json
@@ -0,0 +1,1100 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": "-- Grafana --",
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 1,
+ "iteration": 1627217870213,
+ "links": [],
+ "panels": [
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 0
+ },
+ "hiddenSeries": false,
+ "id": 16,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase(discord_api_interactions_total[1m])",
+ "interval": "",
+ "legendFormat": "{{ action }}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Discord API Interaction",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 0
+ },
+ "hiddenSeries": false,
+ "id": 4,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase(command_processed_total[1m])",
+ "interval": "",
+ "legendFormat": "{{status}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Commands processed",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 8
+ },
+ "hiddenSeries": false,
+ "id": 2,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase(message_total[1m])",
+ "interval": "",
+ "legendFormat": "{{ action }}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Message events",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 8
+ },
+ "hiddenSeries": false,
+ "id": 26,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase(okhttp_request_total[1m])",
+ "interval": "",
+ "legendFormat": "{{ http_code }}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "HTTP Reponse codes",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 16
+ },
+ "hiddenSeries": false,
+ "id": 30,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "exemplar": true,
+ "expr": "increase(cache_evictions_total{application=\"$application\", cache=\"messages\"}[1m])",
+ "interval": "",
+ "legendFormat": "Cache evictions",
+ "refId": "A"
+ },
+ {
+ "exemplar": true,
+ "expr": "increase(cache_gets_total{application=\"$application\", cache=\"messages\"}[1m])",
+ "hide": false,
+ "interval": "",
+ "legendFormat": "Cache gets {{ result }}",
+ "refId": "B"
+ },
+ {
+ "exemplar": true,
+ "expr": "increase(cache_puts_total{application=\"$application\", cache=\"messages\"}[1m])",
+ "hide": false,
+ "interval": "",
+ "legendFormat": "Cache puts",
+ "refId": "C"
+ },
+ {
+ "exemplar": true,
+ "expr": "increase(cache_removals{application=\"$application\", cache=\"messages\"}[1m])",
+ "hide": false,
+ "interval": "",
+ "legendFormat": "Cache removals",
+ "refId": "D"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Cache statistic",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 12,
+ "y": 16
+ },
+ "hiddenSeries": false,
+ "id": 32,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "exemplar": true,
+ "expr": "discord_gateway_ping",
+ "interval": "",
+ "legendFormat": "Gateway ping",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Gateway ping",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 0,
+ "y": 23
+ },
+ "hiddenSeries": false,
+ "id": 8,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase(starboard_stars_total[1m])",
+ "interval": "",
+ "legendFormat": "{{ action }}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Starboard reactions",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 6,
+ "y": 23
+ },
+ "hiddenSeries": false,
+ "id": 12,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase(emote_usages_total[1m])",
+ "interval": "",
+ "legendFormat": "Used emotes",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Emote tracking",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 12,
+ "y": 23
+ },
+ "hiddenSeries": false,
+ "id": 28,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase(experience_runtime_storage[1m])",
+ "interval": "",
+ "legendFormat": "Amount of entries",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Experience storage",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 18,
+ "y": 23
+ },
+ "hiddenSeries": false,
+ "id": 14,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase(assignable_roles_total[1m])",
+ "interval": "",
+ "legendFormat": "{{ action }}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Assignable role actions",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "prometheus",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 14,
+ "w": 24,
+ "x": 0,
+ "y": 30
+ },
+ "hiddenSeries": false,
+ "id": 34,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "alertThreshold": true
+ },
+ "percentage": false,
+ "pluginVersion": "7.5.7",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "exemplar": true,
+ "expr": "increase(jda_event_total[1m])",
+ "interval": "",
+ "legendFormat": "{{ event_class }}",
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "JDA Events",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ }
+ ],
+ "refresh": "10s",
+ "schemaVersion": 27,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "description": "The spring boot application which contains the messages cache",
+ "error": null,
+ "hide": 2,
+ "label": null,
+ "name": "application",
+ "query": "r-austria-bot",
+ "skipUrlSync": false,
+ "type": "constant"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-15m",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "r-Austria Bot status",
+ "uid": "6WIJ36BMz",
+ "version": 3
+}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/provisioning/dashboards/all.yml b/deployment/image-packaging/src/main/docker/grafana/provisioning/dashboards/all.yml
new file mode 100644
index 00000000..f969687a
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/grafana/provisioning/dashboards/all.yml
@@ -0,0 +1,6 @@
+- name: 'r-austria-bot-dashboards'
+ org_id: 1
+ folder: ''
+ type: 'file'
+ options:
+ folder: '/var/lib/grafana/dashboards'
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/grafana/provisioning/datasources/all.yml b/deployment/image-packaging/src/main/docker/grafana/provisioning/datasources/all.yml
new file mode 100644
index 00000000..26c8b9df
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/grafana/provisioning/datasources/all.yml
@@ -0,0 +1,29 @@
+apiVersion: 1
+datasources:
+ - access: 'proxy'
+ editable: true
+ is_default: true
+ name: 'prometheus'
+ org_id: 1
+ type: 'prometheus'
+ url: 'http://${PROMETHEUS_HOST}:${PROMETHEUS_PORT}'
+ version: 1
+ - name: 'postgres-db'
+ type: postgres
+ access: 'proxy'
+ url: '${DB_HOST}:${DB_PORT}'
+ password: '${DB_PASS}'
+ user: '${DB_USER}'
+ database: '${DB_NAME}'
+ basicAuth: false
+ is_default: false
+ jsonData:
+ sslmode: 'disable'
+ version: 1
+ editable: false
+ - name: Loki
+ type: loki
+ access: proxy
+ url: 'http://${LOKI_HOST}:${LOKI_PORT}'
+ jsonData:
+ maxLines: 2000
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/loki/Dockerfile b/deployment/image-packaging/src/main/docker/loki/Dockerfile
new file mode 100644
index 00000000..6259268e
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/loki/Dockerfile
@@ -0,0 +1,4 @@
+ARG LOKI_VERSION
+FROM grafana/loki:${LOKI_VERSION}
+MAINTAINER Sheldan
+ADD loki.yml /mnt/config/loki-config.yaml
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/loki/loki.yml b/deployment/image-packaging/src/main/docker/loki/loki.yml
new file mode 100644
index 00000000..0b8ea89f
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/loki/loki.yml
@@ -0,0 +1,66 @@
+auth_enabled: false
+
+server:
+ http_listen_port: 3100
+ grpc_listen_port: 9096
+
+ingester:
+ wal:
+ enabled: true
+ dir: /tmp/wal
+ lifecycler:
+ address: 127.0.0.1
+ ring:
+ kvstore:
+ store: inmemory
+ replication_factor: 1
+ final_sleep: 0s
+ chunk_idle_period: 1h
+ max_chunk_age: 1h
+ chunk_target_size: 1048576
+ chunk_retain_period: 30s
+ max_transfer_retries: 0
+
+schema_config:
+ configs:
+ - from: 2020-10-24
+ store: boltdb-shipper
+ object_store: filesystem
+ schema: v11
+ index:
+ prefix: index_
+ period: 24h
+
+storage_config:
+ boltdb_shipper:
+ active_index_directory: /tmp/loki/boltdb-shipper-active
+ cache_location: /tmp/loki/boltdb-shipper-cache
+ cache_ttl: 24h
+ shared_store: filesystem
+ filesystem:
+ directory: /tmp/loki/chunks
+
+compactor:
+ working_directory: /tmp/loki/boltdb-shipper-compactor
+ shared_store: filesystem
+
+limits_config:
+ reject_old_samples: true
+ reject_old_samples_max_age: 168h
+
+chunk_store_config:
+ max_look_back_period: 0s
+
+table_manager:
+ retention_deletes_enabled: true
+ retention_period: 360h
+
+ruler:
+ storage:
+ type: local
+ local:
+ directory: /tmp/loki/rules
+ rule_path: /tmp/loki/rules-temp
+ ring:
+ kvstore:
+ store: inmemory
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/pgAdmin/Dockerfile b/deployment/image-packaging/src/main/docker/pgAdmin/Dockerfile
new file mode 100644
index 00000000..6c0fef60
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/pgAdmin/Dockerfile
@@ -0,0 +1,5 @@
+ARG PG_ADMIN_VERSION
+FROM dpage/pgadmin4:${PG_ADMIN_VERSION}
+MAINTAINER Sheldan
+VOLUME /tmp
+ADD config/servers.json /pgadmin4/servers.json
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/pgAdmin/config/servers.json b/deployment/image-packaging/src/main/docker/pgAdmin/config/servers.json
new file mode 100644
index 00000000..22cf40d7
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/pgAdmin/config/servers.json
@@ -0,0 +1,13 @@
+{
+ "Servers": {
+ "1": {
+ "Name": "r-austria bot database",
+ "Group": "Server Group 1",
+ "Port": 5432,
+ "Username": "abstracto",
+ "Host": "db",
+ "SSLMode": "prefer",
+ "MaintenanceDB": "postgres"
+ }
+ }
+}
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/prometheus/Dockerfile b/deployment/image-packaging/src/main/docker/prometheus/Dockerfile
new file mode 100644
index 00000000..4c6b0294
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/prometheus/Dockerfile
@@ -0,0 +1,4 @@
+ARG PROMETHEUS_VERSION
+FROM prom/prometheus:${PROMETHEUS_VERSION}
+MAINTAINER Sheldan
+ADD prometheus.yml /etc/prometheus/prometheus.yml
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/prometheus/prometheus.yml b/deployment/image-packaging/src/main/docker/prometheus/prometheus.yml
new file mode 100644
index 00000000..dced1026
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/prometheus/prometheus.yml
@@ -0,0 +1,17 @@
+global:
+ scrape_interval: 10s
+ scrape_timeout: 10s
+ evaluation_interval: 1m
+scrape_configs:
+ - job_name: r_austria_bot_micrometer
+ honor_timestamps: true
+ scrape_interval: 5s
+ scrape_timeout: 5s
+ metrics_path: /actuator/prometheus
+ scheme: http
+ static_configs:
+ - targets:
+ - r_austra:8080
+ basic_auth:
+ username: "abstracto"
+ password_file: /etc/prometheus/micrometer_password
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/promtail/Dockerfile b/deployment/image-packaging/src/main/docker/promtail/Dockerfile
new file mode 100644
index 00000000..d9c4e0d8
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/promtail/Dockerfile
@@ -0,0 +1,4 @@
+ARG PROMTAIL_VERSION
+FROM grafana/promtail:${PROMTAIL_VERSION}
+MAINTAINER Sheldan
+ADD promtail.yaml /mnt/config/promtail-config.yaml
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/promtail/promtail.yaml b/deployment/image-packaging/src/main/docker/promtail/promtail.yaml
new file mode 100644
index 00000000..f8a95f71
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/promtail/promtail.yaml
@@ -0,0 +1,17 @@
+server:
+ disable: true
+
+positions:
+ filename: /tmp/positions.yaml
+
+clients:
+ - url: http://loki:3100/loki/api/v1/push
+
+scrape_configs:
+ - job_name: system
+ static_configs:
+ - targets:
+ - localhost
+ labels:
+ job: r-austria-bot-logs
+ __path__: /logs/*.log
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/r-austria-bot/Dockerfile b/deployment/image-packaging/src/main/docker/r-austria-bot/Dockerfile
new file mode 100644
index 00000000..b2475c99
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/r-austria-bot/Dockerfile
@@ -0,0 +1,10 @@
+FROM openjdk:8-jdk-alpine
+MAINTAINER Sheldan
+VOLUME /tmp
+ADD bot/app.jar /app.jar
+ADD config/* /config/
+VOLUME ["/config"]
+VOLUME ["/logs"]
+ADD wrapper/*.sh /
+RUN chmod +x /start.sh
+CMD ["/start.sh"]
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/r-austria-bot/config/application.properties b/deployment/image-packaging/src/main/docker/r-austria-bot/config/application.properties
new file mode 100644
index 00000000..7949759c
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/r-austria-bot/config/application.properties
@@ -0,0 +1,2 @@
+logging.config=config/logback.xml
+
diff --git a/deployment/image-packaging/src/main/docker/r-austria-bot/config/logback.xml b/deployment/image-packaging/src/main/docker/r-austria-bot/config/logback.xml
new file mode 100644
index 00000000..c43e3a28
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/r-austria-bot/config/logback.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+ %d{dd-MM-yyyy HH:mm:ss.SSS} %magenta([%thread]) %highlight(%-5level) %logger{36} - %msg%n
+
+
+
+
+
+
+ ${LOG_PATH}/log.log
+
+
+
+ %d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+ ${LOG_PATH}/archived/log_%d{dd-MM-yyyy}.log
+
+ 10
+ 1GB
+
+
+
+
+
+ ${LOG_PATH}/requests_log.log
+
+
+ %d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+ ${LOG_PATH}/archived/requests_log_%d{dd-MM-yyyy}.log
+
+ 10
+ 1GB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/deployment/image-packaging/src/main/docker/r-austria-bot/wrapper/start.sh b/deployment/image-packaging/src/main/docker/r-austria-bot/wrapper/start.sh
new file mode 100644
index 00000000..0d69daa3
--- /dev/null
+++ b/deployment/image-packaging/src/main/docker/r-austria-bot/wrapper/start.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+DEBUG_PARAMS=""
+if [ "x$REMOTE_DEBUG" = 'xtrue' ]; then
+ DEBUG_PARAMS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
+ echo "Starting with remote debugging on port 5005"
+fi;
+java ${DEBUG_PARAMS} -jar app.jar
\ No newline at end of file
diff --git a/deployment/pom.xml b/deployment/pom.xml
new file mode 100644
index 00000000..3c30082f
--- /dev/null
+++ b/deployment/pom.xml
@@ -0,0 +1,22 @@
+
+
+
+ dev.sheldan.raustria.bot
+ r-austria-bot
+ 1.0.0-SNAPSHOT
+
+ 4.0.0
+
+ deployment
+ pom
+
+
+ docker-compose
+ image-packaging
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 00000000..15ab514c
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,62 @@
+
+
+ 4.0.0
+ pom
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.3.1.RELEASE
+
+
+
+ dev.sheldan.raustria.bot
+ r-austria-bot
+ 1.0.0-SNAPSHOT
+
+
+ 1.8
+ 1.8
+
+
+ 1.3.11
+ 1.3.1
+
+
+
+ application
+ templates
+ deployment
+
+
+
+
+ jcenter
+ jcenter-bintray
+ https://jcenter.bintray.com
+
+
+ github
+ https://maven.pkg.github.com/Sheldan/*
+
+ true
+
+
+
+
+
+
+
+ github
+ GitHub Packages
+ https://maven.pkg.github.com/Sheldan/r-austria-bot
+
+
+
+
+ https://maven.pkg.github.com/Sheldan/r-austria-bot
+ scm:git:git@github.com:Sheldan/r-austria-bot.git
+ HEAD
+
+
+
\ No newline at end of file
diff --git a/settings.xml b/settings.xml
new file mode 100644
index 00000000..7f7915ae
--- /dev/null
+++ b/settings.xml
@@ -0,0 +1,36 @@
+
+
+
+ github
+
+
+
+
+ github
+
+
+ central
+ https://repo1.maven.org/maven2
+
+
+ github
+ https://maven.pkg.github.com/Sheldan/*
+
+ true
+
+
+
+
+
+
+
+
+ github
+ ${env.user}
+ ${env.token}
+
+
+
diff --git a/templates/pom.xml b/templates/pom.xml
new file mode 100644
index 00000000..913106b4
--- /dev/null
+++ b/templates/pom.xml
@@ -0,0 +1,15 @@
+
+
+
+ r-austria-bot
+ dev.sheldan.raustria.bot
+ 1.0.0-SNAPSHOT
+
+ 4.0.0
+
+ templates
+
+
+
\ No newline at end of file