sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruben Reusser (JIRA)" <>
Subject [jira] [Issue Comment Deleted] (SLING-7768) Add String Interpolation support to /etc/map
Date Fri, 26 Jul 2019 12:30:00 GMT


Ruben Reusser updated SLING-7768:
    Comment: was deleted

(was: so when this was done there was a bigger discussion about making this more generic and
hence this never made it into sling itself as it's only supporting etc/map. 

A more generic solution to this problem could be achieved with sling pipes (a config structure
somewhere in the repository that is copied over to the final location with sling pipes and
while doing so it should be able to pickup and inject the environment variables))

> Add String Interpolation support to /etc/map
> --------------------------------------------
>                 Key: SLING-7768
>                 URL:
>             Project: Sling
>          Issue Type: Improvement
>          Components: ResourceResolver
>         Environment: Sling 11-SNAPSHOT, JDK 1.8
>            Reporter: Andreas Schaefer
>            Priority: Major
>         Attachments: Screenshot 2018-07-06 11.41.58.png, Screenshot 2018-07-06 11.42.41.png,
Screenshot 2018-07-06 11.43.34.png
> Having worked on migrations of a Sling derivate Ruben & I ran into issues where the
/etc/map would map to production instead of testing environment.
>  Many big customer have extensive /etc/maps and also many different environments like
dev, qa, staging, prod etc.
>  It would be great to have a tool where for example items like the host name or external
links in /etc/map could be configured outside so that just one entry has to adjusted rather
than creating a full copy of the /etc/map tree.
>  Example:
>  /etc/map/http/{{{{}}}}.8080
>  Placeholder provides:
>  DEV:
>  QA:
>  STAGING:[|]
>  PROD:[|]
>  At runtime these are the resolved values:
>  DEV: http/localhost.8080
>  QA: http/
>  STAGING: http/[|].8080
>  PROD: http/[|].8080
>  Not only does that make it easier and faster to create new test environments but it
also cuts down on the chance of copy-n-paste errors.
>  I have a working POC with an PlaceholderProvider OSGi service and an enhanced MapEntries
that resolved any placeholders if found.
>  Attached are 3 screenshots:
>  1. OSGi Placeholder Provider Configuration
>  2. /etc/map (Composum)
>  3. Result of [http://andreass.local:8080/] call

This message was sent by Atlassian JIRA

View raw message