From 6f228c44ea82d92048f8b1dfedd9162dab4800b0 Mon Sep 17 00:00:00 2001 From: John Sanda Date: Mon, 9 Mar 2020 23:11:40 -0400 Subject: [PATCH] update docs and cassandra docker-compose service --- src/docs/content/docs/download/docker.md | 11 ++++++++++- src/packaging/docker-compose.yml | 6 +++--- src/packaging/docker-services/cassandra/cassandra.env | 4 ++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/docs/content/docs/download/docker.md b/src/docs/content/docs/download/docker.md index 4b6e2fa94..be2a19b8e 100644 --- a/src/docs/content/docs/download/docker.md +++ b/src/docs/content/docs/download/docker.md @@ -118,6 +118,14 @@ The `nodetool` Docker Compose service can be used to check on the Cassandra node docker-compose run nodetool status ``` +You can alternatively attach directly to the Cassandra container and run `nodetool status` from within it. + +First, find the Cassandra container with `docker ps | grep cassandra`. + +Then attach to the container with `docker exec -it /bin/bash`. + +Now that you have a bash shell in the container, you can run `nodetool -u reaperUser -pwf /etc/cassandra/jmxremote.password`. + Once the Cassandra node is online and accepting CQL connections, create the required `reaper_db` Cassandra keyspace to allow Reaper to save its cluster and scheduling data. By default, the `reaper_db` keyspace is created using a replication factor of 1. To change this replication factor, provide the intended replication factor as an optional argument: @@ -193,7 +201,8 @@ For the **SSL encrypted** environment use: docker-compose run nodetool-ssl status ``` -When adding the Cassandra node to the Reaper UI, the above commands can be used to find the node IP address. +When adding the Cassandra node to the Reaper UI with the IP address, the above commands can be used to find the node IP address. +You can also add the Cassandra node to the Reaper UI by hostname. The container's hostname is the docker-compose service name. A `cqlsh` Docker Compose service is included as well for both the default and SSL encrypted environments to allow the creation of user tables in Cassandra. diff --git a/src/packaging/docker-compose.yml b/src/packaging/docker-compose.yml index 1c9715669..22fe13625 100644 --- a/src/packaging/docker-compose.yml +++ b/src/packaging/docker-compose.yml @@ -13,15 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -version: '2.1' +version: '2.3' services: cassandra-common: image: cassandra:3.11 env_file: - ./docker-services/cassandra/cassandra.env - mem_limit: 4g - memswap_limit: 4g + mem_limit: 1g + memswap_limit: 1g mem_swappiness: 0 ports: - "7000:7000" diff --git a/src/packaging/docker-services/cassandra/cassandra.env b/src/packaging/docker-services/cassandra/cassandra.env index 07feeffb7..a8198d22c 100644 --- a/src/packaging/docker-services/cassandra/cassandra.env +++ b/src/packaging/docker-services/cassandra/cassandra.env @@ -32,3 +32,7 @@ CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch # open JMX port for access by Reaper # WARNING: this is unsafe in production without proper firewall settings LOCAL_JMX=no + +# JVM heap settings +MAX_HEAP_SIZE=512M +HEAP_NEWSIZE=128M