Build a real-time analytics pipeline with ClickHouse on Google Cloud Axion
Introduction
Get started with ClickHouse on Google Cloud C4A Arm virtual machines
Create a Firewall Rule on GCP
Create a Google Axion C4A Arm virtual machine on GCP
Set up GCP Pub/Sub and IAM for ClickHouse real-time analytics on Axion
Install ClickHouse
Establish a ClickHouse baseline on Arm
Build a Dataflow streaming ETL pipeline to ClickHouse
Benchmark ClickHouse on Google Axion processors
Next Steps
Build a real-time analytics pipeline with ClickHouse on Google Cloud Axion
Introduction
Get started with ClickHouse on Google Cloud C4A Arm virtual machines
Create a Firewall Rule on GCP
Create a Google Axion C4A Arm virtual machine on GCP
Set up GCP Pub/Sub and IAM for ClickHouse real-time analytics on Axion
Install ClickHouse
Establish a ClickHouse baseline on Arm
Build a Dataflow streaming ETL pipeline to ClickHouse
Benchmark ClickHouse on Google Axion processors
Next Steps
Install ClickHouse and gcloud CLI on GCP VM
In this section you’ll install Google Cloud CLI (gcloud) and ClickHouse on your GCP SUSE Linux Arm64 (Axion C4A) VM. These tools are required to:
- Interact with GCP services such as Pub/Sub and Dataflow
- Store and query real-time analytics data efficiently using ClickHouse on Arm64
Install Google Cloud CLI (gcloud)
The Google Cloud CLI is required to authenticate with GCP, publish Pub/Sub messages, and submit Dataflow jobs from the VM.
Download gcloud SDK (Arm64)
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-arm.tar.gz
Extract and install gcloud
tar -xzf google-cloud-cli-linux-arm.tar.gz
cd google-cloud-sdk
./install.sh
Accept the default options during installation.
Initialize gcloud
source ~/.bashrc
gcloud init
During initialization:
- Select the correct project (for example: imperial-time-xxxxxx)
- Choose the default region (for example: us-central1)
Verify authentication
gcloud auth list
You should see an output similar to:
Credentialed Accounts
ACTIVE ACCOUNT
* <PROJECT_NUMBER>-compute@developer.gserviceaccount.com
Install required system packages and the ClickHouse repo
Refresh system repositories and install basic utilities needed to download and run ClickHouse.
sudo zypper refresh
sudo zypper addrepo -r https://packages.clickhouse.com/rpm/clickhouse.repo -g
sudo zypper --gpg-auto-import-keys refresh clickhouse-stable
Install ClickHouse via the ClickHouse repo
Download and install ClickHouse for SuSE systems:
sudo zypper install -y clickhouse-server clickhouse-client
This installs:
- ClickHouse Server – Runs the core database engine and handles all data storage, queries, and processing.
- ClickHouse Client – Provides a command-line interface to connect to the server and run SQL queries.
- ClickHouse Local – Allows running SQL queries on local files without starting a server.
- Default configuration files (/etc/clickhouse-server) – Stores server settings such as ports, users, storage paths, and performance tuning options.
Verify the installed version
Confirm that all ClickHouse components are installed correctly by checking their versions.
clickhouse --version
clickhouse server --version
clickhouse client --version
clickhouse local --version
You should see an output similar to:
ClickHouse local version 25.11.2.24 (official build).
ClickHouse server version 25.11.2.24 (official build).
ClickHouse client version 25.11.2.24 (official build).
Create ClickHouse user and directories
Create a dedicated system user and required directories for data, logs, and runtime files.
sudo useradd -r -s /sbin/nologin clickhouse || true
sudo mkdir -p /var/lib/clickhouse
sudo mkdir -p /var/log/clickhouse-server
sudo mkdir -p /var/run/clickhouse-client
Set proper ownership so ClickHouse can access these directories.
sudo chown -R clickhouse:clickhouse \
/var/lib/clickhouse \
/var/log/clickhouse-server \
/var/run/clickhouse-client
sudo chmod 755 /var/lib/clickhouse \
/var/log/clickhouse-server \
/var/run/clickhouse-client
Start ClickHouse Server manually
You can just run the ClickHouse server in the foreground to confirm the configuration is valid.
sudo -u clickhouse clickhouse server --config-file=/etc/clickhouse-server/config.xml
Keep this terminal open while testing.
Connect using ClickHouse Client
Open a new SSH terminal and connect to the ClickHouse server.
clickhouse client
Run a test query to confirm connectivity.
SELECT version();
You should see an output similar to:
SELECT version()
Query id: ddd3ff38-c0c6-43c5-8ae1-d9d07af4c372
┌─version()───┐
1. │ 25.11.2.24 │
└─────────────┘
1 row in set. Elapsed: 0.001 sec.
Please close the client SSH terminal and press “ctrl-c” in the server SSH terminal to halt the manual invocation of ClickHouse. FYI, the server may take a few seconds to close down when “ctrl-c” is received.
Recent benchmarks show that ClickHouse (v22.5.1.2079-stable) delivers up to 26% performance improvements on Arm-based platforms, such as AWS Graviton3, compared to other architectures, highlighting the efficiency of its vectorized execution engine on modern Arm CPUs. You can view this Blog
The Arm Ecosystem Dashboard recommends ClickHouse version v22.5.1.2079-stable, the minimum recommended on the Arm platforms.
Create a systemd service
Set up ClickHouse as a system service so it starts automatically on boot.
sudo tee /etc/systemd/system/clickhouse-server.service <<'EOF'
[Unit]
Description=ClickHouse Server
After=network.target
[Service]
Type=simple
User=clickhouse
Group=clickhouse
ExecStart=/usr/bin/clickhouse server --config=/etc/clickhouse-server/config.xml
Restart=always
RestartSec=10
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
EOF
Reload systemd and enable the service:
sudo systemctl enable clickhouse-server
sudo systemctl start clickhouse-server
sudo systemctl daemon-reload
You may get the following error which can be safely ignored:
“ln: failed to create symbolic link ‘/etc/init.d/rc2.d/S50clickhouse-server’: No such file or directory”
Verify ClickHouse service
Ensure the ClickHouse server is running correctly as a background service.
sudo systemctl status clickhouse-server
This confirms that the ClickHouse server is running correctly under systemd and ready to accept connections.
● clickhouse-server.service - ClickHouse Server
Loaded: loaded (/etc/systemd/system/clickhouse-server.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2025-11-27 05:07:42 UTC; 18s ago
Main PID: 4229 (ClickHouseWatch)
Tasks: 814
CPU: 2.629s
CGroup: /system.slice/clickhouse-server.service
├─ 4229 clickhouse-watchdog server --config=/etc/clickhouse-server/config.xml
└─ 4237 /usr/bin/clickhouse server --config=/etc/clickhouse-server/config.xml
Final validation
Reconnect to ClickHouse and confirm it is operational.
clickhouse client
SELECT version();
You should see an output similar to:
SELECT version()
Query id: ddd3ff38-c0c6-43c5-8ae1-d9d07af4c372
┌─version()───┐
1. │ 25.12.1.168 │
└─────────────┘
1 row in set. Elapsed: 0.001 sec.
ClickHouse and gcloud CLI are now successfully installed, configured, and validated on a GCP Axion (Arm64) VM. The system is ready for Pub/Sub testing and Dataflow ETL in the next phase.