Skip to content
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

Generate and publish ClickHouse node configs #288

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

charW
Copy link
Collaborator

@charW charW commented Aug 15, 2024

About

Whenever new servers are added to or removed from a ClickHouse cluster, each node has to go with a new config specifying the updated list of replica servers for each shard.

This PR helps to simplify that process by automatically generating the config for each ClickHouse node from a given template config by:

  • dynamically listing the replicas for each shard from the model of the cluster sensed/stored in memory (see this PR); this part is the same across the configs for all nodes
  • sub in the specific shard and replica number for the node

Once generated, Orion server will then publish the configs for each node to the given S3 bucket under the path <node_hostname>/config.xml. It is expected that the Orion agent will then pull the config for a specific node as needed.

Test

Ran Orion server against local Docker ClickHouse cluster (see testing section here), and made sure that the correct config has been generated and pushed to the S3 bucket.

@charW charW requested a review from a team as a code owner August 15, 2024 18:43
Copy link
Contributor

@ambud ambud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks lgtm

@ambud ambud merged commit d4c11d7 into clickhouse Aug 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants