Run Datastax Graph in a docker container for windows hosts

#docker #datastax
There are some docker images available here. If you don't have docker, download and install docker toolbox from here for your system. If you are using a windows enterprise version,  docker on windows may not be supported on older versions. So you may have to upgrade and use Windows native virtualisation Hyper V. For docker toolbox, you have to rely on others like virtualbox.  Also, note that if you have enabled Windows HyperV, you may have to disable it for docker toolbox to install. On the elevated command line you may execute the following to disable the HyperV (only for docker toolbox).
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All
After installing docker in your windows box run this from the docker bash,
docker run --name my-dse -d -p 9042:9042 luketillman/datastax-enterprise:5.1.0 -g
This will download the image from the docker hub. Thanks to Luke Tillman from Datastax. For your java/scala code or client or Dev Studio to work make sure that port 9042 is exposed. Also, the -g option will run the graph. To bash into gremlin or the container, execute the following,
docker exec -it my-dse bash
You can login to server and access gremlin from /usr/bin/dse gremlin-console and create graphs etc. Note that this image supports only single node. To connect to dse node from windows host, you have to fetch the ip of the container, so run:
 docker-machine env default
The value of DOCKER_HOST can be used by the client code to connect to cassandra graph as the endpoint. 

More can be read from here.

No comments:

Post a Comment