activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Cons <>
Subject Packaging/scripts cleanup suggestions
Date Fri, 13 May 2011 06:44:03 GMT

I'm experimenting with rpm packaging of Apollo and I have a few suggestions
regarding the three scripts currently in use (apollo, apollo-broker and

First, apollo-broker-service contains some code that may evolve (see
AMQ-3317 ;-) and should IMHO be located under APOLLO_HOME so that it can get
upgraded when a new software version gets installed. Of course, we would
still need a wrapper under APOLLO_BASE.

Then, now that we use apollo.profile, the apollo-broker and
apollo-broker-service scripts could be the same across different broker
instances provided that "apollo create" puts the specific things
(i.e. APOLLO_HOME and APOLLO_USER) in apollo.profile.

By combining both points above, we see that apollo-broker and
apollo-broker-service become in fact identical (they just guess APOLLO_BASE
and call their counterpart under APOLLO_HOME). This unique wrapper script
could also be located under APOLLO_HOME.

Finally, I think that the scripts under APOLLO_HOME and APOLLO_BASE should
have the same name since the ones under APOLLO_BASE simply call the ones
under APOLLO_HOME in the end...

Putting all this together (with a bit of name cleanup), we could have:
 - APOLLO_HOME/bin/apollo stays as it is
 - APOLLO_HOME/bin/service would contain most of the current
   apollo-broker-service, without the APOLLO_BASE guessing
 - APOLLO_HOME/bin/wrapper would contain most of the current apollo-broker
   but exec in the end $progname instead of apollo
 - "apollo create" would:
    * create APOLLO_BASE/etc/apollo.profile with APOLLO_HOME and APOLLO_USER
    * copy APOLLO_HOME/bin/wrapper to APOLLO_BASE/bin/apollo
    * copy APOLLO_HOME/bin/wrapper to APOLLO_BASE/bin/service (could be hard link)

This way:
 - all the scripts are under the software tree (APOLLO_HOME)
 - all the settings are in one file (apollo.profile)
 - upgrading the scripts of a broker instance becomes trivial

What do you think?



View raw message