You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Kristian Rink <ka...@zimmer428.net> on 2008/03/26 21:51:21 UTC

maven2: deployment quickstart?

Folks;

being in the middle of evaluating a bunch of different options (i.o.w.
application servers) to serve as a future platform for most of our (both
Spring and, sooner or later, EJB3 based) projects, I am just by now
dealing with Geronimo 2, partly hoping for a pretty decent maven2
support in terms of deploying modules (given they're both apache
projects). So far we're using tomcat 6 and codehaus' tomcat-maven-plugin
[1] in order to deploy .war artifacts to remote tomcat installments
(both testing and production systems). And I am curious to see whether
there's something like that for geronimo (2.x), some maven2 plugin that
allows for building and remote deployment of war, ear, EJB jars in a way
similar to the tomcat approach. So far I just stumbled across [2] which
mainly seems to deal with deploying to locally installed geronimo
instances and, asides that, leaves quite a bunch of questions unanswered
(including how to actually integrate these plugins with maven2 in order
to build and then deploy, say, an arbitrary war artifact to a geronimo
server). [3] unfortunately completely avoids talking about maven2.

Can any of the kind souls on this list enlighten me about this?

Many thanks in advance, kind regards.
Kristian




[1]http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html
[2]http://geronimo.apache.org/maven/server/maven-plugins/geronimo-maven-plugin/index.html
[3]http://www.ibm.com/developerworks/library/os-ag-remotedeploy/index.html

Re: maven2: deployment quickstart?

Posted by David Jencks <da...@yahoo.com>.
On Mar 27, 2008, at 12:03 AM, Kristian Rink wrote:

> David, *;
>
> first off, thanks a bunch for your explanations on that, they surely
> made a few things clearer to me. :)
>
>
> Am Wed, 26 Mar 2008 15:04:42 -0700
> schrieb David Jencks <da...@yahoo.com>:
>
>> [2] ought to be able to deploy to remote servers with no problem..
>> That said I haven't tried it.  If it doesn't work it's probably a
>> very simple fix.  Basically you just need to specify where the
>> remote server is.
>
> Hmmm, I will have a closer look at it then and see how far this will
> take me. :)

We make extensive use of  the geronimo-maven-plugin in the testsuite  
(under server/trunk or equivalent branch/tag).  In the root testsuite  
pom there's some configuration to start and stop a local server,  
which won't work remotely.  A typical configuration to deploy and  
undeploy an app looks something like

             <plugin>
                 <groupId>org.apache.geronimo.buildsupport</groupId>
                 <artifactId>geronimo-maven-plugin</artifactId>
                 <executions>
                     <execution>
                         <id>deploy</id>
                         <phase>pre-integration-test</phase>
                         <goals>
                             <goal>deploy-module</goal>
                         </goals>
                         <configuration>
                             <moduleArchive>$ 
{project.build.directory}/${artifactId}-${version}.ear</moduleArchive>
                         </configuration>
                     </execution>

                     <execution>
                         <id>undeploy</id>
                         <phase>post-integration-test</phase>
                         <goals>
                             <goal>undeploy-module</goal>
                         </goals>
                         <configuration>
                             <moduleId>${groupId}/${artifactId}/$ 
{version}/ear</moduleId>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>


I think you just need to add <hostname>,,,</hostname> and probably  
username and password to the configuration element.


>
> [...]
>> With this point of view you would either assemble an app server
>> containing your application(s) or construct assembly instructions and
>> ship these to the remote servers and then start the preconfigured
>> servers with your application already installed.
>
> This is an interesting idea.
>
> Actually, I can't say I do or don't like it as I simply have to get
> acquainted to it after all, given that indeed it seems to introduce a
> whole new philosophy in developing and deploying Java EE applications,
> more than just slightly differing from what one is used to by now. :)
>
>
>> I'm curious about what kind of remote management you expect to have
>> for the remote servers.
>

the geronimo-maven-plugin usage above should work for any g 2.x  
version.  The below really applies to 2.1 and later.

> To be a little more verbose on that: So far, we are using a bunch of
> applications distributed around in our network running in several
> tomcat containers, and I found this solution to be quite difficult to
> deal with if a bigger bunch of people (also including some who are
> less experienced and/or less interested) is supposed to take care of
> that structure. Most notably, it is difficult to explain
>
> - how to get some options of applications deployed to these containers
> configured at runtime,

Depending on what you want to configure... there are several options.
- remote jmx.  A lot of stuff can be configured directly on the  
components... probably including stuff like context-root for web  
apps.  I haven't tried this much.
- If you deploy as a geronimo plugin you can arrange for specific  
property settings to be in var/config/config- 
substitutions.properties.  Changing these generally only takes effect  
when the server is restarted, but its handy for putting specific  
configuration bits in.
- you can arrange for a file containing app specific configuration  
(such as log4j settings) to be unpacked into a directory of your  
choice such as var/myapp/data.
- A lot can be configured through the admin console, and you can  
write an admin console plugin to specifically administer your apps.

>
> - how to use server logs to tell what is goin' on inside these
> containers at the moment,

the admin console has a log viewer.  You can configure app specific  
logging fairly easily starting in g 2.1.1 (almost out :-)
>
> - how to deal with reloading / stopping apps if desired.

this can be done through the admin console, maven, or (probably now  
or soon) gshell.  I'm not sure how much gshell remoting works at the  
moment.
>
> So far, the same time we look at geronimo, we are into playing around
> with glassfish which seems to do better about these things for a  
> simple
> reason: It provides a fairly sophisticated management interface to  
> deal
> with all these issues in an easy way. Given that, and assuming to
> replace an existing, distributed environment by one "huge" (indeed
> monolithic it seems) Java EE container, there seems to be quite a
> benefit compared to our given situation, plus the chance to throw in
> things like EJB, JMS, ... easily to our Spring based applications. But
> the idea of the Java EE server being a standalone, well-administered
> runtime to just dump applications to and be reasonably sure they will
> start out is a tempting thing. From that point of view, I have indeed
> get acquainted to the idea of, say, building "my own app server
> distribution" by assembling an application server containing just my
> application. But maybe indeed it's just about getting used to it. At
> least, is there a way of running geronimo 2.x as a "traditional"
> application server (standalone installation on some dedicated host
> ready to recieve apps) as well?

Yes, you can do that using the geronimo-maven-plugin.

>
> Anyway, thanks again for your input on that, best regards.

thanks for your interest!
david jencks

> Kristian
>
> -- 
> Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
> jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
> "One dreaming alone, it will be only a dream; many dreaming together
> is the beginning of a new reality." (Hundertwasser)


Re: maven2: deployment quickstart?

Posted by Kevan Miller <ke...@gmail.com>.
On Mar 27, 2008, at 3:03 AM, Kristian Rink wrote:

<snip>

> So far, the same time we look at geronimo, we are into playing around
> with glassfish which seems to do better about these things for a  
> simple
> reason: It provides a fairly sophisticated management interface to  
> deal
> with all these issues in an easy way.

I'd be interested to hear what specific features you are finding  
particularly useful (and feel Geronimo is lacking).

> Given that, and assuming to
> replace an existing, distributed environment by one "huge" (indeed
> monolithic it seems) Java EE container, there seems to be quite a
> benefit compared to our given situation, plus the chance to throw in
> things like EJB, JMS, ... easily to our Spring based applications. But
> the idea of the Java EE server being a standalone, well-administered
> runtime to just dump applications to and be reasonably sure they will
> start out is a tempting thing. From that point of view, I have indeed
> get acquainted to the idea of, say, building "my own app server
> distribution" by assembling an application server containing just my
> application. But maybe indeed it's just about getting used to it. At
> least, is there a way of running geronimo 2.x as a "traditional"
> application server (standalone installation on some dedicated host
> ready to recieve apps) as well?

Absolutely. We distribute a full-functioned, EE 5 compliant version of  
Geronimo. We just have additional features which permit you to create  
server images which are custom built to the requirements of your  
application. Alternatively, you can create server images with custom  
feature sets (JSP/Servlet, JPA, etc), but leaving out functions that  
you'll never use and deploy applications in a traditional fashion.

--kevan


Re: maven2: deployment quickstart?

Posted by Kristian Rink <ka...@zimmer428.net>.
David, *;

first off, thanks a bunch for your explanations on that, they surely
made a few things clearer to me. :)


Am Wed, 26 Mar 2008 15:04:42 -0700
schrieb David Jencks <da...@yahoo.com>:

> [2] ought to be able to deploy to remote servers with no problem..  
> That said I haven't tried it.  If it doesn't work it's probably a  
> very simple fix.  Basically you just need to specify where the
> remote server is.

Hmmm, I will have a closer look at it then and see how far this will
take me. :)

[...]
> With this point of view you would either assemble an app server
> containing your application(s) or construct assembly instructions and
> ship these to the remote servers and then start the preconfigured
> servers with your application already installed.

This is an interesting idea.

Actually, I can't say I do or don't like it as I simply have to get
acquainted to it after all, given that indeed it seems to introduce a
whole new philosophy in developing and deploying Java EE applications,
more than just slightly differing from what one is used to by now. :)


> I'm curious about what kind of remote management you expect to have  
> for the remote servers.

To be a little more verbose on that: So far, we are using a bunch of
applications distributed around in our network running in several
tomcat containers, and I found this solution to be quite difficult to
deal with if a bigger bunch of people (also including some who are
less experienced and/or less interested) is supposed to take care of
that structure. Most notably, it is difficult to explain

- how to get some options of applications deployed to these containers
configured at runtime,

- how to use server logs to tell what is goin' on inside these
containers at the moment,

- how to deal with reloading / stopping apps if desired.

So far, the same time we look at geronimo, we are into playing around
with glassfish which seems to do better about these things for a simple
reason: It provides a fairly sophisticated management interface to deal
with all these issues in an easy way. Given that, and assuming to
replace an existing, distributed environment by one "huge" (indeed
monolithic it seems) Java EE container, there seems to be quite a
benefit compared to our given situation, plus the chance to throw in
things like EJB, JMS, ... easily to our Spring based applications. But
the idea of the Java EE server being a standalone, well-administered
runtime to just dump applications to and be reasonably sure they will
start out is a tempting thing. From that point of view, I have indeed
get acquainted to the idea of, say, building "my own app server
distribution" by assembling an application server containing just my
application. But maybe indeed it's just about getting used to it. At
least, is there a way of running geronimo 2.x as a "traditional"
application server (standalone installation on some dedicated host
ready to recieve apps) as well?

Anyway, thanks again for your input on that, best regards.
Kristian

-- 
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
"One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality." (Hundertwasser)

Re: maven2: deployment quickstart?

Posted by David Jencks <da...@yahoo.com>.
[2] ought to be able to deploy to remote servers with no problem..  
That said I haven't tried it.  If it doesn't work it's probably a  
very simple fix.  Basically you just need to specify where the remote  
server is.

 From your description it sounds like you are assuming the app server  
is an existing monolithic thing that doesn't really participate in  
this process.  We are trying to develop an alternate viewpoint where  
the  "app server" is something constructed around your application to  
provide the runtime support it needs to operate.  With this point of  
view you would either assemble an app server containing your  
application(s) or construct assembly instructions and ship these to  
the remote servers and then start the preconfigured servers with your  
application already installed.

We have a lot of this working in 2.1.  The "predeployment" of apps  
into geronimo plugins and assembly of servers from geronimo plugins  
work well.  Currently the easiest to use assembly recipe is a maven  
project.  We don't have distribution worked out too well.  If you can  
run the assembly project or some other maven project on the remote  
machine that would work fine.  There's also some remote management  
capabilities using gshell, but I'm not sure how advanced they are.

I'm curious about what kind of remote management you expect to have  
for the remote servers.

In any case I hope you find this interesting and continue to discuss  
how it might fit into what you are trying to do.

thanks
david jencks

On Mar 26, 2008, at 1:51 PM, Kristian Rink wrote:

> Folks;
>
> being in the middle of evaluating a bunch of different options (i.o.w.
> application servers) to serve as a future platform for most of our  
> (both
> Spring and, sooner or later, EJB3 based) projects, I am just by now
> dealing with Geronimo 2, partly hoping for a pretty decent maven2
> support in terms of deploying modules (given they're both apache
> projects). So far we're using tomcat 6 and codehaus' tomcat-maven- 
> plugin
> [1] in order to deploy .war artifacts to remote tomcat installments
> (both testing and production systems). And I am curious to see whether
> there's something like that for geronimo (2.x), some maven2 plugin  
> that
> allows for building and remote deployment of war, ear, EJB jars in  
> a way
> similar to the tomcat approach. So far I just stumbled across [2]  
> which
> mainly seems to deal with deploying to locally installed geronimo
> instances and, asides that, leaves quite a bunch of questions  
> unanswered
> (including how to actually integrate these plugins with maven2 in  
> order
> to build and then deploy, say, an arbitrary war artifact to a geronimo
> server). [3] unfortunately completely avoids talking about maven2.
>
> Can any of the kind souls on this list enlighten me about this?
>
> Many thanks in advance, kind regards.
> Kristian
>
>
>
>
> [1]http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html
> [2]http://geronimo.apache.org/maven/server/maven-plugins/geronimo- 
> maven-plugin/index.html
> [3]http://www.ibm.com/developerworks/library/os-ag-remotedeploy/ 
> index.html