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

Local ClickHouse cluster configuration #33

Merged
merged 11 commits into from
Aug 10, 2022
Merged

Conversation

slvrtrn
Copy link
Contributor

@slvrtrn slvrtrn commented Aug 9, 2022

On top of #22, to keep it cleaner for the review.
Now we can run a ClickHouse cluster locally, with 2 nodes and Clickhouse Keeper (no Zookeeper)

Nginx serves as a load balancer to expose a single ClickHouse endpoint like it is done in the Cloud.

- '9000:9000'
- '9181:9181'
volumes:
- './.docker/clickhouse/cluster/config1.xml:/etc/clickhouse-server/config.xml'
Copy link
Member

Choose a reason for hiding this comment

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

Optional: what if we give them more descriptive names? config1.xml --> server_1_config.xml?

@slvrtrn slvrtrn marked this pull request as ready for review August 10, 2022 12:27
@mzitnik
Copy link

mzitnik commented Aug 10, 2022

Going forward I would suggest creating a separate module for reusing that in other drivers/clients (the cluster creation part)

@slvrtrn
Copy link
Contributor Author

slvrtrn commented Aug 10, 2022

@mzitnik that's a good idea, will do in a new PR

@slvrtrn
Copy link
Contributor Author

slvrtrn commented Aug 10, 2022

@mzitnik I've created an issue: #34

__tests__/integration/insert.test.ts Outdated Show resolved Hide resolved
query,
...this.getBaseParams(params),
});

return new Rows(stream, format);
Copy link
Member

Choose a reason for hiding this comment

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

Thinking loudly: we need to rename the result of the operation. not a blocker for the current PR

case 'CLOUD':
env = TestEnv.Cloud;
break;
case 'LOCAL_CLUSTER':
Copy link
Member

Choose a reason for hiding this comment

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

Where do we set it? Shouldn't we add a command to package.json to run the tests against a local cluster? Can be done in follow-up, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently in GHA only:

CLICKHOUSE_TEST_ENVIRONMENT: 'cloud'

but I agree

@slvrtrn slvrtrn merged commit 0efacdb into clickhouse-cloud-ci Aug 10, 2022
@mshustov mshustov deleted the local-cluster branch August 10, 2022 15:17
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.

None yet

3 participants