-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document using external ClickHouse cluster with Altinity Cloud #279
Comments
|
Only after release 1.33.0 which hasn't happened yet. :) |
Me and @guidoiaquinti tried this yesterday. We didn't finish due to a couple of reasons:
values.yaml cloud: "private"
env:
- name: KAFKA_URL_FOR_CLICKHOUSE
value: "kafka://IP:9094"
- name: CLICKHOUSE_DISABLE_EXTERNAL_SCHEMAS
value: "1"
kafka:
externalAccess:
enabled: true
service:
type: LoadBalancer
ports:
external: 9094
autoDiscovery:
enabled: true
serviceAccount:
create: true
rbac:
create: true
clickhouse:
enabled: false
externalClickhouse:
host: x.demo.altinity.cloud
user: admin
password: "xxxxxxx"
cluster: "x"
secure: true Additionally, I think there's some clever values.yaml wrangling we could do to make spinning up only one component easier. Will continue on this and document progress here. |
Got it working on my second try. I initially deployed the following values.yaml to get the kafka IP: cloud: "do"
env:
- name: CLICKHOUSE_DISABLE_EXTERNAL_SCHEMAS
value: "1"
kafka:
enabled: true
externalAccess:
enabled: true
service:
type: LoadBalancer
ports:
external: 9094
autoDiscovery:
enabled: true
serviceAccount:
create: true
rbac:
create: true
clickhouse:
enabled: false
redis:
enabled: false
postgresql:
enabled: false
pgbouncer:
enabled: false
plugins:
enabled: false
worker:
enabled: false
web:
enabled: false
events:
enabled: false
migrate:
enabled: false Got the IP from And then: cloud: "do"
env:
- name: KAFKA_URL_FOR_CLICKHOUSE
value: "kafka://IP:9094"
- name: CLICKHOUSE_DISABLE_EXTERNAL_SCHEMAS
value: "1"
kafka:
enabled: true
externalAccess:
enabled: true
service:
type: LoadBalancer
ports:
external: 9094
autoDiscovery:
enabled: true
serviceAccount:
create: true
rbac:
create: true
externalClickhouse:
host: X.demo.altinity.cloud
user: admin
password: "X"
cluster: "X"
secure: true
clickhouse:
enabled: false Will create documentation as this as a basis. |
Proposed change
In #276 it became theoretically possible to use an external clickhouse cluster.
In practice though, using the cluster requires quite a few fixes to land in a release of PostHog which will take ~month.
This issue documents these fixes and how to get everything working.
Required PRs
Also relevant: PostHog/posthog#8334
Testing the changes and sample values.yaml
I tested out a build where all the above fixes were baked in. The procedure was:
ngrok tcp 9092
to expose my clickhouse installation to the world. Note down the exposed url and replace it within the values file belowhelm install -f altinity-cloud-values.yaml --timeout 20m --create-namespace --namespace posthog posthog charts/posthog/ --atomic --wait --wait-for-jobs --debug
kubectl port-forward service/posthog-posthog-kafka 9092:9092 -n posthog
whilehelm
is running to expose kafkaThe values file required some annoying overrides:
Notes for the future
We should figure out a more stream-lined way of exposing kafka here - there's a bit of a catch-22 going on with
advertisedListeners
and migrations - we need to know kafka external hostname by the time of migrations.Alternatives
As an alternative to the protobuf change, users could also manually upload the protobuf file by:
Note that this needs to be done prior to first helm install and events.proto is checked into our current codebase.
The rest of linked PRs still remain required though.
The text was updated successfully, but these errors were encountered: