diff --git a/.github/cannon/assert_clickhouse.sh b/.github/cannon/assert_clickhouse.sh index 9b2708cb..dcd17ca9 100755 --- a/.github/cannon/assert_clickhouse.sh +++ b/.github/cannon/assert_clickhouse.sh @@ -12,7 +12,7 @@ SEEDING_YAML="$1" CLICKHOUSE_HOST=${CLICKHOUSE_HOST:-"localhost"} CLICKHOUSE_PORT=${CLICKHOUSE_PORT:-"9000"} CLICKHOUSE_USER=${CLICKHOUSE_USER:-"default"} -CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-"supersecret"} +CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD} CLICKHOUSE_DB=${CLICKHOUSE_DB:-"default"} # Function to execute ClickHouse query diff --git a/.github/workflows/sentry-smoke-test.yaml b/.github/workflows/sentry-smoke-test.yaml index 7ab96db8..526c87a4 100644 --- a/.github/workflows/sentry-smoke-test.yaml +++ b/.github/workflows/sentry-smoke-test.yaml @@ -134,7 +134,7 @@ jobs: for sentry in "${all_sentries[@]}"; do pretty_print "Checking $table table for $sentry..." "none" while true; do - data_count=$(docker exec xatu-clickhouse-01 clickhouse-client --user=default --password=supersecret --query "SELECT COUNT(*) FROM default.$table WHERE meta_client_name = '$sentry'" || true) + data_count=$(docker exec xatu-clickhouse-01 clickhouse-client --user=default --query "SELECT COUNT(*) FROM default.$table WHERE meta_client_name = '$sentry'" || true) if [[ $data_count -gt 0 ]]; then pretty_print "$table has $data_count entries from $sentry" "green" break diff --git a/deploy/local/docker-compose/clickhouse/clickhouse-02/etc/clickhouse-server/docker-entrypoint-initdb.d/init-db.sh b/deploy/local/docker-compose/clickhouse/clickhouse-02/etc/clickhouse-server/docker-entrypoint-initdb.d/init-db.sh index dd085494..4e625ae9 100755 --- a/deploy/local/docker-compose/clickhouse/clickhouse-02/etc/clickhouse-server/docker-entrypoint-initdb.d/init-db.sh +++ b/deploy/local/docker-compose/clickhouse/clickhouse-02/etc/clickhouse-server/docker-entrypoint-initdb.d/init-db.sh @@ -10,7 +10,7 @@ cat <> /etc/clickhouse-server/users.d/default.xml ::/0 - ${CLICKHOUSE_PASSWORD} + $([ -n "${CLICKHOUSE_PASSWORD}" ] && echo "${CLICKHOUSE_PASSWORD}") default @@ -20,7 +20,7 @@ cat <> /etc/clickhouse-server/users.d/default.xml EOT -PASSWORD=${CLICKHOUSE_PASSWORD:-supersecret} +PASSWORD=${CLICKHOUSE_PASSWORD} clickhouse client --user default --password ${PASSWORD} -n <<-EOSQL CREATE TABLE default.schema_migrations_local ON CLUSTER '{cluster}' diff --git a/docker-compose.yml b/docker-compose.yml index 02cf48c2..0d7cb5f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,7 +37,7 @@ services: environment: - CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 - CLICKHOUSE_USER=default - - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-supersecret} + - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD} - CLICKHOUSE_USER_READONLY_PASSWORD=${CLICKHOUSE_USER_READONLY_PASSWORD:-readonly} xatu-clickhouse-02: profiles: @@ -403,7 +403,7 @@ services: environment: CLICKHOUSE_ENDPOINT: "xatu-clickhouse-01:8123" CLICKHOUSE_USER: ${CLICKHOUSE_USER:-default} - CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD:-supersecret} + CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD} KAFKA_BROKERS: "xatu-kafka:29092" healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8686/health"] @@ -433,7 +433,7 @@ services: environment: CLICKHOUSE_ENDPOINT: "xatu-clickhouse-01:8123" CLICKHOUSE_USER: ${CLICKHOUSE_USER:-default} - CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD:-supersecret} + CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD} KAFKA_BROKERS: "xatu-kafka:29092" healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8686/health"] @@ -485,7 +485,7 @@ services: "-path", "/migrations", "-database", - "clickhouse://xatu-clickhouse-01:9000?username=${CLICKHOUSE_USER:-default}&password=${CLICKHOUSE_PASSWORD:-supersecret}&database=default&x-multi-statement=true", + "clickhouse://xatu-clickhouse-01:9000?username=${CLICKHOUSE_USER:-default}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true", "up", ] depends_on: