HA mongodb CE statefulset to percona mongodb with operator

Description:

Hi, I’ve been tasked to come up with a plan to migrate several mongodb CE replicasets (4.4) to new ones managed by the Percona Mongodb Operator in a HA manner.

The old stack does not have anything of authorization or authentication enabled as far as i can tell. I already spun up a test setup with the Percona Operator and noticed that the authorization is keyfile based and that there are basic users and roles present.

What i already tried:
I’ve enabled --transitionToAuth on the old replicaset and added the same keyfile + users and roles to the old cluster. I tried to add the new operator managed containers as members of the old replicaset but they do not seem to be reachable, even though they’re in the same namespace and I’m 100% I’m using the right fqdns + port for them.

Version:

Mongodb 4.4 (old replicaset)
percona/percona-server-mongodb:4.4.24-23 (new replicaset)
psmdb-operator 1.14.2

Expected Result:

A way to get the new replicaset in sync with the old one and do a brief service interruption (RO mode) and switch the service to the new replicaset. Another approach would be making the new replicaset members of the old one and switch in a HA manner.

I’ve been going through most of the documentation and i can’t seem to find a migration path that fits what is asked of me. Any help, guidance or critique is super welcome!

Hey @V4x0u ,

cross-site replication and external replica-set nodes allow to do exactly what you need.

You can read more here as well:

Hope this helps. Please feel free to reach out if something is still not working.