Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86CA3107AB for ; Thu, 9 Jan 2014 15:50:22 +0000 (UTC) Received: (qmail 27242 invoked by uid 500); 9 Jan 2014 15:49:01 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 27171 invoked by uid 500); 9 Jan 2014 15:48:51 -0000 Mailing-List: contact dev-help@stratos.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.incubator.apache.org Delivered-To: mailing list dev@stratos.incubator.apache.org Received: (qmail 26808 invoked by uid 99); 9 Jan 2014 15:48:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jan 2014 15:48:03 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nirmal070125@gmail.com designates 74.125.82.179 as permitted sender) Received: from [74.125.82.179] (HELO mail-we0-f179.google.com) (74.125.82.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jan 2014 15:47:59 +0000 Received: by mail-we0-f179.google.com with SMTP id q59so2982532wes.10 for ; Thu, 09 Jan 2014 07:47:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=S8emAHs/EY+diSMDrlGzt0+HZTbylCw4Tngq+KIA244=; b=Yh0kpbSoG8xk/1cRKTL5vEDA6MZR0cmrMeMsaDb+yG5N/YxLcCkKIJDh9cMtlnAnp2 eJ9HrZUHyHBEya0v4qgMX/twZTo5di/fCGkIztURvPBan384iY1K7KB7MoU1qZlqxWwn 9w/zp00MFa3PCOasxD/efBB25qzwMn1WsI31yZEFJv404/U31fVh2O9E01Wcxnm/Lk/J aT4fLSBbYlcFurocZ1Cfv+3BVURYmp3T9SkEzPq7L+3pShSmITn6FVhdr/Iej7NrjeX6 JHljxzx1kX3vVAK5ddIbXsbI1a+8Jj40iCeqhkEmFfDsPCY+4VWZbH8RRgbKOqLBSDTm je6w== MIME-Version: 1.0 X-Received: by 10.180.91.135 with SMTP id ce7mr4012073wib.14.1389282457916; Thu, 09 Jan 2014 07:47:37 -0800 (PST) Received: by 10.194.76.197 with HTTP; Thu, 9 Jan 2014 07:47:37 -0800 (PST) In-Reply-To: References: Date: Thu, 9 Jan 2014 21:17:37 +0530 Message-ID: Subject: Re: Updating stratos.sh in products From: Nirmal Fernando To: "dev@stratos.incubator.apache.org" Content-Type: multipart/alternative; boundary=f46d043749f3659a9e04ef8b87c1 X-Virus-Checked: Checked by ClamAV on apache.org --f46d043749f3659a9e04ef8b87c1 Content-Type: text/plain; charset=ISO-8859-1 Hi Chris, Where do you intend to do this? AFAIU at the time of servers start-up right? Can we generate these scripts once the products get build? So, that the maven built product would contain the required script to start the respective server? wdyt? On Thu, Jan 9, 2014 at 7:59 PM, chris snow wrote: > Nirmal, is this what you were thinking as well, or are you suggesting > something else? > On 9 Jan 2014 14:19, "chris snow" wrote: > >> Hi Nirmal, >> >> I was thinking that the script would be manually created, but the certain >> parts of the configuration would be extracted, so instead of this: >> >> while [ "$status" = "$START_EXIT_STATUS" ] >> do >> $JAVACMD \ >> -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \ >> -Xms256m -Xmx1024m -XX:MaxPermSize=256m \ >> -XX:+HeapDumpOnOutOfMemoryError \ >> ... >> done >> >> you would have something like this: >> >> while [ "$status" = "$START_EXIT_STATUS" ] >> do >> $JAVACMD \ >> -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \ >> $JAVA_MEM_SETTINGS \ >> -XX:+HeapDumpOnOutOfMemoryError \ >> ... >> done >> >> there would then be a custom properties file that would be read by the >> startup script, for example >> >> JAVA_MEM_SETTINGS= -Xms256m -Xmx1024m -XX:MaxPermSize=256m >> >> You would then have different property files for different products, e.g. >> >> stratos-load-balancer-startup.properties (e.g. for the load balancer >> product when installed standalone) >> >> JAVA_MEM_SETTINGS= -Xms256m -Xmx1024m -XX:MaxPermSize=256m >> >> stratos-manager-startup.properties (e.g. for the manager product when >> installed standalone) >> >> JAVA_MEM_SETTINGS= -Xms256m -Xmx2048m -XX:MaxPermSize=256m >> >> all-in-one-startup.properties (e.g. when all stratos products are >> installed in one server) >> >> JAVA_MEM_SETTINGS= -Xms1024m -Xmx4094m -XX:MaxPermSize=1024m >> >> I don't know if this approach would work, it depends on what startup >> configuration varies for each of the products. >> >> Does this help explain? >> >> Many thanks, >> >> Chris >> >> >> >> >> >> On Thu, Jan 9, 2014 at 12:52 PM, Nirmal Fernando wrote: >> >>> Hi Chris/All, >>> >>> What do you think about the point I made? >>> >>> >>> On Thu, Jan 9, 2014 at 6:05 PM, chris snow wrote: >>> >>>> Hi Isuru, that sounds good. I'm trying to think of a similar approach >>>> in the unix world that we could borrow ideas from. Postfix springs to >>>> mind, where I think there are multiple small services that can be started >>>> individually, or all together? >>>> >>>> >>>> On Thu, Jan 9, 2014 at 11:30 AM, Isuru Haththotuwa wrote: >>>> >>>>> Good thinking Chris. In my opinion it would be nice to have the >>>>> capability to start the whole system at one go, using a single >>>>> command/script, and also to be able to start/stop individual servers. Maybe >>>>> we can use a generic startup script in which we could specify one/more than >>>>> one/all server(s) that should start. WDYT? >>>>> >>>>> >>>>> On Thu, Jan 9, 2014 at 4:42 PM, Isuru Perera wrote: >>>>> >>>>>> Hi Chris, >>>>>> >>>>>> >>>>>> On Thu, Jan 9, 2014 at 4:12 PM, chris snow wrote: >>>>>> >>>>>>> Would there be any benefit in having a generic startup script by >>>>>>> extracting the differences into a product specific properties file that get >>>>>>> imported by the generic script? >>>>>>> >>>>>> Yes! There are benefits using a generic start-up script as you >>>>>> mentioned. >>>>>> >>>>>>> I'm not sure if this would be possible, but this approach would be >>>>>>> helpful for newbie administrators to easily identify produce specific >>>>>>> customisations on top of carbon. It would also allow us to maintain only >>>>>>> one startup script that is used across all the products? >>>>>>> >>>>>> This is a good idea and I think it should be possible when >>>>>> considering the overall idea. However we need to think about this when we >>>>>> finalize the configurations required for the next release. >>>>>> >>>>>> Currently we have the start-up script in each product distribution >>>>>> now. >>>>>> >>>>>> >>>>>> *./products/autoscaler/modules/distribution/src/main/resources/stratos.sh** >>>>>> >>>>>> *./products/cloud-controller/modules/distribution/src/main/resources/stratos.sh** >>>>>> >>>>>> ./products/cartridge-agent/modules/distribution/src/main/bin/stratos.sh >>>>>> *./products/stratos-manager/modules/distribution/src/bin/stratos.sh** >>>>>> ./products/stratos-cli/distribution/src/main/bin/stratos.sh >>>>>> >>>>>> *./products/load-balancer/modules/distribution/src/main/bin/stratos.sh** >>>>>> >>>>>> * - The products, which depend on WSO2 Carbon kernel and these are >>>>>> files I'm going to update. >>>>>> >>>>>> AFAIK, these scripts can be the same, and there will be no product >>>>>> specific changes. The team is doing lot of changes for next major version >>>>>> and there may be product specific changes. I'm in the process of learning >>>>>> new changes :) >>>>>> >>>>>> We will have to see what each product would need additionally. >>>>>> >>>>>> Therefore as the first step, I will try to update individual files. >>>>>> >>>>>> Thanks! >>>>>> >>>>>> Best Regards, >>>>>> >>>>>> >>>>>> >>>>>>> On 9 Jan 2014 09:34, "Isuru Perera" wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> With the recent Carbon 4.2.0 upgrade, I think we should also update >>>>>>>> stratos.sh to match with the wso2server.sh file provided by Carbon. >>>>>>>> >>>>>>>> I am going to update those now. >>>>>>>> >>>>>>>> I found that each stratos.sh in different products has different >>>>>>>> configurations. >>>>>>>> >>>>>>>> However, I'm going to use the original startup script provided by >>>>>>>> Carbon and only necessary configurations for Stratos. >>>>>>>> >>>>>>>> So far, I found that following argument is important to Stratos. >>>>>>>> >>>>>>>> -Djndi.properties.dir="$CARBON_HOME/repository/conf" >>>>>>>> >>>>>>>> Any other important properties? >>>>>>>> >>>>>>>> Please let me know. >>>>>>>> >>>>>>>> Thanks! >>>>>>>> >>>>>>>> Best Regards, >>>>>>>> >>>>>>>> -- >>>>>>>> Isuru Perera >>>>>>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/ >>>>>>>> Lean . Enterprise . Middleware >>>>>>>> >>>>>>>> about.me/chrishantha >>>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Isuru Perera >>>>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/ >>>>>> Lean . Enterprise . Middleware >>>>>> >>>>>> about.me/chrishantha >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Thanks and Regards, >>>>> >>>>> Isuru H. >>>>> Software Engineer, WSO2 Inc. >>>>> +94 716 358 048* * >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Check out my professional profile and connect with me on LinkedIn. >>>> http://lnkd.in/cw5k69 >>>> >>> >>> >>> >>> -- >>> Best Regards, >>> Nirmal >>> >>> Nirmal Fernando. >>> PPMC Member & Committer of Apache Stratos, >>> Senior Software Engineer, WSO2 Inc. >>> >>> Blog: http://nirmalfdo.blogspot.com/ >>> >> >> >> >> -- >> Check out my professional profile and connect with me on LinkedIn. >> http://lnkd.in/cw5k69 >> > -- Best Regards, Nirmal Nirmal Fernando. PPMC Member & Committer of Apache Stratos, Senior Software Engineer, WSO2 Inc. Blog: http://nirmalfdo.blogspot.com/ --f46d043749f3659a9e04ef8b87c1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Chris,

Where do you intend to do this= ? AFAIU at the time of servers start-up right? Can we generate these script= s once the products get build? So, that the maven built product would conta= in the required script to start the respective server? wdyt?


On Thu,= Jan 9, 2014 at 7:59 PM, chris snow <chsnow123@gmail.com> = wrote:

Nirmal, is this what you were= thinking as well, or are you suggesting something else?

On 9 Jan 2014 14:19, "chris snow" <= chsnow123@gmail.co= m> wrote:
Hi Nirmal,

I was thinking that the scri= pt would be manually created, but the certain parts of the configuration wo= uld be extracted, so instead of this:

while [ "$status" =3D "$START_EXIT_STATUS" ]
do
=A0 =A0 $JAVACMD \
=A0 =A0 -Xbootclasspath/a:&q= uot;$CARBON_XBOOTCLASSPATH" \
=A0 =A0 -Xms256m -Xmx1024m -XX= :MaxPermSize=3D256m \
=A0 =A0 -XX:+HeapDumpOnOutOfMemoryError \
=A0 =A0...
done

you would have something like this= :

while [ "$status" =3D "$STAR= T_EXIT_STATUS" ]
do
=A0 =A0 $JAVACMD \
= =A0 =A0 -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
=A0 =A0 $JAVA_MEM_SETTINGS \
=A0 =A0 -XX:+HeapDumpOnOutOfMem= oryError \
=A0 =A0...
done

there would then be a custom properties file that would be read by the s= tartup script, for example

=A0 =A0JAVA_MEM_SETTINGS=3D=A0-Xms256m -Xmx1024m -XX:Ma= xPermSize=3D256m

You would then have different= property files for different products, e.g.

strat= os-load-balancer-startup.properties (e.g. for the load balancer product whe= n installed standalone)

=A0 =A0JAVA_MEM_SETTINGS=3D=A0-Xms256m -Xmx1024m -XX:Ma= xPermSize=3D256m

stratos-manager-startup.prope= rties (e.g. for the manager product when installed standalone)

=A0 =A0JAVA_MEM_SETTINGS=3D=A0-Xms256m -Xmx2048m -XX:MaxPer= mSize=3D256m

all-in-one-startup.properti= es (e.g. when all stratos products are installed in one server)
<= br>
=A0 =A0JAVA_MEM_SETTINGS=3D=A0-Xms1024m -Xmx4094m -XX:MaxPermSize= =3D1024m

I don't know if this approach w= ould work, it depends on what startup configuration varies for each of the = products.

Does this help explain?

Many t= hanks,

Chris=A0



<= /div>


On= Thu, Jan 9, 2014 at 12:52 PM, Nirmal Fernando <nirmal070125@gmail.co= m> wrote:
Hi Chris/All,

<= /div>What do you think about the point I made?


On Thu, Jan 9, 2014 at 6:05 PM= , chris snow <chsnow123@gmail.com> wrote:
Hi Isuru, that sounds good.= =A0I'm trying to think of a similar approach in the unix world that we= could borrow ideas from. =A0Postfix springs to mind, =A0where I think ther= e are multiple small services that can be started individually, or all toge= ther?


On = Thu, Jan 9, 2014 at 11:30 AM, Isuru Haththotuwa <isuruh@wso2.com> wrote:
Good thinking Chris. In my opinion it would be nice to hav= e the capability to start the whole system at one go, using a single comman= d/script, and also to be able to start/stop individual servers. Maybe we ca= n use a generic startup script in which we could specify one/more than one/= all server(s) that should start. WDYT?


On Thu, Jan 9, 2014 at 4:42 PM, Isuru Perera <isurup@wso2.com> wrote:
Hi Chris,


On Thu, Jan 9, 2014 at 4:12 PM, chris snow <chsno= w123@gmail.com> wrote:

Would there be any benefit in having a generic startup script by extractin= g the differences into a product specific properties file that get imported= by the generic script?

Yes! There are benefits using a generic start-up sc= ript as you mentioned.

I'm not sure if this would be possible, but this approac= h would be helpful for newbie administrators to easily identify produce spe= cific customisations on top of carbon. It would also allow us to maintain o= nly one startup script that is used across all the products?

This is a good idea and I think it should be possib= le when considering the overall idea. However we need to think about this w= hen we finalize the configurations required for the next release.

Currently we have the start-up script in each product distribution now= .

./products/autoscaler/modules/distribution/src/main/resources/s= tratos.sh *
./products/cloud-controller/modules/distribution/src/= main/resources/stratos.sh *
./products/cartridge-agent/modules/distribution/src/main/bin/stratos.sh
= ./products/stratos-manager/modules/distribution/src/bin/stratos.sh *=
./products/stratos-cli/distribution/src/main/bin/stratos.sh
./pro= ducts/load-balancer/modules/distribution/src/main/bin/stratos.sh *

* - The products, which depend on WSO2 Carbon kernel and the= se are files I'm going to update.

AFAIK, these script= s can be the same, and there will be no product specific changes. The team = is doing lot of changes for next major version and there may be product spe= cific changes. I'm in the process of learning new changes :)

We will have to see what each product would need additionall= y.

Therefore as the first step, I will try to update indi= vidual files.

Thanks!

Best Regards,

=A0
On 9 Jan 2014 09:34, "Isuru Perera" &l= t;isurup@wso2.com&= gt; wrote:
Hi,

With t= he recent Carbon 4.2.0 upgrade, I think we should also update stratos.sh to= match with the wso2server.sh file provided by Carbon.

I am go= ing to update those now.

I found that each stratos.sh in different products has different = configurations.

However, I'm going to use the original startup s= cript provided by Carbon and only necessary configurations for Stratos.

So far, I found that following argument is important to Stratos.<= br>
-Djndi.properties.dir=3D"$CARBON_HOME/repository/conf"
=
Any other important properties?

Please let me know.<= br>
Thanks!

Best Regards,

--
I= suru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middle= ware

about.me/chrishantha



--
=
Isuru Perera
Senior Software= Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha



--
Thanks and Regards,

Isuru H.
Software Engineer, W= SO2 Inc.



--=
Check out my professional profile and connect wi= th me on LinkedIn. http= ://lnkd.in/cw5k69



--
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member &= amp; Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.




--
Check out my professional profile and connect with me on LinkedIn= . http://lnkd.in/cw5k69=



--
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & = Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

--f46d043749f3659a9e04ef8b87c1--