This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1. Testing with Mongo Orchestration
2. Ruby Engineer on the drivers team. Based in Berlin. Work on
the gems: bson mongo mongoid bson_ext mongo_kerberos @EmStolfo
3. MongoDB Drivers C C++ C# Java Node.js Perl PHP Python Ruby
Scala
4. MongoDB Drivers Interface to the server. 10 official drivers
available. Many started as OS projects. History
5. No specifications. Divergent codebases and features. MongoDB
Drivers Reality
6. Server interface was not consistent. MongoDB Drivers
Reality
7. Organizations can experience 1 interface. Specifications
guide design and provide documentation. Rewrites with collective
knowledge. MongoDB Drivers Revamp
8. Server interface is a single product. MongoDB Drivers
Revamp
9. Specifications Equally valuable to the drivers team as to
the community.
10. Server Discovery and Monitoring Spec Logic required to make
an application using MongoDB highly available.
11. How to validate compliance?
12. Test requirements Unit tests. Integration tests. Defined as
data. Language-agnostic. Reproducible scenarios. Mongo
Orchestration
13. Testing with Mongo Orchestration 1. Mongo Orchestration 2.
Driver integration tests 3. How you can use MO
14. Mongo Orchestration
15. Define clusters using JSON. Manipulate clusters via RESTful
API. Mongo Orchestration HTTP server providing REST interface to
manage multiple MongoDB processes on the same machine. Implemented
in python. Maintained by Luke Lovett (llvtt)
16. What about Automation!? Is intended for testing. Starts
processes on one machine. Allows fault injection. Does not have a
UI. Has no protection against downtime. Has one agent, so no
resiliency. Does not handle operation tasks. Mongo Orchestration..
!
17. Create different cluster topologies. Single Mongo
Orchestration Replica Set Sharded Cluster
18. Setup
19. Single server config options
20. Replica Set config options
21. Sharded Cluster config options
22. Define different installations in a config file mongo-
orchestration.config
23. Set up a Replica Set
24. Benefits of MO Reproducible test scenarios. Abstracts
differing configuration options across MongoDB versions. Uniform
interface regardless of OS. Ability to define different locations
of MongoDB installations for multi- version testing.
31. benefits Format: YAML Describes data. Can translate to
actions. Most languages can use a YAML parsing library. Driver
authors write a reusable harness. Changes in the spec can be
communicated via additional YAML tests or changes to existing
ones.
32. Integration tests Test driver behavior. Input: cluster
state Output: driver behavior Mongo Orchestration
33. Test harness (in Ruby) PR #584 [WIP] Integration tests
using Mongo Orchestration
45. Define different installations in a config file mongo-
orchestration.config
46. start
47. setup/teardown in python Send requests
48. stop
49. General uses of MO Test your applications behavior during a
failover. Verify your application can reliably go into readonly
mode. Easily test your application with any configuration of
MongoDB.