Package: elastic2-doc-manager
====================elastic2-doc-manager====================The mongo-connector project originated as a MongoDB mongo-labsproject and is now community-maintained under the custody of YouGov, Plc... image:: https://travis-ci.org/yougov/elastic2-doc-manager.svg?branch=master:alt: View build status:target: https://travis-ci.org/yougov/elastic2-doc-managerGetting Started===============This package is a document manager for`mongo-connector <https://github.com/yougov/mongo-connector>`_ thattargets Elasticsearch versions 2.x and 5.x -- don't let the name fool you!For information on running mongo-connector with Elasticsearch, please see the`MongoConnector Usage with Elasticsearch<https://github.com/yougov/mongo-connector/wiki/Usage%20with%20ElasticSearch>`_wiki page.Installation============The installation of the elastic2-doc-manager depends on which version ofElasticsearch you are targeting.Elasticsearch 1.x-----------------This is the document manager for Elasticsearch 2.x and 5.x. If youwant to target Elasticsearch 1.x, please install the`elastic-doc-manager <https://github.com/yougov/elastic-doc-manager>`_.Elasticsearch 2.x-----------------For use with an Elasticsearch 2.x server, install with`pip <https://pypi.python.org/pypi/pip>`__::pip install 'elastic2-doc-manager[elastic2]'Elasticsearch 5.x-----------------For use with an Elasticsearch 5.x server, install with::pip install 'elastic2-doc-manager[elastic5]'.. note:: Version 0.3.0 added support for Elasticsearch 5.x.Amazon Elasticsearch Service----------------------------To use with Amazon Elasticsearch Service, you must install the required AWSdependencies along with the version of Elasticsearch::pip install 'elastic2-doc-manager[elastic2,aws]'Development-----------You can also install the development version of elastic2-doc-managermanually::git clone https://github.com/yougov/elastic2-doc-manager.gitpip install -e './elastic2-doc-manager[elastic2]'You may have to run ``pip`` with ``sudo``, depending on where you'reinstalling and what privileges you have... note:: Please note that before mongo-connector version 2.2.2, the elasticdoc manager was packaged with mongo-connector and only supportedElasticsearch 1.x.Running the tests-----------------Requirements~~~~~~~~~~~~1. Copy of the Elastic 2.x Document Manager Github repositoryThe tests are not included in the package from PyPI and can only be acquiredby cloning this repository on Github::git clone https://github.com/yougov/elastic2-doc-manager2. ToxInstall `tox <https://pypi.org/project/tox>`_.2. Environment variablesThere are a few influential environment variables that affect the tests. These aredefined in the tox.ini.All the tests live in the `tests` directory.Running tests on the command-line~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~While the tests take care of setting up and tearing down MongoDB clusters ontheir own, make sure to start Elasticsearch before doing a full test run!You can run all the tests with one command (this works in all supported Python versions)::toxError messages~~~~~~~~~~~~~~Some of the tests are meant to generate lots of ``ERROR``-level log messages,especially the rollback tests. mongo-connector logs exceptions it encounterswhile iterating the cursor in the oplog, so we see these in the console outputwhile MongoDB clusters are being torn apart in the tests. As long as all thetests pass with an `OK` message, all is well.