Description
I'd like to change the image (by PR) to allow configuration of either Multi-Master or Master-Slave configuration of replication. Is this a feature you would like to incorporate? If so, this is my proposed way of doing it:
LDAP_REPLICATION
can have the following values:
true
for backwards compatibility means Multi-Master and will issue a warning for deprecation.N_MASTER
is the preferred value for defining Multi-Master and will not change the current behaviorSINGLE_MASTER
defines the image to be the master of a Master-Slave setupSLAVE
defines the image to be one of probably many slaves of a Master-Slave setupfalse
disables replication (no changes).
-
In case of
LDAP_REPLICATION=SLAVE
, we can useLDAP_REPLICATION_HOSTS
to define the host of the single master instance, or we can use a new variableLDAP_REPLICATION_MASTER
.
LDAP_REPLICATION_HOSTS_CONFIG_SYNC_REPL
andLDAP_REPLICATION_HOSTS_DB_SYNC_REPL
will be used for replication config. -
In case of
LDAP_REPLICATION=SINGLE_MASTER
there is probably nothing more to define. We just make sure thatsyncprov
is enabled to allow sync requests from any slaves.
Happy to hear your thoughts.