Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## start three nodes
- ```sh
- docker run -d --name "cass0" zmarcantel/cassandra
- docker run -d --name cass1 --link cass0:cass0 zmarcantel/cassandra
- docker run -d --name cass2 --link cass0:cass0 --link cass1:cass1 zmarcantel/cassandra
- ```
- ### capture the image names and extract their IPs
- ```sh
- export CASSDOCK_ID=`docker ps | grep cassandra | awk '{print $1}' | xargs`
- docker inspect $CASSDOCK_ID | grep IPAddress | sed 's/"IPAddress": "/ /g' | sed 's/",//g' | sed 's/ //g' | grep -v null | sort -u
- ```
- ### open bash as root on one node and install then run the python cassandra query tool
- ```sh
- docker exec -it `docker ps | grep cassandra | awk '{print $1}' | head -1` bash
- apt-get update
- apt-get install python-setuptools python-dev build-essential
- easy_install pip
- pip install --upgrade virtualenv
- # this next command appeared to hang but eventually completes
- pip install cqlsh
- # if you see ProtocolError on the following try downgrading cqlsh with: uninstall cqlsh && pip install cqlsh==4.0.1
- cqlsh 127.0.0.1
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement