Skip to content

precog/quasar-datasource-mongo

Repository files navigation

Quasar Mongo Discord

Usage

libraryDependencies += "com.precog" %% "quasar-datasource-mongo" % <version>

Configuration

{ "connectionString": <CONNECTION_STRING>,
  "batchSize": Int,
  "pushdownLevel": <"disabled"|"light"|"full">,
  "tunnelConfig": {
    host: String,
    port: Int,
    pass: <PASS>
  }
}
// PASS
{ "password": String } | { "key": String, "passphrase": String }
  • connectionString must conform Connection String Format
  • tunnelConfig is optional
  • pass.key is content of private key file for ssh tunneling.

Testing

The simplest way to test is using Nix system and run subset of .travis.yml. One time only, generate an ssh key:

$> """ssh-keygen -t rsa -N "passphrase" -f key_for_docker -m PEM""",

Then, when you want to test, run this:

$> docker swarm init
$> docker stack deploy -c docker-compose.yml teststack

It starts multiple containers:

  • sshd with root:root with 22222 ssh port
  • mongo aliased as mng for sshd container.
  • plain mongo on port 27018
  • SSL-enabled mongo on port 27019
  • SSL-enabled mongo with client-required key on port 27020

You can stop it afterwards with

$> docker stack rm teststack
$> docker swarm leave --force

(Unfortunately docker-compose doesn't work on Windows for me @cryogenian 29.04.2019)