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
Mongo Auth | Intall pymongo via pip (vs via sys pkgs) #216
Mongo Auth | Intall pymongo via pip (vs via sys pkgs) #216
Conversation
22a3d13
to
4b9fac5
Compare
Removed special case for EL7 and pinned version. |
4b9fac5
to
65e0fe8
Compare
Travis tests pass except for one false negative a chatops EADDRINUSE error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
One cosmetic comment: please also add tags to be consistent with other tasks in this role
tags: [databases, mongodb] |
65e0fe8
to
0d815f7
Compare
@armab done! |
00702dd
to
8e96f6b
Compare
8e96f6b
to
670b17c
Compare
This installs pip via system package, and then pymongo via pip. pymongo is needed for mongodb_user module to enable mongo auth. pymongo 3.2+ is required to work with mongo 3.2+ system packages are too old on all but Ubuntu 16: - 2.5.2 on EL 6 and EL 7 - 2.6.3 on Ubuntu 14 Trusty - 3.2 on Ubuntu 16 Xenial
670b17c
to
cc44ec3
Compare
Checks are green. Please review and merge. |
# pymongo 3.2+ is required to work with mongo 3.2+. system packages are too old. | ||
become: yes | ||
pip: | ||
name: "pymongo=={{ mongodb_major_minor_version }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest pymongo
is 3.10.1
as for Jan 8, 2020
https://pypi.org/project/pymongo/
What will happen if mongodb_major_minor_version
would be 4.0
that needed for Bionic #253 and EL8?
I don't think pymongo pip version correlates with mongodb_major_minor_version
, otherwise it would affect us like Russian roulette depending on mongodb version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. I guess my sample size was too small when I looked that up. For versions 3.2-3.6, that assumption held.
Here's the chart showing supported versions: https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/#python-driver-compatibility
Now to find an elegant way to record those requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's possible to use one of the latest pymongo
versions pinned with safe interval.
My understanding that this should cover all older MongoDB versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pymongo>=3.10.1,<4.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
K. the latest commit pins the version as suggested.
fbffeba
to
0999616
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR is preparation for enabling mongo auth via the ansible playbook.
These tasks will not be activated until all required tasks are committed.
This installs pip via system package, and then pymongo via pip.
pymongo is needed for mongodb_user module to enable mongo auth.
pymongo 3.2+ is required to work with mongo 3.2+
system packages are too old on all but Ubuntu 16: