Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mrit cass es docker compose #815

Merged
merged 3 commits into from Dec 1, 2017

Conversation

@mritunjaykumar
Copy link
Contributor

commented Dec 1, 2017

This PR contains a docker-compose file that helps in development process by running Cassandra and Elasticsearch as containers, and leave blueflood out of it. You can run or debug blueflood java code using IntelliJ and don't worry about Cassandra and Elasticsearch as they are taken care of by docker-compose file.
This will create two folders under your HOME directory cassdata (for persistence Cassandra data) and esdata (for persistence Elasticsearch data).

@coveralls

This comment has been minimized.

Copy link

commented Dec 1, 2017

Coverage Status

Coverage remained the same at 75.144% when pulling 20c566f on mrit-cass-es-docker-compose into 8472919 on master.

@itzg
itzg approved these changes Dec 1, 2017
# 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

This comment has been minimized.

Copy link
@itzg

itzg Dec 1, 2017

Collaborator

An alternative is to let docker-compose manage retaining the volumes (until you do a docker-compose down -v) and use a named volume like

    - cassdata:/var/lib/cassandra

and then further down in declare a volumes section:

volumes:
    cassdata:

No need to change what you have, because there are advantages to what you've specified. Just food for thought.

# across clusters. We are also declaring that 'cassandra' is a seed node.
environment:
- CASSANDRA_CLUSTER_NAME=dev_cluster
- CASSANDRA_SEEDS=cassandra

This comment has been minimized.

Copy link
@itzg

itzg Dec 1, 2017

Collaborator

The indent on this line seems to have an extra few spaces. I'm surprised yaml/compose didn't complain.

This comment has been minimized.

Copy link
@mritunjaykumar

mritunjaykumar Dec 1, 2017

Author Contributor

Just fixed it. Good catch. I am surprised too. Unless this indentation somehow by mistake got added after the run. Nonetheless, I took care of it now.

@itzg
itzg approved these changes Dec 1, 2017
@coveralls

This comment has been minimized.

Copy link

commented Dec 1, 2017

Coverage Status

Coverage decreased (-0.06%) to 75.084% when pulling fed388d on mrit-cass-es-docker-compose into 8472919 on master.

@mritunjaykumar mritunjaykumar merged commit 4848335 into master Dec 1, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@mritunjaykumar mritunjaykumar deleted the mrit-cass-es-docker-compose branch Dec 1, 2017
@izrik

This comment has been minimized.

Copy link
Member

commented Dec 13, 2017

@mritunjaykumar Why does it create folders in the user's home directory? Shouldn't it just keep all data in the container?

@mritunjaykumar

This comment has been minimized.

Copy link
Contributor Author

commented Dec 13, 2017

@izrik - Folders are created in user's home directory to make sure data persists. Purpose of this docker-compose file is to help in development process when I would like to focus on the blueflood code and not worry about persisting data that I created during my earlier dev sessions.

@itzg

This comment has been minimized.

Copy link
Collaborator

commented Dec 14, 2017

I know I'm beating a dead horse, but just wanted to point out that this confusion is alleviated by using named volumes rather than host mapped directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.