This github covers setting up a DataStax Docker container and datastax studio. Two main docker containers are used: DataStax Studio and DataStax Server.
-
Basic understanding of Docker images and containers.
-
Docker installed on your local system, see Docker Installation Instructions.
-
When using Docker for Mac or Docker for Windows, the default resources allocated to the linux VM running docker are 2GB RAM and 2 CPU's. Make sure to adjust these resources to meet the resource requirements for the containers you will be running. More information can be found here on adjusting the resources allocated to docker.
- Prepare Docker environment-see the Prerequisites section above...
- Pull this github into a directory
git clone https://github.com/jphaugla/datastaxDockerStudio.git- Refer to the notes from DataStax Docker github for background on the needed DataStax images. Directions are here: https://github.com/datastax/docker-images/#datastax-platform-overview. Don't get too bogged down here as the included docker-compose.yaml handles most everything.
- Open terminal and change to the github home where you will see the docker-compose.yml file, then:
docker-compose up -d- Verify DataStax is working (may take a minute for datastax cassandra to startup so be patient)
docker exec dse cqlsh -e "desc keyspaces"- At this point can use the command shell from cassandra using
docker exec -it dse cqlsh- Can open the studio interface
- open browser on host computer
- http://localhost:9091
- Open the "Working with CQL worksheet"
At this point, run throught the cql worksheet and enjoy playing with Cassandra!
- To get the IP address of the DataStax and openldap:
export DSE_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dse)and:
export LDAP_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' openldap)- use
echo $DSE_IPEandecho $LDAP_IPto view - can add to the docker compose to run additional datastax workloads such as analtyics (-k), search (-s), and graph (-g)
command:
-s
-g
-k