Skip to content
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

BC-6654 - Update mongo to v5 #839

Merged
merged 5 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible/group_vars/develop/dof_mongo.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
MONGO_IMAGE_NAME: mongo
MONGO_IMAGE_TAG: 4.4.13
MONGO_IMAGE_TAG: 5.0.26
MONGO_EXPORTER_IMAGE_NAME: percona/mongodb_exporter
MONGO_EXPORTER_IMAGE_TAG: 0.39
2 changes: 1 addition & 1 deletion ansible/group_vars/infra/dof_mongo.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
MONGO_IMAGE_NAME: mongo
MONGO_IMAGE_TAG: 4.4.13
MONGO_IMAGE_TAG: 5.0.26
MONGO_EXPORTER_IMAGE_NAME: percona/mongodb_exporter
MONGO_EXPORTER_IMAGE_TAG: 0.39
2 changes: 1 addition & 1 deletion ansible/group_vars/loadtest/dof_mongo.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
MONGO_IMAGE_NAME: mongo
MONGO_IMAGE_TAG: 4.4.13
MONGO_IMAGE_TAG: 5.0.26
MONGO_EXPORTER_IMAGE_NAME: percona/mongodb_exporter
MONGO_EXPORTER_IMAGE_TAG: 0.39
48 changes: 24 additions & 24 deletions ansible/roles/rocketchat/templates/fixup-configmap.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ data:
sleep 1
done
mongosh $MONGO_URL --eval '
db.rocketchat_permissions.update({ _id: "create-team"}, { $set: { roles: ["admin"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "delete-team"}, { $set: { roles: ["admin"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "edit-team"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "add-team-member"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "edit-team-member"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "add-team-channel"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "edit-team-channel"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "remove-team-channel"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "view-all-team-channels"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "create-c"}, { $set: { roles: ["admin", "bot"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "create-p"}, { $set: { roles: ["admin", "bot"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "leave-p"}, { $set: { roles: ["admin", "bot"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "view-outside-room"}, { $set: { roles: ["admin", "moderator", "owner"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "add-user-to-any-p-room"}, { $set: { roles: ["admin"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "ban-user"}, { $set: { roles: ["admin", "owner"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "edit-room"}, { $set: { roles: ["admin", "owner"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "remove-user"}, { $set: { roles: ["admin", "owner"] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "start-discussion-other-user"}, { $set: { roles: [] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "start-discussion"}, { $set: { roles: [] }},{ upsert: true });
db.rocketchat_permissions.update({ _id: "view-outside-room"}, { $set: { roles: [] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "create-team"}, { $set: { roles: ["admin"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "delete-team"}, { $set: { roles: ["admin"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "edit-team"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "add-team-member"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "edit-team-member"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "add-team-channel"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "edit-team-channel"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "remove-team-channel"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "view-all-team-channels"}, { $set: { roles: ["admin" ] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "create-c"}, { $set: { roles: ["admin", "bot"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "create-p"}, { $set: { roles: ["admin", "bot"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "leave-p"}, { $set: { roles: ["admin", "bot"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "view-outside-room"}, { $set: { roles: ["admin", "moderator", "owner"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "add-user-to-any-p-room"}, { $set: { roles: ["admin"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "ban-user"}, { $set: { roles: ["admin", "owner"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "edit-room"}, { $set: { roles: ["admin", "owner"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "remove-user"}, { $set: { roles: ["admin", "owner"] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "start-discussion-other-user"}, { $set: { roles: [] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "start-discussion"}, { $set: { roles: [] }},{ upsert: true });
db.rocketchat_permissions.updateOne({ _id: "view-outside-room"}, { $set: { roles: [] }},{ upsert: true });
// previously in rcroomcleaner
db.rocketchat_subscription.remove({"rid" : "GENERAL", "name" : "general"})
db.rocketchat_subscription.deleteMany({"rid" : "GENERAL", "name" : "general"})
db.rocketchat_room.find({name: "general"})
db.rocketchat_message.remove({"rid" : "GENERAL"})
db.rocketchat_room.remove({name: "general"})
db.rocketchat_message.deleteMany({"rid" : "GENERAL"})
db.rocketchat_room.deleteMany({name: "general"})
// https://github.com/RocketChat/Rocket.Chat/issues/23937 unfortunetly there is a caching bug on the client side for newly created rooms, but this triggers a refresh, instantly, on the client side
db.rocketchat_subscription.update({"ls" : { "$exists" : false}}, {"$set" : {"ls" : new ISODate("1970-01-01T00:00:00Z")}}, {"multi" : true})
db.rocketchat_subscription.updateMany({"ls" : { "$exists" : false}}, {"$set" : {"ls" : new ISODate("1970-01-01T00:00:00Z")}})
'
Loading