Hi all,
last year I started the OFBiz integration in the Apache sonar instance. But I've been stopped by a request from infra, as I need to give the ports dynamically. And don't know how to make it happen... https://issues.apache.org/jira/browse/INFRA-3590 If anyone has a pointer, this would be really appreciated. TIA, -- Erwan de FERRIERES www.nereide.biz |
Hi Erwan,
if I understood the ticket you mentioned correctly, there is no need to assign a "random generated" with own logic. They would like to use a variable (eg. test.port) to assign this random port to the test-environment. Problem seems to be, that we need to assign this port to the container (most probably via ANT). In the project I am working on we are using a common configuration file for all necessary configurations, and I would like to suggest a similar solution for the whole project, so that it is easy to configure the application from one configuration file (like using maven profiles). This would then allow the INFRA team to assign a port-number via a configuration variable. A valid solution would be: 1) read environment variables 2) read variables from a set "profile"-properties file 3) read default variables 4) set variables in the configuration-XML-files of ofbiz Due to the fact, that ANT just sets not already set variables, this would work quite easily and straight forward. I know that something like was already suggested quite some time ago. It could be put onto the roadmap for the next release. WDYT? R, Markus Erwan de FERRIERES wrote > > Hi all, > > last year I started the OFBiz integration in the Apache sonar instance. > But I've been stopped by a request from infra, as I need to give the > ports dynamically. And don't know how to make it happen... > > https://issues.apache.org/jira/browse/INFRA-3590 > > If anyone has a pointer, this would be really appreciated. > > TIA, > > -- > Erwan de FERRIERES > www.nereide.biz |
Administrator
|
In reply to this post by Erwan de FERRIERES-3
Hi Erwan,
Geronimo does this. They pass a value through their scripts. It should not be too hard to copy/adapt. Of course it should be used not only for the test-container files but with all containers files. Then it will be easy and clean to change the ports for an instance. The idea is to pass a shift value to all ports, rather than a value for each ports. For instance 1 means 18080, 18443, 11099, etc.; 2 means 28080, 28443, 21099 Then with a calling scritps you just need to randomize a number between 1 and 5 (AFAIK you can't get higher than 58443) but I guess it's enough. This would be a good enhancement to the way we change ports (manually for now). HTH Jacques From: "Erwan de FERRIERES" <[hidden email]> > Hi all, > > last year I started the OFBiz integration in the Apache sonar instance. > But I've been stopped by a request from infra, as I need to give the ports dynamically. And don't know how to make it happen... > > https://issues.apache.org/jira/browse/INFRA-3590 > > If anyone has a pointer, this would be really appreciated. > > TIA, > > -- > Erwan de FERRIERES > www.nereide.biz |
Le 26/03/2012 20:03, Jacques Le Roux a écrit :
> Hi Erwan, > > Geronimo does this. They pass a value through their scripts. It should > not be too hard to copy/adapt. Of course it should be used not only for > the test-container files but with all containers files. Then it will be > easy and clean to change the ports for an instance. > The idea is to pass a shift value to all ports, rather than a value for > each ports. For instance 1 means 18080, 18443, 11099, etc.; 2 means > 28080, 28443, 21099 > > Then with a calling scritps you just need to randomize a number between > 1 and 5 (AFAIK you can't get higher than 58443) but I guess it's enough. > > This would be a good enhancement to the way we change ports (manually > for now). > > HTH > > Jacques have you some links to this ? Thanks, -- Erwan de FERRIERES www.nereide.biz |
In reply to this post by mmay
Le 25/03/2012 21:38, Markus M. May a écrit :
> Hi Erwan, > > if I understood the ticket you mentioned correctly, there is no need to > assign a "random generated" with own logic. > > They would like to use a variable (eg. test.port) to assign this random > port to the test-environment. Problem seems to be, > that we need to assign this port to the container (most probably via > ANT). In the project I am working on we are using a > common configuration file for all necessary configurations, and I would > like to suggest a similar solution for the whole project, > so that it is easy to configure the application from one configuration > file (like using maven profiles). This would then > allow the INFRA team to assign a port-number via a configuration variable. > > A valid solution would be: > > 1) read environment variables > 2) read variables from a set "profile"-properties file > 3) read default variables > 4) set variables in the configuration-XML-files of ofbiz > > Due to the fact, that ANT just sets not already set variables, this > would work quite easily and straight forward. I know that > something like was already suggested quite some time ago. > > It could be put onto the roadmap for the next release. WDYT? > > R, > > Markus > Hi Markus, your solution seems nice. Jacques said that geronimo was using something we could reuse to make it right. Have you anything from your side already working ? Cheers, -- Erwan de FERRIERES www.nereide.biz |
Administrator
|
In reply to this post by Erwan de FERRIERES
Keeping it short
https://cwiki.apache.org/GMOxKB/how-to-change-port-numbers-for-geronimo-services.html http://geronimo.apache.org/downloads.html It's only a way, but I think it's a good one Jacques From: "Erwan de FERRIERES" <[hidden email]> > Le 26/03/2012 20:03, Jacques Le Roux a écrit : >> Hi Erwan, >> >> Geronimo does this. They pass a value through their scripts. It should >> not be too hard to copy/adapt. Of course it should be used not only for >> the test-container files but with all containers files. Then it will be >> easy and clean to change the ports for an instance. >> The idea is to pass a shift value to all ports, rather than a value for >> each ports. For instance 1 means 18080, 18443, 11099, etc.; 2 means >> 28080, 28443, 21099 >> >> Then with a calling scritps you just need to randomize a number between >> 1 and 5 (AFAIK you can't get higher than 58443) but I guess it's enough. >> >> This would be a good enhancement to the way we change ports (manually >> for now). >> >> HTH >> >> Jacques > Hi Jacques, > > have you some links to this ? > Thanks, > > > -- > Erwan de FERRIERES > www.nereide.biz |
In reply to this post by Erwan de FERRIERES-3
Hi Jacques,
I looked into the solution of Geronimo, and it looks great. Probably we could use this mechanism not only for the ports, but also for some other configuration parameters, like e.g. the database host and driver. WDYT? We do have a working solution, but this is by far not as nice as the proposed solution ;-( R, Markus > Hi Erwan, > > Geronimo does this. They pass a value through their scripts. It > should not be too hard to copy/adapt. Of course it should be used not > only for the test-container files but with all containers files. Then > it will be easy and clean to change > the ports for an instance. > The idea is to pass a shift value to all ports, rather than a value > for each ports. For instance 1 means 18080, 18443, 11099, etc.; > 2 means 28080, 28443, 21099 > > Then with a calling scritps you just need to randomize a number > between 1 and 5 (AFAIK you can't get higher than 58443) but I guess > it's enough. > > This would be a good enhancement to the way we change ports (manually > for now). > > HTH > > Jacques > >> From: "Erwan de FERRIERES" <[hidden email]> >> Hi all, >> >> last year I started the OFBiz integration in the Apache sonar >> instance. >> But I've been stopped by a request from infra, as I need to give the >> ports dynamically. And don't know how to make it happen... >> >> https://issues.apache.org/jira/browse/INFRA-3590 >> >> If anyone has a pointer, this would be really appreciated. >> >> TIA, >> >> -- >> Erwan de FERRIERES >> www.nereide.biz |
Administrator
|
I totally agree and it's now 4 years I want to do that, but always thought it will be for next day
The best way would be to open a Jira, distribute work with, at least, Erwan, then create patches. I don't think we need a branch for that, but that maybe discussed We could discuss here a bit before if other persons are interested... Jacques From: "Markus M. May" <[hidden email]> > Hi Jacques, > > I looked into the solution of Geronimo, and it looks great. Probably we could use this mechanism not only for the ports, but also > for some other configuration parameters, like e.g. the database host and driver. WDYT? > > We do have a working solution, but this is by far not as nice as the proposed solution ;-( > > R, > > Markus > >> Hi Erwan, >> >> Geronimo does this. They pass a value through their scripts. It should not be too hard to copy/adapt. Of course it should be used >> not only for the test-container files but with all containers files. Then it will be easy and clean to change > the ports for an >> instance. >> The idea is to pass a shift value to all ports, rather than a value for each ports. For instance 1 means 18080, 18443, 11099, >> etc.; >> 2 means 28080, 28443, 21099 >> >> Then with a calling scritps you just need to randomize a number between 1 and 5 (AFAIK you can't get higher than 58443) but I >> guess it's enough. >> >> This would be a good enhancement to the way we change ports (manually for now). >> >> HTH >> >> Jacques >> >>> From: "Erwan de FERRIERES" <[hidden email]> >>> Hi all, >>> >>> last year I started the OFBiz integration in the Apache sonar instance. >>> But I've been stopped by a request from infra, as I need to give the ports dynamically. And don't know how to make it happen... >>> >>> https://issues.apache.org/jira/browse/INFRA-3590 >>> >>> If anyone has a pointer, this would be really appreciated. >>> >>> TIA, >>> >>> -- >>> Erwan de FERRIERES >>> www.nereide.biz > |
Thanks for the interesting thread.
It would be nice to share some ideas here about the end result and then evaluate feasibility and proceed with implementation. Here is my wish list: * all the most common configuration parameters should be set into *one* central file (xml or properties, I don't care), ideally located somewhere under the runtime folder (e.g. runtime/config) * an ant task (executed when the system is built) propagates the parameters to the relevant configuration files under framework * it should still be possible to edit the files directly (as we do now) without using the central file: this could be useful for complex setup (multiple service pools etc...) Jacopo On Mar 27, 2012, at 9:10 AM, Jacques Le Roux wrote: > I totally agree and it's now 4 years I want to do that, but always thought it will be for next day > > The best way would be to open a Jira, distribute work with, at least, Erwan, then create patches. I don't think we need a branch for that, but that maybe discussed > > We could discuss here a bit before if other persons are interested... > > Jacques > > From: "Markus M. May" <[hidden email]> >> Hi Jacques, >> >> I looked into the solution of Geronimo, and it looks great. Probably we could use this mechanism not only for the ports, but also for some other configuration parameters, like e.g. the database host and driver. WDYT? >> >> We do have a working solution, but this is by far not as nice as the proposed solution ;-( >> >> R, >> >> Markus >> >>> Hi Erwan, >>> >>> Geronimo does this. They pass a value through their scripts. It should not be too hard to copy/adapt. Of course it should be used not only for the test-container files but with all containers files. Then it will be easy and clean to change > the ports for an instance. >>> The idea is to pass a shift value to all ports, rather than a value for each ports. For instance 1 means 18080, 18443, 11099, etc.; >>> 2 means 28080, 28443, 21099 >>> >>> Then with a calling scritps you just need to randomize a number between 1 and 5 (AFAIK you can't get higher than 58443) but I guess it's enough. >>> >>> This would be a good enhancement to the way we change ports (manually for now). >>> >>> HTH >>> >>> Jacques >>> >>>> From: "Erwan de FERRIERES" <[hidden email]> >>>> Hi all, >>>> >>>> last year I started the OFBiz integration in the Apache sonar instance. >>>> But I've been stopped by a request from infra, as I need to give the ports dynamically. And don't know how to make it happen... >>>> >>>> https://issues.apache.org/jira/browse/INFRA-3590 >>>> >>>> If anyone has a pointer, this would be really appreciated. >>>> >>>> TIA, >>>> >>>> -- >>>> Erwan de FERRIERES >>>> www.nereide.biz |
Hi Jacopo,
On Tue, 27 Mar 2012 09:36:13 +0200, Jacopo Cappellato wrote: > Thanks for the interesting thread. > It would be nice to share some ideas here about the end result and > then evaluate feasibility and proceed with implementation. > > Here is my wish list: > * all the most common configuration parameters should be set into > *one* central file (xml or properties, I don't care), ideally located > somewhere under the runtime folder (e.g. runtime/config) Good idea ;-) > * an ant task (executed when the system is built) propagates the > parameters to the relevant configuration files under framework We could also use a "copy" task to copy all the relevant files from another structure (like mvn is doing), e.g. /config or /src/config or something like this. This could then be even done in application specific folders. > * it should still be possible to edit the files directly (as we do > now) without using the central file: this could be useful for complex > setup (multiple service pools etc...) You could then just edit the "templates", if needed. > > Jacopo R, Markus > > > On Mar 27, 2012, at 9:10 AM, Jacques Le Roux wrote: > >> I totally agree and it's now 4 years I want to do that, but always >> thought it will be for next day >> >> The best way would be to open a Jira, distribute work with, at >> least, Erwan, then create patches. I don't think we need a branch for >> that, but that maybe discussed >> >> We could discuss here a bit before if other persons are >> interested... >> >> Jacques >> >> From: "Markus M. May" <[hidden email]> >>> Hi Jacques, >>> >>> I looked into the solution of Geronimo, and it looks great. >>> Probably we could use this mechanism not only for the ports, but also >>> for some other configuration parameters, like e.g. the database host >>> and driver. WDYT? >>> >>> We do have a working solution, but this is by far not as nice as >>> the proposed solution ;-( >>> >>> R, >>> >>> Markus >>> >>>> Hi Erwan, >>>> >>>> Geronimo does this. They pass a value through their scripts. It >>>> should not be too hard to copy/adapt. Of course it should be used >>>> not only for the test-container files but with all containers files. >>>> Then it will be easy and clean to change > the ports for an >>>> instance. >>>> The idea is to pass a shift value to all ports, rather than a >>>> value for each ports. For instance 1 means 18080, 18443, 11099, >>>> etc.; >>>> 2 means 28080, 28443, 21099 >>>> >>>> Then with a calling scritps you just need to randomize a number >>>> between 1 and 5 (AFAIK you can't get higher than 58443) but I guess >>>> it's enough. >>>> >>>> This would be a good enhancement to the way we change ports >>>> (manually for now). >>>> >>>> HTH >>>> >>>> Jacques >>>> >>>>> From: "Erwan de FERRIERES" <[hidden email]> >>>>> Hi all, >>>>> >>>>> last year I started the OFBiz integration in the Apache sonar >>>>> instance. >>>>> But I've been stopped by a request from infra, as I need to give >>>>> the ports dynamically. And don't know how to make it happen... >>>>> >>>>> https://issues.apache.org/jira/browse/INFRA-3590 >>>>> >>>>> If anyone has a pointer, this would be really appreciated. >>>>> >>>>> TIA, >>>>> >>>>> -- >>>>> Erwan de FERRIERES >>>>> www.nereide.biz |
Administrator
|
From: "Markus M. May" <[hidden email]>
> Hi Jacopo, > > On Tue, 27 Mar 2012 09:36:13 +0200, Jacopo Cappellato wrote: >> Thanks for the interesting thread. >> It would be nice to share some ideas here about the end result and >> then evaluate feasibility and proceed with implementation. >> >> Here is my wish list: >> * all the most common configuration parameters should be set into >> *one* central file (xml or properties, I don't care), ideally located >> somewhere under the runtime folder (e.g. runtime/config) > Good idea ;-) >> * an ant task (executed when the system is built) propagates the >> parameters to the relevant configuration files under framework > We could also use a "copy" task to copy all the relevant files from > another structure (like mvn is doing), > e.g. /config or /src/config or something like this. This could then be > even done in application specific > folders. >> * it should still be possible to edit the files directly (as we do >> now) without using the central file: this could be useful for complex >> setup (multiple service pools etc...) > You could then just edit the "templates", if needed. Yes this should not be a problem, just replace ${string} (or such) Jacques >> Jacopo > > R, > > Markus >> >> >> On Mar 27, 2012, at 9:10 AM, Jacques Le Roux wrote: >> >>> I totally agree and it's now 4 years I want to do that, but always >>> thought it will be for next day >>> >>> The best way would be to open a Jira, distribute work with, at >>> least, Erwan, then create patches. I don't think we need a branch for >>> that, but that maybe discussed >>> >>> We could discuss here a bit before if other persons are >>> interested... >>> >>> Jacques >>> >>> From: "Markus M. May" <[hidden email]> >>>> Hi Jacques, >>>> >>>> I looked into the solution of Geronimo, and it looks great. >>>> Probably we could use this mechanism not only for the ports, but also >>>> for some other configuration parameters, like e.g. the database host >>>> and driver. WDYT? >>>> >>>> We do have a working solution, but this is by far not as nice as >>>> the proposed solution ;-( >>>> >>>> R, >>>> >>>> Markus >>>> >>>>> Hi Erwan, >>>>> >>>>> Geronimo does this. They pass a value through their scripts. It >>>>> should not be too hard to copy/adapt. Of course it should be used >>>>> not only for the test-container files but with all containers files. >>>>> Then it will be easy and clean to change > the ports for an >>>>> instance. >>>>> The idea is to pass a shift value to all ports, rather than a >>>>> value for each ports. For instance 1 means 18080, 18443, 11099, >>>>> etc.; >>>>> 2 means 28080, 28443, 21099 >>>>> >>>>> Then with a calling scritps you just need to randomize a number >>>>> between 1 and 5 (AFAIK you can't get higher than 58443) but I guess >>>>> it's enough. >>>>> >>>>> This would be a good enhancement to the way we change ports >>>>> (manually for now). >>>>> >>>>> HTH >>>>> >>>>> Jacques >>>>> >>>>>> From: "Erwan de FERRIERES" <[hidden email]> >>>>>> Hi all, >>>>>> >>>>>> last year I started the OFBiz integration in the Apache sonar >>>>>> instance. >>>>>> But I've been stopped by a request from infra, as I need to give >>>>>> the ports dynamically. And don't know how to make it happen... >>>>>> >>>>>> https://issues.apache.org/jira/browse/INFRA-3590 >>>>>> >>>>>> If anyone has a pointer, this would be really appreciated. >>>>>> >>>>>> TIA, >>>>>> >>>>>> -- >>>>>> Erwan de FERRIERES >>>>>> www.nereide.biz > |
In reply to this post by Jacques Le Roux
Le 27/03/2012 09:10, Jacques Le Roux a écrit :
> I totally agree and it's now 4 years I want to do that, but always > thought it will be for next day > > The best way would be to open a Jira, distribute work with, at least, > Erwan, then create patches. I don't think we need a branch for that, but > that maybe discussed done for the jira issue: https://issues.apache.org/jira/browse/OFBIZ-4763 -- Erwan de FERRIERES www.nereide.biz |
Free forum by Nabble | Edit this page |