Skip to content

Commit

Permalink
create doc folder for system administrators and index jobhashes colle…
Browse files Browse the repository at this point in the history
…ction with ES
  • Loading branch information
zy4 committed Aug 24, 2016
1 parent 3689b07 commit 45370bd
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/controllers/Search.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,11 @@ final class Search @Inject() (jobDao: JobDAO) extends Controller {
}
}

/* def checkExistantJob(job: String) = Action.async {
NoContent
}*/


}
6 changes: 4 additions & 2 deletions conf/base.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ elastic4s {
index: "tkplay_dev"
type: "jobs"
}
jobshashes {
index: "tkplay_dev"
type: "jobhashes"
}
}
}



play.modules.enabled += "com.evojam.play.elastic4s.Elastic4sModule"

# Play Framework cache name definitons
Expand Down
34 changes: 34 additions & 0 deletions doc/mongodb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Toolkit MongoDB and ElasticSearch config
=============================================

Here we describe how to set up the data storage with MongoDB (3.2.9) and ElasticSearch (2.2.2).

The big picture
---------------

We use ElasticSearch for filtering jobs. One main feature is job hashing to prevent that already processed job
get unnecessarily on our cluster again.
Therefore we use ElasticSearch to scan our database for jobs which have the same signature in terms of: `hash value`,
`database type` and `database version`.


Setup
-----
ElasticSearch indexes MongoDB via [Mongo-Connector](https://github.com/mongodb-labs/mongo-connector) and [Elastic2-Doc-Manager](https://github.com/mongodb-labs/elastic2-doc-manager)
ElasticSearch binds to port 9200 and 9300.


Sharding and Replication
------------------------
It is required to run MongoDB as a replSet with an odd number of nodes. It is recommended to have at least 3 nodes
for production systems which are not located on the same physical machine:

In a production, deploy each member of the replica set to its own machine and if possible bind to the standard MongoDB port of 27017


Compression
-----------


Validation
----------

0 comments on commit 45370bd

Please sign in to comment.