Skip to content

Commit 937bdb7

Browse files
committed
Deploy Cassandra on Google Cloud C4A (Arm-based Axion VMs)
Signed-off-by: odidev <[email protected]>
1 parent fe17602 commit 937bdb7

File tree

8 files changed

+693
-0
lines changed

8 files changed

+693
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: Deploy Cassandra on Google Cloud C4A (Arm-based Axion VMs)
3+
4+
minutes_to_complete: 30
5+
6+
who_is_this_for: This is an introductory topic for software developers migrating Cassandra workloads from x86_64 to Arm-based servers, specifically on Google Cloud C4A virtual machines built on Axion processors.
7+
8+
9+
learning_objectives:
10+
- Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors)
11+
- Install and configure Apache Cassandra on a SUSE Arm64 (C4A) instance
12+
- Validate Cassandra functionality using CQLSH and baseline keyspace/table operations
13+
- Benchmark Cassandra performance using cassandra-stress for read and write workloads on Arm64 (Aarch64) architecture
14+
15+
prerequisites:
16+
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
17+
- Familiarity with Cassandra architecture, replication, and [Cassandra partitioning & event-driven I/O](https://cassandra.apache.org/doc/stable/cassandra/architecture/)
18+
19+
author: Pareena Verma
20+
21+
##### Tags
22+
skilllevels: Introductory
23+
subjects: Databases
24+
cloud_service_providers: Google Cloud
25+
26+
armips:
27+
- Neoverse
28+
29+
tools_software_languages:
30+
- Apache Cassandra
31+
- Java
32+
- cqlsh
33+
- cassandra-stress
34+
35+
operatingsystems:
36+
- Linux
37+
38+
# ================================================================================
39+
# FIXED, DO NOT MODIFY
40+
# ================================================================================
41+
further_reading:
42+
- resource:
43+
title: Google Cloud documentation
44+
link: https://cloud.google.com/docs
45+
type: documentation
46+
47+
- resource:
48+
title: Apache Cassandra documentation
49+
link: https://cassandra.apache.org/doc/latest/
50+
type: documentation
51+
52+
- resource:
53+
title: Cassandra-stress documentation
54+
link: https://cassandra.apache.org/doc/4.0/cassandra/tools/cassandra_stress.html
55+
type: documentation
56+
57+
weight: 1
58+
layout: "learningpathall"
59+
learning_path_main_page: "yes"
60+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Getting started with Cassandra on Google Axion C4A (Arm Neoverse-V2)
3+
4+
weight: 2
5+
6+
layout: "learningpathall"
7+
---
8+
9+
## Google Axion C4A Arm instances in Google Cloud
10+
11+
Google Axion C4A is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, these virtual machines offer strong performance for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
12+
13+
The C4A series provides a cost-effective alternative to x86 virtual machines while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
14+
15+
To learn more about Google Axion, refer to the [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu) blog.
16+
17+
## Cassandra
18+
19+
Cassandra is a highly scalable, distributed NoSQL database designed to handle large amounts of data across many commodity servers without a single point of failure.
20+
21+
It provides high availability, fault tolerance, and linear scalability, making it ideal for real-time big data applications and high-throughput workloads.
22+
23+
Cassandra is widely used for time-series data, IoT applications, recommendation engines, and large-scale cloud services. Learn more from the [Cassandra official website](https://cassandra.apache.org/) and its [documentation](https://cassandra.apache.org/doc/latest/).
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: Apache Cassandra baseline testing on Google Axion C4A Arm Virtual machine
3+
weight: 5
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
10+
Since Cassandra has been successfully installed on your GCP C4A Arm virtual machine, follow these steps to verify that it is running and functioning properly.
11+
12+
## Baseline Testing for Apache Cassandra
13+
14+
This guide helps verify the installation and perform baseline testing of **Apache Cassandra**.
15+
16+
## Start Cassandra
17+
18+
Run Cassandra in the background:
19+
20+
```console
21+
cassandra -R
22+
```
23+
24+
The `-R` flag allows Cassandra to run in the background as a daemon, so you can continue using the terminal. The first startup may take **30–60 seconds** as it initializes the necessary files and processes.
25+
26+
Check logs to ensure Cassandra started successfully:
27+
28+
```console
29+
tail -f ~/cassandra/logs/system.log
30+
```
31+
Look for the message **"Startup complete"**, which indicates Cassandra is fully initialized.
32+
33+
### Check Cassandra Status
34+
```console
35+
nodetool status
36+
```
37+
You should see an output similar to:
38+
39+
```output
40+
Datacenter: datacenter1
41+
=======================
42+
Status=Up/Down
43+
|/ State=Normal/Leaving/Joining/Moving
44+
-- Address Load Tokens Owns (effective) Host ID Rack
45+
UN 127.0.0.1 162.51 KiB 16 100.0% 78774686-39f3-47e7-87c3-3abc4f02a835 rack1
46+
```
47+
The `nodetool status` command displays the health and status of your Cassandra node(s). For a single-node setup, the output should indicate that the node is **Up (U)** and **Normal (N)**. This confirms that your Cassandra instance is running and ready to accept queries.
48+
49+
### Connect with CQLSH (Cassandra Query Shell)
50+
**cqlsh** is the interactive command-line shell for Cassandra. It allows you to run Cassandra Query Language (CQL) commands to interact with your database, create keyspaces and tables, insert data, and perform queries.
51+
52+
```console
53+
cqlsh
54+
```
55+
You’ll enter the CQL (Cassandra Query Language) shell.
56+
57+
### Create a Keyspace (like a database)
58+
A **keyspace** in Cassandra is similar to a database in SQL systems. Here, we create a simple keyspace `testks` with a **replication factor of 1**, meaning data will only be stored on one node (suitable for a single-node setup).
59+
60+
```sql
61+
CREATE KEYSPACE testks WITH replication = {'class':'SimpleStrategy','replication_factor' : 1};
62+
```
63+
Check if created:
64+
65+
```sql
66+
DESCRIBE KEYSPACES;
67+
```
68+
69+
You should see an output similar to:
70+
71+
```output
72+
cqlsh> DESCRIBE KEYSPACES;
73+
74+
system system_distributed system_traces system_virtual_schema
75+
system_auth system_schema system_views testks
76+
```
77+
78+
### Create a Table
79+
Tables in Cassandra are used to store structured data. This step creates a `users` table with three columns: `id` (unique identifier), `name` (text), and `age` (integer). The `id` column is the primary key.
80+
81+
```sql
82+
USE testks;
83+
84+
CREATE TABLE users (
85+
id UUID PRIMARY KEY,
86+
name text,
87+
age int
88+
);
89+
```
90+
91+
### Insert Data
92+
We insert two sample rows into the `users` table. The `uuid()` function generates a unique identifier for each row, which ensures that every user entry has a unique primary key.
93+
94+
```sql
95+
INSERT INTO users (id, name, age) VALUES (uuid(), 'Alice', 30);
96+
INSERT INTO users (id, name, age) VALUES (uuid(), 'Bob', 25);
97+
```
98+
99+
### Query Data
100+
This command retrieves all rows from the `users` table. Successful retrieval confirms that data insertion works correctly and that queries return expected results.
101+
102+
```sql
103+
SELECT * FROM users;
104+
```
105+
106+
You should see an output similar to:
107+
108+
```output
109+
id | age | name
110+
--------------------------------------+-----+-------
111+
c08dafde-17f0-4a4a-82b8-54455bb07836 | 25 | Bob
112+
d47eb93c-3988-4aa1-bc85-9561500a6893 | 30 | Alice
113+
114+
(2 rows)
115+
```
116+
117+
This baseline test verifies that Cassandra 5.0.5 is installed and running correctly on the VM. It confirms the node status, allows connection via `cqlsh`, and ensures basic operations like creating a keyspace, table, inserting, and querying data work as expected.

0 commit comments

Comments
 (0)