sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Schaefer <>
Subject Re: /etc/map with Placeholders for farms / dev stack
Date Mon, 30 Jul 2018 21:17:28 GMT
Hi George

> On Jul 26, 2018, at 2:21 PM, Georg Henzler <> wrote:
> Hi Andreas,
> I'm not sure if this is going in the right direction - this is currently
> implemented at at a local module level (sling-org-apache-sling-resourceresolver)
> when it is really something that the platform should support (see below).

Ruben and I were discussing to add placeholders also to OSGi Configurations to be able to
change host names for both the etc-mapping but also for Distribution / Replication.
That would requires to add the string interpolation to Felix in order to make it work as just
trying to handle the OSG configuration from JCR leads to many issues.
But for now we would love to see this in Sling as soon as possible as testing of bigger companies
is difficult and time consuming.
If we have a solution in Jackrabbit I am more than happy to remove my code from the resource

> Also note that your example/reasoning in the description of SLING-7768
> only lists DEV/QA/STAGING/PROD - if you are limited to those environments you
> can easily do with runmodes. Placeholder replacement becomes interesting when
> you think about an "elastic number of environments" that are not known at
> development time (think about spinning up "STAGING-7" for that special performance
> test that needs to run in isolation)

This was the basic test case but our case this involves to have a different host name because
of a temporary migration server.
It would also work for URL paths as well.

>> ... Ruben and I think it could be helpful to make the Placeholder Provider
>> more generic to that it could be used in other services like the
>> distribution/replication, externalizers etc to have an easier way to
>> manage server configuration in a central place.
> I agree we should have the capability in the platform, but IMHO it should not
> be in sling-org-apache-sling-resourceresolver. There was a discussion in
> jackrabbit-dev:
> and
> for the initial issue.
> Btw.: you can achieve your requirement already today (down to AEM 6.0) with
> (but I'd rather see this as first-class citizen as part of the platform
> and not as a third-party module)

Install Hooks have their own issues like that they do not work for replication and they requires
to changes whatever the customer has / provides in order to add the place holders.

>>> * No need to support anything else like files and system properties to
>>> provide the placeholders. Makes error handling much more complicated (what
>>> do you do if the http download of that placeholder file fails?), and I
>>> would rather leave it to the ops team to implement that process and handle
>>> any errors.
>> I see the issue with the external files / web resources. The system
>> properties are there to make sure an admin can override any settings
>> if things do not work out.
> I agree here with Jörg that allowing external URLs is dangerous here (and
> it could even be seen critical from a security perspective). Also, the config allows
> to give both key value pairs directly and a URL to retrieve them from - I suppose
> these two property sets are merged?

I do agree with that and I will remove that from my POC.

> But to sum up I think the best would be to have a mechanism for placeholder replacement
> on a lower level...
> -Georg

View raw message