Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #815 from rackerlabs/mrit-cass-es-docker-compose
Mrit cass es docker compose
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
contrib/blueflood-docker-compose/docker-compose-cass-es.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# using Docker-Compose Version 3 | ||
version: '3' | ||
|
||
services: | ||
# Configuration for seed cassandra node. Also, this is the only node | ||
cassandra: | ||
container_name: cassandra-node | ||
image: cassandra:2.1 | ||
ports: | ||
- "7000:7000" | ||
- "7001:7001" | ||
- "9042:9042" | ||
- "9160:9160" | ||
- "7199:7199" | ||
|
||
# Exposing ports for inter cluster communication. | ||
expose: | ||
- 7000 # Intra-node communication | ||
- 7001 # TLS intra-node communication | ||
- 7199 # JMX | ||
- 9042 # CQL | ||
- 9160 # Thrift service | ||
|
||
command: bash -c 'if [ -z "$$(ls -A /var/lib/cassandra/)" ] ; then sleep 0; fi && /docker-entrypoint.sh cassandra -f' | ||
|
||
# Network for the nodes to communicate | ||
networks: | ||
- dc1ring | ||
|
||
# Maps cassandra data to a local folder. This preserves data across | ||
# container restarts. Note a folder 'cassdata' gets created locally in HOME directory. | ||
volumes: | ||
- ${HOME}/cassdata:/var/lib/cassandra | ||
|
||
# Docker container environment variable. We are using the | ||
# CASSANDRA_CLUSTER_NAME to name the cluster. This needs to be the same | ||
# across clusters. We are also declaring that 'cassandra' is a seed node. | ||
environment: | ||
- CASSANDRA_CLUSTER_NAME=dev_cluster | ||
- CASSANDRA_SEEDS=cassandra | ||
|
||
# Cassandra ulimt recommended settings | ||
ulimits: | ||
memlock: -1 | ||
nproc: 32768 | ||
nofile: 100000 | ||
|
||
elasticsearch: | ||
container_name: elasticsearch-node | ||
image: elasticsearch:1.7 | ||
ports: | ||
- "9200:9200" | ||
- "9300:9300" | ||
command: elasticsearch -Des.cluster.name="elasticsearch" | ||
volumes: | ||
- ${HOME}/esdata:/usr/share/elasticsearch/data | ||
environment: | ||
- cluster.name="elasticsearch" | ||
|
||
networks: | ||
dc1ring: |