-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Steps for setting up consumer for syncrepl #72661
Comments
Did you check the different configuration options provided via env. vars? See https://github.com/bitnami/containers/tree/main/bitnami/openldap#configuration |
Hi @carrodher , I went through all the environment variables, but I didn't find any relevant environment variable, There is one configuration
However I am not able to find slapd.conf in the container image. Is there any environment variable through which we can add custom LDAP configurations in slapd.conf? |
I encountered the same issue. As far as I understand, slapd.conf is a deprecated configuration file, and it seems that the configuration should be done through an LDIF file. However, I am not sure how to set it up in this image either. |
I have configured mirrormode using the ldif+ldapadd command. First, I prepared an LDIF file:
According to the rules, I modified the rid, olcServerID, and provider to generate a second LDIF file. |
Hi @cfxccn , Thanks a lot for the reply!, I'll try out these configurations :) |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
@rohan-97 Does this method work? please. |
Hi @SidneySun , I tried above configurations, they didn't worked. Major issue is that the documents shows configuration corresponding to slapd.conf, Hence I created two debian system and installed openldap in both of them. Following is the configuration on both the debian system, producer debian slapd.conf
consumer debian slapd.conf
The replication worked. After that I wanted to generate ldif configuration files from above machines
then I found following ldif configuration file generated inside /tmp/slapd.d directory
so I switched back to Bitnami OpenLDAP containers,
and enabled following environment variable flags on producer bitnami LDAP pod
On Consumer LDAP pod syncreplication got configured,
However I don't see replication happening from producer bitnami container to consumer bitnami container. I enabled debug loglevel on both the pods using following flag It seems like consumer is getting configured properly but producer container is not getting configured properly even after setting Am I doing anything wrong while setting up producer ldap container? Following are the environment variables in producer ldap container
|
Attaching debug logs from producer and consumer containers. It looks like the environment flag |
I am having the same issues. I have tried various options as per online documentation and detailed in this issue but still it is not working for me. Has anyone got a working setup? If so, how was this achieved? |
Hi All After lot of debugging I was able to fix the replication I was facing following 2 errors while setting up replication
Now as I was able to perform proper producer-consumer replication I would like to document the steps which I performed so that any novice user like me who will be using bitnami openldap in future would be able to set up SyncReplication successfully I would like to contribute to the documentation with detailed steps for setting up LDAP Synchronization |
@rohan-97 that is great news. |
OpenLDAP Sync ReplicationHere we are implementing Producer-Consumer Sync replication of Bitnami based OpenLDAP servers Details of bitnami openldap container repository can be found here We are setting up two debian linux machines which has docker installed and will set up sync-replication between them Setup Producer NodeInstall docker on the systemFollowing page can be refered to set up docker on debian Prepare bitnami openldap container image with some databasecreate following file as database.ldif
Create another docker image to load above database schema
Then execute following command to build conatainer image
Spin up LDAP containerBelow command spins up LDAP container using our cutom image and maps port 1389 to host machine so that LDAP can be accessed from current node and outside environment as well
and use docker ps command to verify whether LDAP container is running properly or not
Producer LDAP verificationYou can verify whether Producer LDAP is up and running
And following should be the output
Setup Consumer NodeInstall docker on the systemFollowing page can be refered to set up docker on debian Setup Syncrepl ldif configuration
Prepare container image to include syncrepl ldif file
Execute following command to build docker image
Create container out of cutom container imageExecute following command to generate container image which loads our custom syncprov.ldif configuration and also maps port 1386 with host system so that ldap server is accessible from host machine and outside machines as well
Consumer LDAP verificationYou can verify whether Consumer LDAP is synchronized with producer using following below command
You should get following output
Verifying LDAP replicationTrying to perform write opearation on Consumer LDAP
You should get following output
This denotes that consumer LDAP is read only and we cannot perform write operation on consumer LDAP Trying to perform write opearation on Producer LDAP
You should get following output
This denotes that we can perform write operations on producer LDAP After changes done in producer LDAP, the changes should be reflected on consumer LDAP as well after some time. Following is the output on executing ldapsearch on consumer server
I referred following blog for setting up producer-consumer ldap synchronization |
@SidneySun @carrodher I think we should treat this issue as a documentation bug and keep it open until above steps are properly documented Do let me know if any PR needs to be raised to document above steps |
Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here. Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance. |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
I think it has very problematic side: Each time you rotate credentials for consumer you have to rebuild image, it is not optimal. Is there any intention for bitnami team to give an option to mount slapd.d directory inside the container so bitnami container will start with pre-built configuration, as right now, i understand container creates configuration on the fly each time it starts. Correct ? |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
已收到您的邮件。(自动回复)
|
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
已收到您的邮件。(自动回复)
|
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
已收到您的邮件。(自动回复)
|
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
已收到您的邮件。(自动回复)
|
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
已收到您的邮件。(自动回复)
|
Name and Version
bitnami/openldap2.6
What architecture are you using?
amd64
What steps will reproduce the bug?
This is more of a question rather than a bug/issue, I don't know whether this is a right section to ask this.
but here it goes...
I am trying to set up Openldap sync replication between two bitnami openldap containers.
I tried to set up ldap provider server using environment variables specified in following section
https://github.com/bitnami/containers/tree/main/bitnami/openldap#sync-provider
However I didn't find any provision to set up LDAP consumer,
As there was no provision to set up ldap consumer, I went through Official OpenLDAP docs to configure ldap consumer server manually
following is the link of docs
https://openldap.org/doc/admin26/replication.html
The docs has mentioned to specify following configuration in ldap server to make it LDAP client
However, I don't see any slapd.conf in the container image
following is the command I have used to find slapd.conf
What do you see instead?
Actually I didn't find any steps/document to setup OpenLDAP replication and also not able to find slapd.conf
I see most of the configurations are added using .ldif files but I am not able to find how to set up consumer ldap server using .ldif files in official OpenLDAP documents.
The text was updated successfully, but these errors were encountered: