featurebase/idk/docker-compose.yml
Matthew Jaffee 8fe73146c8
Sqldb rip boltdb (#2341)
* serverless sqldb use same env for test config as normal

* rip boltdb implementation of controller backend out

it was replaced by postgres and no longer works properly.

This involved migrating a number of tests which only worked with
boltdb, which exposed several ways in which the postgres
implementation had slightly different behavior from the bolt
one:
1. ordering of results in some cases, and
2. (more importantly) erroring when a record to delete was not
found. The bolt implementation silently ignored it when things to
delete weren't found, so we make some changes to match that behavior.

Also stopped propagating CreatedAt and UpdatedAt from DB tables into
dax types. These were breaking existing tests. Perhaps it would be
better to actually use them, but for now they will only exist at the
DB level.

This change set also moves the insertion of the directive_versions
record out of migrations and into the startup/connection code. Having
this in the migrations was a bit ugly because you couldn't just
truncate all the tables and have everything work from
scratch. Inserting it during startup is fairly innocuous, and will
just continue on if it already exists.

* update directive_version test

I changed the initial value to 0 so that the first version that gets
sent out is 1
2023-03-22 08:54:13 -05:00

156 lines
5.2 KiB
YAML

version: '3'
services:
postgres:
image: postgres
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
zookeeper:
image: confluentinc/cp-zookeeper:${CONFLUENT_VERSION:-5.5.3}
environment:
ZOOKEEPER_CLIENT_PORT: 2181
KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/secrets/jaas_kafka_broker.conf"
volumes:
- ./docker-sasl/ssl_keys:/etc/kafka/secrets
kafka:
image: confluentinc/cp-kafka:${CONFLUENT_VERSION:-5.5.3}
environment:
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka:19092,LISTENER_DOCKER_EXTERNAL://kafka:9092,LISTENER_DOCKER_EXTERNAL_SSL://kafka:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL_SSL:SASL_SSL
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_BROKER_ID: 1
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/secrets/jaas_kafka_broker.conf"
KAFKA_SASL_ENABLED_MECHANISMS: PLAIN
KAFKA_SSL_KEYSTORE_FILENAME: broker_kafkaBroker_server.keystore.jks
KAFKA_SSL_KEYSTORE_CREDENTIALS: credentials
KAFKA_SSL_KEY_CREDENTIALS: credentials
KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: PLAIN
volumes:
- ./docker-sasl/ssl_keys:/etc/kafka/secrets
depends_on:
- zookeeper
# UI can be nice for debugging stuff and messing with Kafka. Not used by tests.
kafka-ui:
container_name: kafka-ui
image: provectuslabs/kafka-ui:latest
ports:
- 8080:8080
depends_on:
- zookeeper
- kafka
- schema-registry
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper:2181
KAFKA_CLUSTERS_0_JMXPORT: 9997
KAFKA_CLUSTERS_0_SCHEMAREGISTRY: http://schema-registry:8081
schema-registry:
image: confluentinc/cp-schema-registry:${CONFLUENT_VERSION:-5.5.3}
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:19092
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
depends_on:
- zookeeper
- kafka
pilosa:
#image: registry.gitlab.com/molecula/featurebase/featurebase:linux-amd64-${BRANCH_NAME} # (jaffee) I think we should build directly from this tree rather than pulling the image... makes the local dev flow easier
build: ..
environment:
PILOSA_DATA_DIR: /data
PILOSA_BIND: 0.0.0.0:10101
PILOSA_BIND_GRPC: 0.0.0.0:20101
PILOSA_ADVERTISE: pilosa:10101
PILOSA_LOOKUP_DB_DSN: "postgresql://postgres:password@postgres:5432/postgres?sslmode=disable"
depends_on:
- postgres
volumes:
- ./testenv/certs:/certs
pilosa-tls:
#image: registry.gitlab.com/molecula/featurebase/featurebase:linux-amd64-${BRANCH_NAME}
build: ..
environment:
PILOSA_DATA_DIR: /data
PILOSA_BIND: https://0.0.0.0:10111
PILOSA_BIND_GRPC: 0.0.0.0:20111
PILOSA_ADVERTISE: https://pilosa-tls:10111
PILOSA_TLS_CA_CERTIFICATE: /certs/ca.crt
PILOSA_TLS_CERTIFICATE: /certs/pilosa-tls.crt
PILOSA_TLS_KEY: /certs/pilosa-tls.key
PILOSA_TLS_ENABLE_CLIENT_VERIFICATION: 1
volumes:
- ./testenv/certs:/certs
pilosa-auth:
#image: registry.gitlab.com/molecula/featurebase/featurebase:linux-amd64-${BRANCH_NAME}
build: ..
environment:
PILOSA_DATA_DIR: /data
PILOSA_BIND: 0.0.0.0:10105
PILOSA_BIND_GRPC: 0.0.0.0:20105
PILOSA_ADVERTISE: pilosa-auth:10105
PILOSA_CONFIG: /testdata/featurebase.conf
volumes:
- ./testdata:/testdata
depends_on:
- fakeidp
fakeidp:
build:
context: .
dockerfile: Dockerfile-fakeIDP
idk-test:
build:
context: ../.
dockerfile: ./idk/Dockerfile-test
environment:
IDK_DEFAULT_SHARD_TRANSACTIONAL: ${IDK_DEFAULT_SHARD_TRANSACTIONAL}
volumes:
- ./testenv/certs:/certs
- ./docker-sasl/ssl_keys:/ssl_keys
- ./testdata:/testdata
depends_on:
- fakeidp
wait:
build:
context: .
dockerfile: Dockerfile-wait
volumes:
- ./testenv/certs:/certs
dax:
build:
context: ..
dockerfile: Dockerfile-dax
environment:
FEATUREBASE_BIND: 0.0.0.0:8080
FEATUREBASE_VERBOSE: "true"
FEATUREBASE_QUERYER_RUN: "true"
FEATUREBASE_CONTROLLER_RUN: "true"
FEATUREBASE_CONTROLLER_CONFIG_STORAGE_METHOD: "sqldb"
FEATUREBASE_CONTROLLER_CONFIG_SQLDB_DATABASE: "postgres"
FEATUREBASE_CONTROLLER_CONFIG_SQLDB_USER: "postgres"
FEATUREBASE_CONTROLLER_CONFIG_SQLDB_PASSWORD: "password"
FEATUREBASE_CONTROLLER_CONFIG_SQLDB_HOST: "postgres"
FEATUREBASE_COMPUTER_RUN: "true"
FEATUREBASE_COMPUTER_CONFIG_DATA_DIR: /dax-data/computer
FEATUREBASE_COMPUTER_CONFIG_WRITELOGGER_DIR: /dax-data/wl
FEATUREBASE_COMPUTER_CONFIG_SNAPSHOTTER_DIR: /dax-data/snaps
depends_on:
- postgres