Wiki source code of Your First Deployment

Version 10.1 by Pascal Robert on 2012/01/08 08:06

Hide last authors
Pascal Robert 4.1 1 {{warning}}
Steve Peery 6.1 2 Work in progress\!
Pascal Robert 4.1 3 {{/warning}}
4
Pascal Robert 3.1 5 {{toc}}{{/toc}}
6
7 = Introduction =
8
Steve Peery 6.1 9 Usually, people deploy Project Wonder applications in one of those two ways: using the "classic" deployment tools (wotaskd + Web server module) or using a servlet container (aka Tomcat/Jboss/etc.).
10
11 We will focus on the classic tools since this is the method that the majority of the community use. The classic deployment tools consists of:
12
Pascal Robert 10.1 13 * wotaskd. A daemon that act as a watchdog to send lifeboat to the applications its manage + launching and stopping applications. Source code is available and it's actually a Project Application application
Steve Peery 6.1 14
15 * Module for your Web server software (Apache or IIS). If a module don't exist for your preferred Web server, you can use a CGI.
16
17 * JavaMonitor. A Web GUI to manage wotaskd configuration (which is a XML file). It's optional, and you can manage multiple instances of wotaskd with a single JavaMonitor installation. JavaMonitor also have REST APIs so that you can manage the configuration by command-line or by a JavaScript app.
18
19 But first, we need to actually make our projects ready for deployment.
20
Pascal Robert 3.1 21 = Building the "products" =
22
Pascal Robert 9.1 23 When you run your projects inside Eclipse, they use the incremental builder and the "internal builds" are not ready for deployment (e.g. don't use the build from the "build" folder of the project, it's not a complete build). You need to use Ant or Maven to actually build a full "product". Let's focus on Ant because, again, this is what the majority use. You can also use Jenkins, but Jenkins will need to call Maven or Ant to build the projects anyway.
Steve Peery 6.1 24
25 One important thing to remember is that you need to build and install the frameworks before your build your applications. Building your applications will NOT add the frameworks to the product if you didn't build the frameworks first. So let's build and install the **BlogCommon** framework first.
26
Pascal Robert 9.1 27 In Eclipse, right-click on the **BlogCommon** project, and select **WOLips Ant Tools** > **Install**.
Steve Peery 6.1 28
Pascal Robert 9.1 29 By calling this, Eclipse will call Ant to build the framework and install it in (on OS X) **/Library/Frameworks**, so the framework should be at **/Library/Frameworks/BlogCommon.framework**.
Steve Peery 6.1 30
Pascal Robert 9.1 31 You are now ready to build the applications. The procedure is the same as for frameworks, so right-click on the **BlogRest** project, and select **WOLips Ant Tools** > **Install**. The application will install itself in (on OS X) **/Library/WebObjects/Applications/**. But there's a difference with a build for a framework: building an application will build three products:
32
Steve Peery 6.1 33 * a .woa (in our case: **BlogRest.woa**) that is a regular application bundle.
34 * a tar+gzip archive of the application (in our case: **BlogRest-Application.tar.gz**)
35 * a tar+gzip archive of the Web server resources (the files that are in the **WebResources** folders of your projects). That file is name **<ApplicationName>-WebServerResources.tar.gz** (so in our case, **BlogRest-WebServerResources.tar.gz**).
36
Pascal Robert 9.1 37 The tar archive exists to make it faster to copy the application to your deployment server because it's two files instead of hundred and they are compressed.
Steve Peery 6.1 38
Pascal Robert 3.1 39 = Installing the deployment tools =
40
Pascal Robert 10.1 41 We are now ready to install the deployment tools. The wiki have installation instructions for many platforms, so jump over to the instructions for your deployment platform. Running the deployment tools (at least wotaskd and the Apache module) is also useful on your development machine.
Steve Peery 6.1 42
Pascal Robert 9.1 43 * [[Installing on Mac OS X>>WO:Deploying on Mac OS X Server]]
44 * [[Installing on Linux>>WO:Installing WebObjects 5.4 on Linux]]
45 * [[Installing on Windows>>WO:Deploying on Windows]]
46 * [[Installing on FreeBSD>>WO:Deploying on FreeBSD 8.2 and WebObjects 5.4.3]]
Steve Peery 6.1 47
48 = Configuring the applications with JavaMonitor =