New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mongodb] Simplify configuration, reduce to minimum #1771

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@predominant
Contributor

predominant commented Aug 9, 2018

Signed-off-by: Graham Weldon graham@grahamweldon.com

tenor-113699260

This reduces the complexity of the configuration, and minimizes the default configuration. It also removes the configuration for mongos.

The new configuration is in line with the default configuration shipped with the MongoDB package for Debian systems.

This is in line with core-plans being a resource for bare minimum setup. More complex configuration should be done in configuration plans.

Testing

build; source results/last_build.env; hab pkg install results/${pkg_artifact}
hab svc load ${pkg_ident}

Service will load, then perform the following as a test of db interaction:

# mongo
MongoDB shell version v3.6.4
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.6.4
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
	http://docs.mongodb.org/
Questions? Try the support group
	http://groups.google.com/group/mongodb-user


> show dbs;
admin  0.000GB
local  0.000GB


> use newdb
switched to db newdb


> db.createCollection( "contacts", {
...    validator: { $jsonSchema: {
...       bsonType: "object",
...       required: [ "phone" ],
...       properties: {
...          phone: {
...             bsonType: "string",
...             description: "must be a string and is required"
...          },
...          email: {
...             bsonType : "string",
...             pattern : "@mongodb\.com$",
...             description: "must be a string and match the regular expression pattern"
...          },
...          status: {
...             enum: [ "Unknown", "Incomplete" ],
...             description: "can only be one of the enum values"
...          }
...       }
...    } }
... } )
{ "ok" : 1 }
Simplify mongodb configuration, reduce to minimum
Signed-off-by: Graham Weldon <graham@grahamweldon.com>

@predominant predominant requested a review from habitat-sh/habitat-core-plans-maintainers as a code owner Aug 9, 2018

@thesentinels

This comment has been minimized.

Contributor

thesentinels commented Aug 9, 2018

Thanks for the pull request! Here is what will happen next:

  1. Your PR will be reviewed by the maintainers
  2. If everything looks good, one of them will approve it, and your PR will be merged.

Thank you for contributing!

@smacfarlane

This comment has been minimized.

Contributor

smacfarlane commented Aug 9, 2018

Thanks for this PR @predominant ! While I personally think this is 100% the right pattern, I'm going to toss a needs discussion and do not merge label on this. We're removing a large swath of configuration that users of this plan may depend on that I think warrants some discussion before we merge this.

@predominant

This comment has been minimized.

Contributor

predominant commented Aug 9, 2018

Thanks @smacfarlane, that’s what I anticipated :)

@nellshamrell

This comment has been minimized.

Contributor

nellshamrell commented Aug 10, 2018

I also agree this is the correct course of action - thinking on how we can communicate this to users of the current plan who may depend on the configuration we are removing.

@nellshamrell

This comment has been minimized.

Contributor

nellshamrell commented Aug 10, 2018

It also might be worth adding an example of how someone could use this in a configuration plan of their own.

Add README
Signed-off-by: Graham Weldon <graham@grahamweldon.com>
@smacfarlane

This comment has been minimized.

Contributor

smacfarlane commented Sep 24, 2018

@nellshamrell Since the base plans refresh has been delayed, I'd like to target this to be merged as part of that work when we pick it up again. Thoughts?

@predominant

This comment has been minimized.

Contributor

predominant commented Nov 6, 2018

Poke @nellshamrell and @smacfarlane on this one. Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment