soldotno / elastic-mongo Goto Github PK
View Code? Open in Web Editor NEWDocker setup to get Elasticsearch and MongoDB up and running
Docker setup to get Elasticsearch and MongoDB up and running
Thank you for going through the trouble of making this available for everyone! I'm currently trying to figure out this same question. Your approach of defining each node in docker-compose.yml
doesn't feel right to me because this means you can't use docker-compose scale
command. Have you considered this?
I have followed your compose and scripts closely. However, when connecting from a java (spring boot app in my case) I discovered that the config setup for the repl set needs to be the hostname of the machine (or the external IP address). for example,
config= {"_id": "mongors", members:[{"_id": 0, "host": "external-hostname::27017", "priority": 2},{"_id": 1, "host": "external-hostname:27018", "priority": 0},{"_id": 2, "host": "external-hostname:27019", "priority": 0}]}
If I dont and instead give it the docker's internal ip address it does not work. I get a connection error (looks like the hearbeat checks against the address specified in the config variable.
I've set up the cluster successfully, the insert and update ops in mongo will be reflected immediately in the next elastic query. But the delete ops in mongo never appears in elastic, i.e. elastic doesn't delete anything.
I also check the transporter's transformer log, which shows the deleted ops from mongo is logged well and ready for elastic to use.
transformer: {"data":{"_id":{"$oid":"5617763fe2b97de59d269ee8"},"content":"haozi.","title":"Breaking news"},"ns":"harvester-test.entries","op":"insert","ts":1444378175}
transformer: {"data":{"_id":{"$oid":"5617763fe2b97de59d269ee8"},"content":"lucas","title":"Breaking news"},"ns":"harvester-test.entries","op":"update","ts":1444378211}
transformer: {"data":{"_id":{"$oid":"5617763fe2b97de59d269ee8"}},"ns":"harvester-test.entries","op":"delete","ts":1444378780}
Why does it happens?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.