You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Isuru Perera <is...@wso2.com> on 2014/01/09 10:33:40 UTC

Updating stratos.sh in products

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

Re: Updating stratos.sh in products

Posted by chris snow <ch...@gmail.com>.
Hi Isuru - yes, updating individual files makes sense now.  We can
investigate different approaches later on.


On Thu, Jan 9, 2014 at 11:12 AM, Isuru Perera <is...@wso2.com> wrote:

> Hi Chris,
>
>
> On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com> 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" <is...@wso2.com> 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
>



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

Re: Updating stratos.sh in products

Posted by chris snow <ch...@gmail.com>.
Hi Nirmal,

I guess in an ideal world, the wso2server.sh script with Carbon would be
generic enough to be usable for all products without editing.

The products would have their own custom configuration file that would be
included, for example:

wso2server.sh:

...
source $PRGDIR/server-properties.sh

while [ "$status" = "$START_EXIT_STATUS" ]
do
    $JAVACMD \
    -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
    $JAVA_MEMORY_SETTINGS \
    -XX:+HeapDumpOnOutOfMemoryError \
    -XX:HeapDumpPath="$CARBON_HOME/repository/logs/heap-dump.hprof" \
    $JAVA_OPTS \
    -Dcom.sun.management.jmxremote \
    ...
    -Djava.security.egd=file:/dev/./urandom \
    -Dfile.encoding=UTF8 \
    $CUSTOM_STARTUP_ARGS \
    org.wso2.carbon.bootstrap.Bootstrap $*
    status=$?
done
...

server-properties.sh:

#!/bin/sh

export JAVA_MEMORY_SETTINGS="-Xms256m -Xmx1024m -XX:MaxPermSize=256m"
export
CUSTOM_STARTUP_ARGS="-Dloadbalancer.conf=file:repository/conf/loadbalancer.conf"


The server-properties.sh would be checked into git with suitable default
settings, but may be edited by the administrator to tweak settings.

The maven build for a product would include the standard wso2server.sh
file, and the product specific server-properties.sh file.  The example
above is fairly crude, but hopefully demonstrates the separation between
standard functionality across all carbon based products, and the product
specific configuration.

Cheers,

Chris


On Thu, Jan 9, 2014 at 3:47 PM, Nirmal Fernando <ni...@gmail.com>wrote:

> 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 <ch...@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" <ch...@gmail.com> 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 <nirmal070125@gmail.com
>>> > wrote:
>>>
>>>> Hi Chris/All,
>>>>
>>>> What do you think about the point I made?
>>>>
>>>>
>>>> On Thu, Jan 9, 2014 at 6:05 PM, chris snow <ch...@gmail.com> 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 <is...@wso2.com>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 <is...@wso2.com> wrote:
>>>>>>
>>>>>>> Hi Chris,
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com>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" <is...@wso2.com> 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* <http://wso2.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/
>>>>
>>>
>>>
>>>
>>> --
>>> 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

Re: Updating stratos.sh in products

Posted by Nirmal Fernando <ni...@gmail.com>.
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 <ch...@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" <ch...@gmail.com> 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 <ni...@gmail.com>wrote:
>>
>>> Hi Chris/All,
>>>
>>> What do you think about the point I made?
>>>
>>>
>>> On Thu, Jan 9, 2014 at 6:05 PM, chris snow <ch...@gmail.com> 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 <is...@wso2.com>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 <is...@wso2.com> wrote:
>>>>>
>>>>>> Hi Chris,
>>>>>>
>>>>>>
>>>>>> On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com>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" <is...@wso2.com> 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* <http://wso2.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/
>>>
>>
>>
>>
>> --
>> 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/

Re: Updating stratos.sh in products

Posted by chris snow <ch...@gmail.com>.
Nirmal, is this what you were thinking as well, or are you suggesting
something else?
On 9 Jan 2014 14:19, "chris snow" <ch...@gmail.com> 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 <ni...@gmail.com>wrote:
>
>> Hi Chris/All,
>>
>> What do you think about the point I made?
>>
>>
>> On Thu, Jan 9, 2014 at 6:05 PM, chris snow <ch...@gmail.com> 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 <is...@wso2.com>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 <is...@wso2.com> wrote:
>>>>
>>>>> Hi Chris,
>>>>>
>>>>>
>>>>> On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com>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" <is...@wso2.com> 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* <http://wso2.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/
>>
>
>
>
> --
> Check out my professional profile and connect with me on LinkedIn.
> http://lnkd.in/cw5k69
>

Re: Updating stratos.sh in products

Posted by chris snow <ch...@gmail.com>.
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 <ni...@gmail.com>wrote:

> Hi Chris/All,
>
> What do you think about the point I made?
>
>
> On Thu, Jan 9, 2014 at 6:05 PM, chris snow <ch...@gmail.com> 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 <is...@wso2.com>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 <is...@wso2.com> wrote:
>>>
>>>> Hi Chris,
>>>>
>>>>
>>>> On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com> 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" <is...@wso2.com> 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* <http://wso2.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/
>



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

Re: Updating stratos.sh in products

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Chris/All,

What do you think about the point I made?


On Thu, Jan 9, 2014 at 6:05 PM, chris snow <ch...@gmail.com> 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 <is...@wso2.com>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 <is...@wso2.com> wrote:
>>
>>> Hi Chris,
>>>
>>>
>>> On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com> 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" <is...@wso2.com> 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* <http://wso2.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/

Re: Updating stratos.sh in products

Posted by chris snow <ch...@gmail.com>.
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 <is...@wso2.com> 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 <is...@wso2.com> wrote:
>
>> Hi Chris,
>>
>>
>> On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com> 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" <is...@wso2.com> 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* <http://wso2.com/>*
>
>
>


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

Re: Updating stratos.sh in products

Posted by Isuru Haththotuwa <is...@wso2.com>.
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 <is...@wso2.com> wrote:

> Hi Chris,
>
>
> On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com> 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" <is...@wso2.com> 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* <http://wso2.com/>*

Re: Updating stratos.sh in products

Posted by Isuru Perera <is...@wso2.com>.
Hi Chris,


On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com> 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" <is...@wso2.com> 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

Re: Updating stratos.sh in products

Posted by Isuru Perera <is...@wso2.com>.
Hi,


On Thu, Jan 9, 2014 at 4:18 PM, Manula Chathurika Thantriwatte <
manulac@wso2.com> wrote:

> Hi Chris,
>
> There is already a generic startup script for stratos. You can find it it
> apache_stratos/incubator-stratos/tools/stratos-installer/setup.sh. For the
> setup customizations you can use
> apache_stratos/incubator-stratos/tools/stratos-installer/conf/setup.conf
> file.
>
Manula, I think you misunderstood the context here. We didn't discuss about
the Stratos *setup* script. What Chris was asking is about the start-up
script for each product.

>
> Thanks !
>
>
>
>
> On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com> 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?
>>
>> 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?
>>  On 9 Jan 2014 09:34, "Isuru Perera" <is...@wso2.com> 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
>>>
>>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manulac@wso2.com / manula@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>


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

about.me/chrishantha

Re: Updating stratos.sh in products

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi Chris,

There is already a generic startup script for stratos. You can find it it
apache_stratos/incubator-stratos/tools/stratos-installer/setup.sh. For the
setup customizations you can use
apache_stratos/incubator-stratos/tools/stratos-installer/conf/setup.conf
file.

Thanks !




On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com> 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?
>
> 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?
> On 9 Jan 2014 09:34, "Isuru Perera" <is...@wso2.com> 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
>>
>


-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: Updating stratos.sh in products

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Chris,

Do you mean to generate the server startup script at build time? If you
meant to generate the start-up script when servers going to start, IMO it
will eliminate the possibility of starting and using the servers
independently (LB could be used alone etc.). wdyt?


On Thu, Jan 9, 2014 at 4:12 PM, chris snow <ch...@gmail.com> 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?
>
> 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?
> On 9 Jan 2014 09:34, "Isuru Perera" <is...@wso2.com> 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
>>
>


-- 
Best Regards,
Nirmal

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

Blog: http://nirmalfdo.blogspot.com/

Re: Updating stratos.sh in products

Posted by chris snow <ch...@gmail.com>.
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?

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?
On 9 Jan 2014 09:34, "Isuru Perera" <is...@wso2.com> 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
>

Re: Updating stratos.sh in products

Posted by Isuru Haththotuwa <is...@wso2.com>.
On Thu, Jan 9, 2014 at 3:36 PM, Nirmal Fernando <ni...@gmail.com>wrote:

> Cool.
>
>
> On Thu, Jan 9, 2014 at 3:31 PM, Isuru Perera <is...@wso2.com> wrote:
>
>> Hi,
>>
>>
>> On Thu, Jan 9, 2014 at 3:09 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>>
>>> +1 Isuru, thanks for volunteering.
>>>
>>> Yes, jndi.properties.dir should be there in all Stratos products. But
>>> there could be other properties.
>>>
>>> If you can do a diff and find out the extra properties of each product,
>>> that would be great. Further, if you could document these necessary system
>>> properties and there meanings etc. that would be useful.
>>>
>> I actually checked differences among stratos.sh files and that's why I
>> said there are many changes in the files.
>>
>> For example, JVM memory, garbage collection related arguments were
>> different.
>>
>> As the first step, I think we can use the original wso2server.sh and use
>> it after adding only required changes.
>>
>> We can later optimize JVM memory and tune garbage collection parameters.
>>
>>  WDYT?
>>
>> I will test and commit the changes. If there is an issue, I will fix! :)
>>
>> Thanks!
>>
>>>
>>>
>>> On Thu, Jan 9, 2014 at 3:03 PM, Isuru Perera <is...@wso2.com> 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"
>>>>
>>> This was the property that I too noticed was missing. Lets go ahead and
tackle issues if we get any. Thanks IsuruP.

>
>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Thanks and Regards,

Isuru H.
Software Engineer, WSO2 Inc.
+94 716 358 048* <http://wso2.com/>*

Re: Updating stratos.sh in products

Posted by Nirmal Fernando <ni...@gmail.com>.
Cool.


On Thu, Jan 9, 2014 at 3:31 PM, Isuru Perera <is...@wso2.com> wrote:

> Hi,
>
>
> On Thu, Jan 9, 2014 at 3:09 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>> +1 Isuru, thanks for volunteering.
>>
>> Yes, jndi.properties.dir should be there in all Stratos products. But
>> there could be other properties.
>>
>> If you can do a diff and find out the extra properties of each product,
>> that would be great. Further, if you could document these necessary system
>> properties and there meanings etc. that would be useful.
>>
> I actually checked differences among stratos.sh files and that's why I
> said there are many changes in the files.
>
> For example, JVM memory, garbage collection related arguments were
> different.
>
> As the first step, I think we can use the original wso2server.sh and use
> it after adding only required changes.
>
> We can later optimize JVM memory and tune garbage collection parameters.
>
>  WDYT?
>
> I will test and commit the changes. If there is an issue, I will fix! :)
>
> Thanks!
>
>>
>>
>> On Thu, Jan 9, 2014 at 3:03 PM, Isuru Perera <is...@wso2.com> 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
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>



-- 
Best Regards,
Nirmal

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

Blog: http://nirmalfdo.blogspot.com/

Re: Updating stratos.sh in products

Posted by Isuru Perera <is...@wso2.com>.
Hi,


On Thu, Jan 9, 2014 at 3:09 PM, Nirmal Fernando <ni...@gmail.com>wrote:

> +1 Isuru, thanks for volunteering.
>
> Yes, jndi.properties.dir should be there in all Stratos products. But
> there could be other properties.
>
> If you can do a diff and find out the extra properties of each product,
> that would be great. Further, if you could document these necessary system
> properties and there meanings etc. that would be useful.
>
I actually checked differences among stratos.sh files and that's why I said
there are many changes in the files.

For example, JVM memory, garbage collection related arguments were
different.

As the first step, I think we can use the original wso2server.sh and use it
after adding only required changes.

We can later optimize JVM memory and tune garbage collection parameters.

WDYT?

I will test and commit the changes. If there is an issue, I will fix! :)

Thanks!

>
>
> On Thu, Jan 9, 2014 at 3:03 PM, Isuru Perera <is...@wso2.com> 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
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



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

about.me/chrishantha

Re: Updating stratos.sh in products

Posted by Nirmal Fernando <ni...@gmail.com>.
+1 Isuru, thanks for volunteering.

Yes, jndi.properties.dir should be there in all Stratos products. But there
could be other properties.

If you can do a diff and find out the extra properties of each product,
that would be great. Further, if you could document these necessary system
properties and there meanings etc. that would be useful.


On Thu, Jan 9, 2014 at 3:03 PM, Isuru Perera <is...@wso2.com> 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
>



-- 
Best Regards,
Nirmal

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

Blog: http://nirmalfdo.blogspot.com/