diff --git a/devenv.nix b/devenv.nix index 90583df..1fbb1a3 100644 --- a/devenv.nix +++ b/devenv.nix @@ -20,6 +20,9 @@ languages.java.maven.enable = true; languages.nix.enable = true; + # https://devenv.sh/processes/ + # processes.cargo-watch.exec = "cargo-watch"; + scripts = let datasource = "-Dspring.datasource.url=jdbc:postgresql://${config.services.postgres.listen_addresses}:5432"; @@ -46,40 +49,36 @@ "distributed-init".exec = '' cd ${config.env.DEVENV_ROOT}/flex-training-flexinale mvn test -Dtest=testdata.AllTestDataLoader -pl flexinale-distributed -am - mvn test -Dtest=testdata.FKKsVTestDataLoader -pl flexinale-distributed -am ''; "distributed-portal".exec = '' java ${datasource}/distributed-besucherportal \ - -Dbootstrap.servers=localhost:9092 \ - -Dspring.kafka.consumer.bootstrap-servers=localhost:9092 \ - -Dspring.kafka.producer.bootstrap-servers=localhost:9092 \ + -Dbootstrap.servers=localhost:29092 \ + -Dspring.kafka.consumer.bootstrap-servers=localhost:29092 \ + -Dspring.kafka.producer.bootstrap-servers=localhost:29092 \ -jar flex-training-flexinale/flexinale-distributed/flexinale-distributed-besucherportal/target/flexinale-distributed-besucherportal-2024.3.0-spring-boot-fat-jar.jar ''; "distributed-backoffice".exec = '' java ${datasource}/distributed-backoffice \ - -Dbootstrap.servers=localhost:9092 \ - -Dspring.kafka.consumer.bootstrap-servers=localhost:9092 \ - -Dspring.kafka.producer.bootstrap-servers=localhost:9092 \ + -Dbootstrap.servers=localhost:29092 \ + -Dspring.kafka.consumer.bootstrap-servers=localhost:29092 \ + -Dspring.kafka.producer.bootstrap-servers=localhost:29092 \ -jar flex-training-flexinale/flexinale-distributed/flexinale-distributed-backoffice/target/flexinale-distributed-backoffice-2024.3.0-spring-boot-fat-jar.jar ''; "distributed-ticketing".exec = '' java ${datasource}/distributed-ticketing \ - -Dbootstrap.servers=localhost:9092 \ - -Dspring.kafka.consumer.bootstrap-servers=localhost:9092 \ - -Dspring.kafka.producer.bootstrap-servers=localhost:9092 \ + -Dbootstrap.servers=localhost:29092 \ + -Dspring.kafka.consumer.bootstrap-servers=localhost:29092 \ + -Dspring.kafka.producer.bootstrap-servers=localhost:29092 \ -jar flex-training-flexinale/flexinale-distributed/flexinale-distributed-ticketing/target/flexinale-distributed-ticketing-2024.3.0-spring-boot-fat-jar.jar ''; }; - services.kafka = { + services.apache-kafka = { enable = true; clusterId = "foobar"; settings = { "broker.id" = 1; "node.id" = 1; - "offsets.topic.replication.factor" = 1; - "transaction.state.log.replication.factor" = 1; - "transaction.state.log.min.isr" = 1; "process.roles" = [ "broker" "controller" @@ -125,11 +124,6 @@ ]); }; - # https://devenv.sh/processes/ - processes.distributed-portal.exec = config.scripts.distributed-portal.exec; - processes.distributed-backoffice.exec = config.scripts.distributed-backoffice.exec; - processes.distributed-ticketing.exec = config.scripts.distributed-ticketing.exec; - # https://devenv.sh/tests/ enterTest = '' echo "Running tests" diff --git a/nix/kafka.nix b/nix/kafka.nix index f0c48f3..78fa640 100644 --- a/nix/kafka.nix +++ b/nix/kafka.nix @@ -5,7 +5,7 @@ ... }: let - cfg = config.services.kafka; + cfg = config.services.apache-kafka; # The `javaProperties` generator takes care of various escaping rules and # generation of the properties file, but we'll handle stringly conversion @@ -56,7 +56,7 @@ let ''; in { - options.services.kafka = { + options.services.apache-kafka = { enable = lib.mkEnableOption "Apache Kafka event streaming broker"; settings = lib.mkOption { @@ -100,7 +100,7 @@ in See [listeners](https://kafka.apache.org/documentation/#brokerconfigs_listeners). ''; type = lib.types.listOf lib.types.str; - default = [ "PLAINTEXT://localhost:9092" ]; + default = [ "PLAINTEXT://localhost:29092" ]; }; }; }; @@ -181,13 +181,13 @@ in }; config = lib.mkIf cfg.enable { - services.kafka.configFiles.serverProperties = generator "server.properties" stringlySettings; + services.apache-kafka.configFiles.serverProperties = generator "server.properties" stringlySettings; scripts.kaf.exec = '' exec ${pkgs.kaf}/bin/kaf --config ${kafConfig} "$@" ''; - processes.kafka = { + processes.apache-kafka = { exec = "${startScript}"; # process-compose = { diff --git a/resources/FLEX Schulungsunterlagen + Übungen/FLEX_Albion-tectrain_Schulungsunterlagen_und_Übungen_V20241111-13_2024.3.pdf b/resources/FLEX Schulungsunterlagen + Übungen/FLEX_Albion-tectrain_Schulungsunterlagen_+£bungen_V20241111-13_2024.3.pdf similarity index 100% rename from resources/FLEX Schulungsunterlagen + Übungen/FLEX_Albion-tectrain_Schulungsunterlagen_und_Übungen_V20241111-13_2024.3.pdf rename to resources/FLEX Schulungsunterlagen + Übungen/FLEX_Albion-tectrain_Schulungsunterlagen_+£bungen_V20241111-13_2024.3.pdf