From 9ccc7086fed3f11c0b5c2862a59723e7316a8bb6 Mon Sep 17 00:00:00 2001 From: albamig Date: Wed, 13 Apr 2022 17:04:09 +0200 Subject: [PATCH 1/5] - Confluent's Kafka. issue #? --- project/broker/kafka/deploy/docker-compose/_utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/project/broker/kafka/deploy/docker-compose/_utils.py b/project/broker/kafka/deploy/docker-compose/_utils.py index 39deb5c..0250417 100644 --- a/project/broker/kafka/deploy/docker-compose/_utils.py +++ b/project/broker/kafka/deploy/docker-compose/_utils.py @@ -29,15 +29,17 @@ def build_docker_compose(path: Path) -> str: kafka_container = { "restart": "always", - "image": "wurstmeister/kafka:latest", + "image": "confluentinc/cp-kafka:latest", "ports": ["9092"], "depends_on": ["zookeeper"], "volumes": ["kafka:/kafka/kafka-logs"], "environment": { - "KAFKA_LOG_DIRS": "/kafka/kafka-logs", - "KAFKA_DELETE_TOPIC_ENABLE": "true", + "KAFKA_BROKER_ID": 1, "KAFKA_ZOOKEEPER_CONNECT": "zookeeper:2181", - "KAFKA_ADVERTISED_HOST_NAME": "kafka", + "KAFKA_ADVERTISED_LISTENERS": "PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092", + "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP": "PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT", + "KAFKA_INTER_BROKER_LISTENER_NAME": "PLAINTEXT", + "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR": 1, }, } From 37c82a26cf1df94a2d990b2b3c057bba3ec03cff Mon Sep 17 00:00:00 2001 From: albamig Date: Wed, 13 Apr 2022 17:42:53 +0200 Subject: [PATCH 2/5] - Updated docker image version. issue #? --- microservice/language/python/deploy/docker-compose/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microservice/language/python/deploy/docker-compose/Dockerfile b/microservice/language/python/deploy/docker-compose/Dockerfile index 9679ad7..322f83a 100644 --- a/microservice/language/python/deploy/docker-compose/Dockerfile +++ b/microservice/language/python/deploy/docker-compose/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development +FROM ghcr.io/clariteia/minos-microservice:0.1.9 as development COPY ./pyproject.toml ./ RUN poetry install --no-root From 4121c33c01600d33688fbb19e7076998142e2c7f Mon Sep 17 00:00:00 2001 From: albamig Date: Mon, 18 Apr 2022 17:00:10 +0200 Subject: [PATCH 3/5] - Updated docker image version. issue #? --- microservice/language/python/deploy/docker-compose/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microservice/language/python/deploy/docker-compose/Dockerfile b/microservice/language/python/deploy/docker-compose/Dockerfile index 322f83a..db7a6f3 100644 --- a/microservice/language/python/deploy/docker-compose/Dockerfile +++ b/microservice/language/python/deploy/docker-compose/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/clariteia/minos-microservice:0.1.9 as development +FROM ghcr.io/clariteia/minos-microservice:0.6.0 as development COPY ./pyproject.toml ./ RUN poetry install --no-root From 73f898d28dfd4883d1a30006bf6b602d66960f2e Mon Sep 17 00:00:00 2001 From: albamig Date: Thu, 28 Apr 2022 10:51:06 +0200 Subject: [PATCH 4/5] - Updated docker image version. - Updated to version 0.7.0.dev3. - Updated config. issue #? --- .../python/deploy/docker-compose/Dockerfile | 2 +- .../language/python/init/config.yml.jinja | 19 +++++++++++-------- .../poetry/pyproject.toml.jinja | 19 +++++++++++-------- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/microservice/language/python/deploy/docker-compose/Dockerfile b/microservice/language/python/deploy/docker-compose/Dockerfile index db7a6f3..d958a1f 100644 --- a/microservice/language/python/deploy/docker-compose/Dockerfile +++ b/microservice/language/python/deploy/docker-compose/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/clariteia/minos-microservice:0.6.0 as development +FROM ghcr.io/clariteia/minos-microservice:0.7.0.dev3 as development COPY ./pyproject.toml ./ RUN poetry install --no-root diff --git a/microservice/language/python/init/config.yml.jinja b/microservice/language/python/init/config.yml.jinja index 0dffc26..d6eed18 100644 --- a/microservice/language/python/init/config.yml.jinja +++ b/microservice/language/python/init/config.yml.jinja @@ -4,18 +4,21 @@ injections: - src.{{ aggregate }}QueryServiceRepository databases: default: + client: minos.plugins.aiopg.AiopgDatabaseClient database: {{ name }}_db user: minos password: min0s host: localhost port: 5432 query: + client: minos.plugins.aiopg.AiopgDatabaseClient database: {{ name }}_query_db user: minos password: min0s host: localhost port: 5432 saga: + client: minos.plugins.lmdb.LmdbDatabaseClient path: ./{{ name }}.lmdb interfaces: broker: @@ -28,11 +31,11 @@ interfaces: retry: 2 publisher: client: minos.plugins.kafka.KafkaBrokerPublisher - queue: minos.networks.PostgreSqlBrokerPublisherQueue + queue: minos.networks.DatabaseBrokerPublisherQueue subscriber: client: minos.plugins.kafka.KafkaBrokerSubscriber - queue: minos.networks.PostgreSqlBrokerSubscriberQueue - validator: minos.networks.PostgreSqlBrokerSubscriberDuplicateValidator + queue: minos.networks.DatabaseBrokerSubscriberQueue + validator: minos.networks.DatabaseBrokerSubscriberDuplicateValidator http: port: minos.networks.HttpPort connector: @@ -42,8 +45,8 @@ interfaces: periodic: port: minos.networks.PeriodicPort pools: - lock: minos.common.PostgreSqlLockPool - database: minos.common.PostgreSqlPool + lock: minos.common.DatabaseLockPool + database: minos.common.DatabaseClientPool broker: minos.networks.BrokerClientPool discovery: connector: minos.networks.DiscoveryConnector @@ -56,9 +59,9 @@ aggregate: entities: - src.aggregates.{{ aggregate }} repositories: - transaction: minos.aggregate.PostgreSqlTransactionRepository - event: minos.aggregate.PostgreSqlEventRepository - snapshot: minos.aggregate.PostgreSqlSnapshotRepository + transaction: minos.aggregate.DatabaseTransactionRepository + event: minos.aggregate.DatabaseEventRepository + snapshot: minos.aggregate.DatabaseSnapshotRepository routers: - minos.networks.BrokerRouter - minos.networks.PeriodicRouter diff --git a/microservice/language/python/package-manager/poetry/pyproject.toml.jinja b/microservice/language/python/package-manager/poetry/pyproject.toml.jinja index a02e579..e12fe98 100644 --- a/microservice/language/python/package-manager/poetry/pyproject.toml.jinja +++ b/microservice/language/python/package-manager/poetry/pyproject.toml.jinja @@ -7,14 +7,17 @@ packages = [{ include = "src" }] [tool.poetry.dependencies] python = "^3.9" -minos-microservice-common = "^0.6" -minos-microservice-networks = "^0.6" -minos-microservice-aggregate = "^0.6" -minos-microservice-saga = "^0.6" -minos-microservice-cqrs = "^0.6" -minos-broker-kafka = "^0.6" -minos-discovery-minos = "^0.6" -minos-http-aiohttp = "^0.6" +minos-microservice-common = { version ="^0.7.0*", allow-prereleases = true } +minos-microservice-networks = { version ="^0.7.0*", allow-prereleases = true } +minos-microservice-aggregate = { version ="^0.7.0*", allow-prereleases = true } +minos-microservice-saga = { version ="^0.7.0*", allow-prereleases = true } +minos-microservice-cqrs = { version ="^0.7.0*", allow-prereleases = true } +minos-broker-kafka = { version ="^0.7.0*", allow-prereleases = true } +minos-discovery-minos = { version ="^0.7.0*", allow-prereleases = true } +minos-http-aiohttp = { version ="^0.7.0*", allow-prereleases = true } +minos-discovery-kong = { version ="^0.7.0*", allow-prereleases = true } +minos-database-aiopg = { version ="^0.7.0*", allow-prereleases = true } +minos-database-lmdb = { version ="^0.7.0*", allow-prereleases = true } typer = "^0.3.2" SQLAlchemy = "^1.4.0" From 095baa0c95617c0b25faee44c88f4e2371a1f7b7 Mon Sep 17 00:00:00 2001 From: albamig Date: Fri, 29 Apr 2022 10:18:07 +0200 Subject: [PATCH 5/5] - Added pyparsing as a dependency. issue #? --- .../language/python/package-manager/poetry/pyproject.toml.jinja | 1 + 1 file changed, 1 insertion(+) diff --git a/microservice/language/python/package-manager/poetry/pyproject.toml.jinja b/microservice/language/python/package-manager/poetry/pyproject.toml.jinja index e12fe98..6579eba 100644 --- a/microservice/language/python/package-manager/poetry/pyproject.toml.jinja +++ b/microservice/language/python/package-manager/poetry/pyproject.toml.jinja @@ -20,6 +20,7 @@ minos-database-aiopg = { version ="^0.7.0*", allow-prereleases = true } minos-database-lmdb = { version ="^0.7.0*", allow-prereleases = true } typer = "^0.3.2" SQLAlchemy = "^1.4.0" +pyparsing = "^3" [tool.poetry.dev-dependencies] black = "^19.10b"