Created
January 25, 2018 15:16
-
-
Save rootmos/d13aa6bf95902346b1080ee15ef9a942 to your computer and use it in GitHub Desktop.
Scripts for running a Cassandra cluster using Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker ps --filter="name=cassandra" --format="{{.Names}}" | xargs docker update --cpus $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SEED_IP=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' cassandra0) | |
docker run --rm -e CASSANDRA_SEEDS=$SEED_IP --name cassandra$1 --link cassandra0 cassandra:2.1.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker run --rm --name=cassandra0 -p 9042:9042 -p 9160:9160 cassandra:2.1.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker ps --filter="name=cassandra" --format="{{.Names}}" | xargs docker stop $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment