ClickHouse setup
Guide to setting up ClickHouse for Raven platform
This document provides detailed instructions on setting up ClickHouse for the Raven platform. ClickHouse is used to store and query data efficiently within the Raven platform. You have the option to use ClickHouse’s SaaS offering for a fully managed experience or deploy ClickHouse on an EC2 instance using Bitnami’s AMI for a self-hosted setup.
Options for Setting Up ClickHouse
1. ClickHouse SaaS Offering
Using ClickHouse’s SaaS offering is the simplest way to get started. It eliminates the need for maintaining, monitoring, and patching a self-hosted ClickHouse database. More information on the SaaS offering can be found on the ClickHouse official website.
2. Self-Hosted ClickHouse on EC2
For a self-hosted setup, you can use the AMI provided by Bitnami to deploy an EC2 instance with ClickHouse preconfigured and ready to run. This approach offers more control and customization over your ClickHouse instance.
Steps to Deploy ClickHouse on EC2
-
Launch EC2 Instance using Bitnami AMIUse the Bitnami ClickHouse AMI available here to launch an EC2 instance.
-
Terraform SetupThe provided Terraform example repo includes a script to set up a ClickHouse EC2 instance. You can find the script here.
-
Allow Access to Port 9000Ensure the EC2 instance’s security group allows inbound access to port 9000 from your EKS cluster. This port is necessary for the microservices to connect to the ClickHouse database.
Getting ClickHouse Credentials
After setting up the EC2 instance, follow these steps to retrieve the ClickHouse credentials:
- SSH into the EC2 InstanceUse the SSH key found in Secrets Manager (if you used the provided Terraform example) to access the EC2 instance.
- Retrieve CredentialsRun the following command to get the ClickHouse credentials:
Replace <clickhouse_host>
, and <clickhouse_password>
with the values retrieved from the EC2 instance.
Conclusion
Setting up ClickHouse can be done using either the SaaS offering for a fully managed experience or by deploying a self-hosted instance on EC2 using Bitnami’s AMI. Follow the provided steps to retrieve the necessary credentials and configure your microservices for seamless integration with ClickHouse. For further assistance, refer to the Raven Documentation or contact support.