diff --git a/microservice/language/python/deploy/docker-compose/Dockerfile b/microservice/language/python/deploy/docker-compose/Dockerfile index 9679ad7..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.1.8 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..6579eba 100644 --- a/microservice/language/python/package-manager/poetry/pyproject.toml.jinja +++ b/microservice/language/python/package-manager/poetry/pyproject.toml.jinja @@ -7,16 +7,20 @@ 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" +pyparsing = "^3" [tool.poetry.dev-dependencies] black = "^19.10b" 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, }, }