From dev-return-98530-archive-asf-public=cust-asf.ponee.io@sling.apache.org Fri Jul 26 12:30:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id D009C180676 for ; Fri, 26 Jul 2019 14:30:01 +0200 (CEST) Received: (qmail 74051 invoked by uid 500); 26 Jul 2019 12:30:01 -0000 Mailing-List: contact dev-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list dev@sling.apache.org Received: (qmail 74027 invoked by uid 99); 26 Jul 2019 12:30:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jul 2019 12:30:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8C8A1E2F5A for ; Fri, 26 Jul 2019 12:30:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3F35C265FE for ; Fri, 26 Jul 2019 12:30:00 +0000 (UTC) Date: Fri, 26 Jul 2019 12:30:00 +0000 (UTC) From: "Ruben Reusser (JIRA)" To: dev@sling.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Issue Comment Deleted] (SLING-7768) Add String Interpolation support to /etc/map MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SLING-7768?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] 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 s= upporting etc/map.=C2=A0 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=C2=A0be able t= o pickup and inject the environment variables)) > Add String Interpolation support to /etc/map > -------------------------------------------- > > Key: SLING-7768 > URL: https://issues.apache.org/jira/browse/SLING-7768 > 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 envir= onments like dev, qa, staging, prod etc. > It would be great to have a tool where for example items like the host n= ame 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. > =C2=A0 > Example: > =C2=A0 > /etc/map/http/{{{{phv.fq.host.name}}}}.8080 > =C2=A0 > Placeholder provides: > DEV: phv.fq.host.name=3Dlocalhost > QA: phv.fq.host.name=3Dqa.author.acme.com > STAGING: phv.fq.host.name=3D[staging.author.acme.com|http://staging.auth= or.acme.com/] > PROD: phv.fq.host.name=3D[acme.com|http://acme.com/] > =C2=A0 > At runtime these are the resolved values: > DEV: http/localhost.8080 > QA: http/qa.author.acme.com.8080 > STAGING: http/[staging.author.acme.com|http://staging.author.acme.com/].= 8080 > PROD: http/[acme.com|http://acme.com/].8080 > =C2=A0 > Not only does that make it easier and faster to create new test environm= ents but it also cuts down on the chance of copy-n-paste errors. > =C2=A0 > I have a working POC with an PlaceholderProvider OSGi service and an enh= anced MapEntries that resolved any placeholders if found. > =C2=A0 > Attached are 3 screenshots: > 1. OSGi Placeholder Provider Configuration > 2. /etc/map (Composum) > 3. Result of [http://andreass.local:8080/]=C2=A0call -- This message was sent by Atlassian JIRA (v7.6.14#76016)