docker run --name mwmanager-cassandra -d -e CASSANDRA_START_RPC=true -v /var/mydatastore:/opt/apache-cassandra/data:Z registry.access.redhat.com/jboss-mm-7-tech-preview/middleware-manager-datastore:latest
Install and Configure Cassandra
The {ProductShortName} services require a running Cassandra instance.
-
Run the Cassandra container and configure the Cassandra data location. By default the Cassandra container will create a volume under /opt/apache-cassandra/data. This container directory will automatically be mapped to a unique local directory which you can view using
docker inspect <container-id>
. You can use the-v
option to map the Cassandra data volume to a specific host directory.ImportantCASSANDRA_START_RPC
must be set totrue
. If this option is set tofalse
the middleware manager services cannot connect to Cassandra.NoteThe Z
option is necessary on Red Hat Enterprise Linux/Fedora based systems to correctly set the SELinux permissions. -
Verify that the server is running.
docker ps
ResultCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 34a75ba45be8 registry.access.redhat.com/jboss-mm-7-tech-preview/middleware-manager-datastore:latest "/docker-entrypoint.s" 44 seconds ago Up 44 seconds 7000-7001/tcp, 7199/tcp, 9042/tcp, 9160/tcp mwmanager-cassandra
-
View the node information.
docker exec -it <container_id> /opt/apache-cassandra/bin/nodetool info
Running Cassandra with a Non-default User
You can run the Cassandra container with an arbitrary user ID, however, that user must have permissions to write to the Cassandra data volume.
Note
|
The Z option is necessary on Red Hat Enterprise Linux/Fedora based systems to correctly set the SELinux permissions.
|
chown myuser:myuser /var/mydatastore docker run --name mwmanager-cassandra -d -e CASSANDRA_START_RPC=true --user $(id -u myuser) -v /var/mydatastore:/opt/apache-cassandra/data:Z registry.access.redhat.com/jboss-mm-7-tech-preview/middleware-manager-datastore:latest