-
Notifications
You must be signed in to change notification settings - Fork 39
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
[reconfigurator] ClickHouse XML generation types #6412
Conversation
pub const CLICKHOUSE_HTTP_PORT: u16 = 8123; | ||
pub const CLICKHOUSE_INTERSERVER_PORT: u16 = 9009; | ||
pub const CLICKHOUSE_TCP_PORT: u16 = 9000; | ||
pub const CLICKHOUSE_KEEPER_TCP_PORT: u16 = 9181; | ||
pub const CLICKHOUSE_KEEPER_RAFT_PORT: u16 = 9234; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These ports are the default ClickHouse ports https://clickhouse.com/docs/en/guides/sre/network-ports
pub config_dir: Utf8PathBuf, | ||
pub id: ServerId, | ||
pub datastore_path: Utf8PathBuf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The datastore_path
and config_dir
must be different directories. The clickhouse_{server|keeper}
zones will have the clickhouse files like logs in the datastore directory, and the configuration files will need to live in in /opt/oxide/clickhouse_{server|keeper}/config.d/config_{server|keeper}.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Karen, this looks great! Just some minor comments.
pub config_dir: Utf8PathBuf, | ||
pub id: ServerId, | ||
pub datastore_path: Utf8PathBuf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review @andrewjstone! I'll update the PR with your comments
Overview
This commit adds a library to generate ClickHouse replica server and keeper configuration files. A lot of the code in the
clickhouse-admin/types
directory has been copied over from clickward, but there are several additions and modifications:new()
anddefault()
methods that set default Oxide values.Usage
To generate a replica server configuration file:
To generate a keeper configuration file:
Purpose
As part of the work to roll out replicated ClickHouse, we'll need to dynamically generate the node configuration files via the
clickhouse-admin
service. This commit is part of the work necessary to do so.Related: #5999 , #3824