ome/apacheds-docker

Custom dc not working

Closed this issue · 6 comments

I'm trying to get familiar w/ ApacheDS and I thought it would be simple to take the existing openmicroscopy and simply change the name. However, simply changing the name in config.ldif, and ome.ldif and I don't have a top level object anymore.

Building w/o any changes, and the top level object appears. Effectively doing s/openmicroscopy/controller/ in the config.ldif, and all I see is the schema, config, and system in the RootDSE - no dc=controller,dc=org.

What am I missing?

Hi @jbtalley98. I would have expected the same thing! However, testing locally, I've failed to perl -i -pe 's/openmicroscopy/foo/g' ... myself.

The sections under https://directory.apache.org/apacheds/basic-ug/1.4.3-adding-partition.html on "context entry" seem to have the clue.

You need to convert the base64-encoded entry with your new value, e.g.:

echo "ZG46IGRjPW9wZW5taWNyb3Njb3B5LGRjPW9yZw0KZGM6IG9wZW5taWNyb3Njb3B5DQpvYmplY3RjbGFzczogZG9tYWluDQpvYmplY3RjbGFzczogdG9w" | base64 -D | perl -pe 's/openmicroscopy/controller/g' | base64

Sorry. I had forgotten needing to do this (and I still don't really understand why this complexity is needed!)

The best long-term fix is likely to set up the Docker build such that it generates this value.

Indeed that did fix it. I should have RTFM a little closer. TY.

No worries at all. I'll leave this issue open if you don't mind to capture the automation of the change, because I will also forget again and need to RTFM.

I looked at how one might do that in an automated fashion. My docker skills are going to be much improved after this exercise.

If you have any changes you'd like us to look at, by all means.