Issue Details (XML | Word | Printable)

Key: AMQ-2105
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Erik Drolshammer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

Add support for rpm distribution

Created: 12/Feb/09 06:12 AM   Updated: 14/Jun/09 07:16 AM
Return to search
Issue 166 of 413 issue(s)
<< Previous | AMQ-2105 | Next >>
Component/s: None
Affects Version/s: 5.2.0
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works activemq-rpm.tar.bz2 2009-02-18 06:26 AM Erik Drolshammer 156 kB
File Licensed for inclusion in ASF works activemq-rpm_standalone-project.tar.bz2 2009-06-14 07:16 AM Erik Drolshammer 156 kB
Environment: linux, rpm-based


 Description  « Hide
Todo:
  • Create separate rpm maven project
  • move config, scripts, documentation from the jar project

14:57 < Sherriff> Have you thought about distribution with for example rpm?
14:58 < Sherriff> gtully: It seems to be working a lot better without systemUsage and destinationPolicy defined. Thanks alot
14:58 < rajdavies> Sherriff: yeah - would be a good idea
14:59 < Sherriff> rajdavies: Do you use Maven2 to build it now?
14:59 < rajdavies> Sherriff: yep
15:00 < Sherriff> Cool.
15:00 < Sherriff> If you would like I can set up an rpm-project based on appassembler-m-p and unix-m-p.
15:01 < Sherriff> for you.
15:01 < rajdavies> Sherriff: that would be awesome!
15:02 < Sherriff> It use Java Service Wrapper and some (a bit outdated doc) can be found here: http://wiki.community.objectware.no/display/smidigtonull/RPM+Deployment+with+Java+Service+Wrapper
15:02 < Sherriff> The project setup would then be 1. jar-project and 2. rpm-project.
15:03 < Sherriff> 2. Would contain config file, readmes, etc. and the start/stop scripts are generated by appassembler.

I can probably do most of the work since I already have working rpm setup that I use for other projects.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Erik Drolshammer added a comment - 17/Feb/09 03:38 AM
An initial rpm-project.

Erik Drolshammer added a comment - 18/Feb/09 01:52 AM
Use unix-m-p version 1.0-alpha (final) + added (hopefully) the rest of the dependencies. The size of the final rpm is now 25 MiB.

Erik Drolshammer added a comment - 18/Feb/09 06:26 AM
Fixed admin webapp

Hiram Chirino added a comment - 18/Feb/09 06:26 AM
Just tried the latest attachment and I get an error during the build:
[chirino@localhost trunk]$ mvn install 
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/unix-maven-plugin/1.0-alpha-2/unix-maven-plugin-1.0-alpha-2.pom
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/unix-maven-plugin/1.0-alpha-2/unix-maven-plugin-1.0-alpha-2.pom
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.codehaus.mojo:unix-maven-plugin

Reason: POM 'org.codehaus.mojo:unix-maven-plugin' not found in repository: Unable to download the artifact from any repository

  org.codehaus.mojo:unix-maven-plugin:pom:1.0-alpha-2

from the specified remote repositories:
  apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository),
  central (http://repo1.maven.org/maven2)
 for project org.codehaus.mojo:unix-maven-plugin


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Wed Feb 18 09:26:00 GMT-05:00 2009
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------

Erik Drolshammer added a comment - 18/Feb/09 06:30 AM
This is because the artifact was released today (last night) and have not been synchronized to repo1 yet. (Wait 12-15 hours and it should be ok.) The artifact can be found in http://repository.codehaus.org/org/codehaus/mojo/unix-maven-plugin/1.0-alpha-2/.

Tarjei Huse added a comment - 11/Jun/09 07:22 AM
I tested this today.

Some problems :

  • the rpm should create a user and chown the activemq directory to that user.
  • the rpm should create a /var/lock/subsys/activemq directory
  • When I start the application, I get the following error and the web admin doesn't work:
    [org.mortbay.log] jetty-6.1.9
    2009-06-11 16:11:20,157 WARN [org.mortbay.log] Can't reuse /tmp/Jetty_0_0_0_0_8161_admin_admin9l5s6p, using /tmp/Jetty_0_0_0_0_8161_adminadmin_9l5s6p_36110
    2009-06-11 16:11:20,429 WARN [org.mortbay.log] Failed startup of context org.mortbay.jetty.webapp.WebAppContext@1958cc2{/admin,file:/usr/local/activemq/webapps/admin/}
    java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:114)
    at java.util.jar.JarFile.<init>(JarFile.java:133)
    at java.util.jar.JarFile.<init>(JarFile.java:97)
    at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp(TagLibConfiguration.java:168)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1217)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:222)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at org.mortbay.jetty.xbean.JettyFactoryBean.run(JettyFactoryBean.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1413)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1374)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
    at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
    at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
    at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
    at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
    at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
    at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
    at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)
    at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
    at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
    at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
    at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
    at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.activemq.console.Main.runTaskClass(Main.java:225)
    at org.apache.activemq.console.Main.main(Main.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
    at java.lang.Thread.run(Thread.java:619)
    2009-06-11 16:11:20,465 INFO [org.mortbay.log] Started SelectChannelConnector@0.0.0.0:8161

Tarjei Huse added a comment - 12/Jun/09 01:25 AM
On the Zip issue:

I upgraded the Jetty version set in the Pom to 6.1.18. Jetty then provided me with information on which jarfile was corrupt so I could reinstall it (smack-1.5.0). this fixed the admin problem.


Erik Drolshammer added a comment - 14/Jun/09 06:06 AM
Changes from the previous rpm-project:
  • set jetty version to 6.1.18
  • upgraded to unix-maven-plugin 1.0-alpha-4
  • create the /var/lock/subsys/activemq directory
  • create an activemq user if it doesn't exist

Erik Drolshammer added a comment - 14/Jun/09 06:49 AM
Fixed a couple of bugs

Erik Drolshammer added a comment - 14/Jun/09 07:15 AM
Minor adjustments to the adduser command