Skip to content

Instantly share code, notes, and snippets.

@piotrmaslanka
Last active March 1, 2021 16:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piotrmaslanka/959152183a8dcf8ad1edafe7be78da7d to your computer and use it in GitHub Desktop.
Save piotrmaslanka/959152183a8dcf8ad1edafe7be78da7d to your computer and use it in GitHub Desktop.
Script to launch a Cassandra instance on our production server.
#!/bin/bash
#
# This accepts a two commandline arguments, ie
# * the IP address of the host that is to become the node,
# * comma-separated list of hosts that are to be seed nodes
#
docker run --restart always --name cassandra -v /v2/var/lib/cassandra:/var/lib/cassandra -e GC=G1 -e I_ACCEPT_ORACLE_JAVA_LICENSE=1 -e "CLUSTER_NAME=SMOK4 Production" -e MAX_HEAP_SIZE=16G -e HEAP_NEWSIZE=3000M -e "SEED_NODES=$2" -e NUM_TOKENS=256 -e LISTEN_ADDRESS=$1 -e BROADCAST_ADDRESS=$1 -e RPC_ADDRESS=$1 -e RPC_BROADCAST_ADDRESS=$1 -e STREAMING_SOCKET_TIMEOUT_IN_MS=360000000 -e LOCAL_JMX=no -e JMX_REMOTE_PASSWORD=cass -e DISABLE_JOLOKIA=1 -e KEY_CACHE_SIZE_IN_MB=256 -e FILE_CACHE_SIZE_IN_MB=2560 -e JAEGER_AGENT_HOST=$1 -e JAEGER_TRACE_KEY=jaeger-trace -e ROW_CACHE_SIZE_IN_MB=256 -e BATCH_SIZE_FAIL_THRESHOLD_IN_KB=500 -e TOMBSTONE_FAIL_THRESHOLD=1000000 --cpus=30 -d --network=host smokserwis/cassandra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment