Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Command Reference

Complete reference for all easy-db-lab commands.

Global Options

OptionDescription
--help, -hShows help information
--vpc-idReconstruct state from existing VPC (requires ClusterId tag)
--forceForce state reconstruction even if state.json exists

Setup Commands

setup-profile

Set up user profile interactively.

easy-db-lab setup-profile

Aliases: setup

Guides you through:

  • Email and AWS credentials collection
  • AWS credential validation
  • Key pair generation
  • IAM role creation
  • Packer VPC infrastructure setup
  • AMI validation/building

show-iam-policies

Display IAM policies with your account ID populated.

easy-db-lab show-iam-policies [policy-name]

Aliases: sip

ArgumentDescription
policy-nameOptional filter: ec2, iam, or emr

build-image

Build both base and Cassandra AMI images.

easy-db-lab build-image [options]
OptionDescriptionDefault
--archCPU architecture (AMD64, ARM64)AMD64
--regionAWS region(from profile)

Cluster Lifecycle Commands

init

Initialize a directory for easy-db-lab.

easy-db-lab init [cluster-name] [options]
OptionDescriptionDefault
--db, --cassandra, -cNumber of Cassandra instances3
--app, --stress, -sNumber of stress instances0
--instance, -iCassandra instance typer3.2xlarge
--stress-instance, -siStress instance typec7i.2xlarge
--azs, -zAvailability zones (e.g., a,b,c)all
--arch, -aCPU architecture (AMD64, ARM64)AMD64
--ebs.typeEBS volume type (NONE, gp2, gp3, io1, io2)NONE
--ebs.sizeEBS volume size in GB256
--ebs.iopsEBS IOPS (gp3 only)0
--ebs.throughputEBS throughput (gp3 only)0
--ebs.optimizedEnable EBS optimizationfalse
--untilWhen instances can be deletedtomorrow
--amiOverride AMI ID(auto-detected)
--openUnrestricted SSH accessfalse
--tagCustom tags (key=value, repeatable)-
--vpcUse existing VPC ID-
--upAuto-provision after initfalse
--cleanRemove existing config firstfalse

up

Provision AWS infrastructure.

easy-db-lab up [options]
OptionDescription
--no-setup, -nSkip K3s setup and AxonOps configuration

Creates: VPC, EC2 instances, K3s cluster. Configures the account S3 bucket for this cluster.

down

Shut down AWS infrastructure.

easy-db-lab down [vpc-id] [options]
ArgumentDescription
vpc-idOptional: specific VPC to tear down
OptionDescription
--allTear down all VPCs tagged with easy_cass_lab
--packerTear down the packer infrastructure VPC
--retention-days NDays to retain S3 data after teardown (default: 1)

clean

Clean up generated files from the current directory.

easy-db-lab clean

hosts

List all hosts in the cluster.

easy-db-lab hosts

status

Display full environment status.

easy-db-lab status

Cassandra Commands

All Cassandra commands are available under the cassandra subcommand group.

cassandra use

Select a Cassandra version.

easy-db-lab cassandra use <version> [options]
OptionDescription
--javaJava version to use
--hostsFilter to specific hosts

Versions: 3.0, 3.11, 4.0, 4.1, 5.0, 5.0-HEAD, trunk

cassandra write-config

Generate a new configuration patch file.

easy-db-lab cassandra write-config [filename] [options]

Aliases: wc

OptionDescriptionDefault
-t, --tokensNumber of tokens4

cassandra update-config

Apply configuration patch to all nodes.

easy-db-lab cassandra update-config [options]

Aliases: uc

OptionDescription
--restart, -rRestart Cassandra after applying
--hostsFilter to specific hosts

cassandra download-config

Download configuration files from nodes.

easy-db-lab cassandra download-config [options]

Aliases: dc

OptionDescription
--versionVersion to download config for

cassandra start

Start Cassandra on all nodes.

easy-db-lab cassandra start [options]
OptionDescriptionDefault
--sleepTime between starts in seconds120
--hostsFilter to specific hosts-

cassandra stop

Stop Cassandra on all nodes.

easy-db-lab cassandra stop [options]
OptionDescription
--hostsFilter to specific hosts

cassandra restart

Restart Cassandra on all nodes.

easy-db-lab cassandra restart [options]
OptionDescription
--hostsFilter to specific hosts

cassandra list

List available Cassandra versions.

easy-db-lab cassandra list

Aliases: ls


Cassandra Stress Commands

Stress testing commands under cassandra stress.

cassandra stress start

Start a stress job on Kubernetes.

easy-db-lab cassandra stress start [options]

Aliases: run

cassandra stress stop

Stop and delete stress jobs.

easy-db-lab cassandra stress stop [options]

cassandra stress status

Check status of stress jobs.

easy-db-lab cassandra stress status

cassandra stress logs

View logs from stress jobs.

easy-db-lab cassandra stress logs [options]

cassandra stress list

List available workloads.

easy-db-lab cassandra stress list

cassandra stress fields

List available field generators.

easy-db-lab cassandra stress fields

cassandra stress info

Show information about a workload.

easy-db-lab cassandra stress info <workload>

Utility Commands

exec

Execute commands on remote hosts via systemd-run. Tool output is captured by the systemd journal and shipped to VictoriaLogs via a dedicated journald OTel collector, with accurate timestamps for cross-service log correlation.

exec run

Run a command on remote hosts (foreground by default).

# Foreground (blocks until complete, shows output)
easy-db-lab exec run -t cassandra -- ls /mnt/db1

# Background (returns immediately, tool keeps running)
easy-db-lab exec run --bg -t cassandra -- inotifywait -m /mnt/db1/data

# Background with custom name
easy-db-lab exec run --bg --name watch-imports -t cassandra -- inotifywait -m /mnt/db1/data
OptionDescription
-t, --typeServer type: cassandra, stress, control (default: cassandra)
--bgRun in background (returns immediately)
--nameName for the systemd unit (auto-derived if not provided)
--hostsFilter to specific hosts
-pExecute in parallel across hosts

exec list

List running background tools on remote hosts.

easy-db-lab exec list
easy-db-lab exec list -t cassandra

exec stop

Stop a named background tool.

easy-db-lab exec stop watch-imports
easy-db-lab exec stop watch-imports -t cassandra

ip

Get IP address for a host by alias.

easy-db-lab ip <alias>

version

Display the easy-db-lab version.

easy-db-lab version

repl

Start interactive REPL.

easy-db-lab repl

server

Start the server for Claude Code integration, REST status endpoints, and live metrics.

easy-db-lab server

See Server for details.


Kubernetes Commands

k8 apply

Apply observability stack to K8s cluster.

easy-db-lab k8 apply

Dashboard Commands

dashboards generate

Extract all Grafana dashboard manifests (core and ClickHouse) from JAR resources to the local k8s/ directory. Useful for rapid dashboard iteration without re-running init.

easy-db-lab dashboards generate

dashboards upload

Apply all Grafana dashboard manifests and the datasource ConfigMap to the K8s cluster. Extracts dashboards, creates the grafana-datasources ConfigMap with runtime configuration, and applies everything.

easy-db-lab dashboards upload

ClickHouse Commands

clickhouse start

Deploy ClickHouse cluster to K8s.

easy-db-lab clickhouse start [options]

clickhouse stop

Stop and remove ClickHouse cluster.

easy-db-lab clickhouse stop

clickhouse status

Check ClickHouse cluster status.

easy-db-lab clickhouse status

Spark Commands

spark submit

Submit Spark job to EMR cluster.

easy-db-lab spark submit [options]

spark status

Check status of a Spark job.

easy-db-lab spark status [options]

spark jobs

List recent Spark jobs on the cluster.

easy-db-lab spark jobs

spark logs

Download EMR logs from S3.

easy-db-lab spark logs [options]

OpenSearch Commands

opensearch start

Create an AWS OpenSearch domain.

easy-db-lab opensearch start [options]

opensearch stop

Delete the OpenSearch domain.

easy-db-lab opensearch stop

opensearch status

Check OpenSearch domain status.

easy-db-lab opensearch status

AWS Commands

aws vpcs

List all easy-db-lab VPCs.

easy-db-lab aws vpcs