diff --git a/build.sh b/build.sh index 9013bc2..5247fa7 100644 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/bin/bash mvn package -podman build -f src/main/docker/Dockerfile.jvm -t git.chequeo.de/infinimotion/backend:latest . -podman push git.chequeo.de/infinimotion/backend:latest +podman build -f src/main/docker/Dockerfile.jvm -t git.infinimotion.de/infinimotion/backend:latest . +podman push git.infinimotion.de/infinimotion/backend:latest diff --git a/redpanda/docker-compose.yml b/docker-compose.yml similarity index 65% rename from redpanda/docker-compose.yml rename to docker-compose.yml index 8bbb0b6..3754eac 100644 --- a/redpanda/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,24 @@ -name: redpanda-quickstart-one-broker +name: infinimotion networks: + backend_network: + driver: bridge redpanda_network: driver: bridge services: + backend: + image: git.infinimotion.de/infinimotion/backend:latest + container_name: backend + networks: + - backend_network + - redpanda_network + depends_on: + - redpanda-0 + #environment: + # KAFKA_SECURITY_PROTOCOL: "SASL_PLAINTEXT" + # KAFKA_SASL_MECHANISM: "SCRAM-SHA-256" + # KAFKA_SASL_JAAS_CONFIG: 'org.apache.kafka.common.security.scram.ScramLoginModule required username="im-admin" password="a552855c0d842e90895121cf614c31f950086cab";' + #ports: + # - 8080:8080 redpanda-0: command: - redpanda @@ -28,15 +44,18 @@ services: - --default-log-level=info image: docker.redpanda.com/redpandadata/redpanda:v25.2.9 container_name: redpanda-0 + environment: + RP_BOOTSTRAP_USER: "im-admin:a552855c0d842e90895121cf614c31f950086cab" volumes: - - ./redpanda-0:/var/lib/redpanda/data + - ./redpanda/redpanda-0:/var/lib/redpanda/data + - ./redpanda/bootstrap.yml:/etc/redpanda/.bootstrap.yaml networks: - redpanda_network ports: - - 18081:18081 - - 18082:18082 + # - 18081:18081 + # - 18082:18082 - 19092:19092 - - 19644:9644 + # - 19644:9644 console: container_name: redpanda-console image: docker.redpanda.com/redpandadata/console:v3.2.2 @@ -49,6 +68,11 @@ services: CONSOLE_CONFIG_FILE: | kafka: brokers: ["redpanda-0:9092"] + sasl: + enabled: true + username: im-admin + password: a552855c0d842e90895121cf614c31f950086cab + mechanism: SCRAM-SHA-256 schemaRegistry: enabled: true urls: ["http://redpanda-0:8081"] @@ -57,6 +81,7 @@ services: enabled: true urls: ["http://redpanda-0:9644"] ports: - - 8086:8080 + - "127.0.0.1:8086:8080" + # nur lokal, weil nicht authentifiziert (enterprise feature...) depends_on: - redpanda-0 diff --git a/pom.xml b/pom.xml index 58c7f22..b50ee48 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ de.infinimotion model-backend - 0.0.3 + 0.0.2 diff --git a/redpanda/bootstrap.yml b/redpanda/bootstrap.yml new file mode 100644 index 0000000..f7c6b43 --- /dev/null +++ b/redpanda/bootstrap.yml @@ -0,0 +1,56 @@ +# ================================================================= +# This file defines initial cluster properties for a Redpanda cluster. +# Some of these settings are intended for quickstart development and evaluation +# and are not suitable for production environments. +# +# For more information on bootstrap files, see: +# https://docs.redpanda.com/current/deploy/deployment-option/self-hosted/manual/production/production-deployment/#configure-a-bootstrap-file +# ================================================================= + +# +# Enable SASL authentication for the Kafka and Admin APIs. +# https://docs.redpanda.com/current/reference/properties/cluster-properties/#admin_api_require_auth +admin_api_require_auth: true +# At least one superuser is required to be able to create other SASL users +# https://docs.redpanda.com/current/reference/properties/cluster-properties/#superusers +superusers: + - im-admin +# https://docs.redpanda.com/current/reference/properties/cluster-properties/#enable_sasl +enable_sasl: true +# Allow topics to be created on first access. +# https://docs.redpanda.com/current/reference/properties/cluster-properties/#auto_create_topics_enabled +auto_create_topics_enabled: true +# Enable data transforms. +# https://docs.redpanda.com/current/develop/data-transforms/how-transforms-work/ +#data_transforms_enabled: true +# Enable audit logging (enterprise feature). +# https://docs.redpanda.com/current/manage/audit-logging/ +#audit_enabled: true +# Enable Tiered Storage (enterprise feature). +# https://docs.redpanda.com/current/manage/tiered-storage/ +#cloud_storage_enabled: true +#cloud_storage_region: local +#cloud_storage_access_key: minio +#cloud_storage_secret_key: redpandaTieredStorage7 +#cloud_storage_api_endpoint: minio +#cloud_storage_api_endpoint_port: 9000 +#cloud_storage_disable_tls: true +#cloud_storage_bucket: redpanda +# Forces segments to be uploaded to Tiered Storage faster for the purposes of the quickstart +# https://docs.redpanda.com/current/reference/properties/object-storage-properties/#cloud_storage_segment_max_upload_interval_sec +#cloud_storage_segment_max_upload_interval_sec: 60 +# Continuous Data Balancing (enterprise feature) continuously monitors your node and rack availability and disk usage. This enables self-healing clusters that dynamically balance partitions, ensuring smooth operations and optimal cluster performance. +# https://docs.redpanda.com/current/manage/cluster-maintenance/continuous-data-balancing/ +#partition_autobalancing_mode: continuous +# Enable Redpanda to collect consumer group metrics. +# https://docs.redpanda.com/current/reference/properties/cluster-properties/#enable_consumer_group_metrics +enable_consumer_group_metrics: + - "group" + - "partition" + - "consumer_lag" +# Lower the interval for the quickstart +# https://docs.redpanda.com/current/reference/properties/cluster-properties/#consumer_group_lag_collection_interval_sec +consumer_group_lag_collection_interval_sec: 60 +# Enable Redpanda to collect host metrics. +# https://docs.redpanda.com/current/reference/properties/cluster-properties/#enable_host_metrics +enable_host_metrics: true diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 055ac66..e7b503b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,3 +1,8 @@ -kafka.bootstrap.servers=localhost:19092 +quarkus.http.port=8080 +%dev.kafka.bootstrap.servers=localhost:19092 +kafka.security.protocol=SASL_PLAINTEXT +kafka.sasl.mechanism=SCRAM-SHA-256 +kafka.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="im-admin" password="a552855c0d842e90895121cf614c31f950086cab"; +kafka.bootstrap.servers=redpanda-0:9092 mp.messaging.incoming.test.connector=smallrye-kafka -mp.messaging.incoming.test.auto.offset.reset=earliest \ No newline at end of file +mp.messaging.incoming.test.auto.offset.reset=earliest