Wiki source code of Deployment-Standard Deployment

Version 4.1 by Pascal Robert on 2010/09/13 00:13

Show last authors
1 == Overview ==
2
3 I begin by assuming that you have a compiled and built woa, say MyApp.woa.
4
5 Copy the entire woa to the application server(s), into a convenient location (/Library/WebObjects/Applications for example). When you copy the woa between different OS's, make sure that line-breaks are transferred correctly.
6
7 Verify that each application runs, by running it from the command-line (MyApp.woa/MyApp on Solaris and MacOSXServer, MyApp.woa/MyApp.cmd on Windows 2K). Check on each application server.
8
9 Now, find the WebServerResources directory inside the woa (MyApp.woa/Contents/WebServerResources). Copy this into the webserver's document root, under the WebObjects directory, //with the same path//. For example, given the above on OS X, I would copy the WebServerResources so that the final path was /Library/WebServer/Documents/WebObjects/MyApp.woa/Contents/WebServerResources).
10
11 == wotaskd ==
12
13 Verify that wotaskd is running on each application server, by going to the URL [[http://appserverhost:1085]] ; and checking that the output begins with "Wotaskd for WebObjects 5: <appserverhost>". If it is not running, try running it by hand
14
15 {{panel}}
16
17 /System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd
18
19 {{/panel}}
20
21 == Java Monitor ==
22
23 Start Monitor
24
25 {{panel}}
26
27 /System/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor
28
29 {{/panel}}
30
31 on one of the application servers. Note that Monitor //must// be run on one of the application servers
32
33 In Monitor ([[http://appserverhost:56789]]), go to the Site tab, and enter the HTTP Adaptor URL, based on your webserver hostname, the webserver itself, and the adaptor type. (See the earlier section on adaptors for example URLs). This URL doesn't affect configuration of the site at all - it is only used to generate URLs in Monitor itself, but we're filling it in for convenience later.
34
35 Go to the Hosts tab, and add each of the application servers (you may enter IP addresses or hostnames). If you add localhost or 127.0.0.1, you must not add any more application servers (i.e. if localhost is a host, it must be the only host). Choose the correct type for each host.
36
37 Go to the Applications tab, and add your application by name. You will be taken to the application configuration page. The only mandatory setting here is the Path - if you are deploying on multiple OSes, you may have to enter the path multiple times. The path should be the complete path to the application startup script (/Library/WebObjects/Application/MyApp.woa/MyApp or
38 C:ppleocalibraryebObjectspplicationyApp.woayApp.cmd). At the bottom of the first section (New Instance Defaults), click the button "Update for New Instance Only". Click the button in the top right of the page that says "Detail View".
39
40 From the Detail View page, click the "Add" button to add instances of your application to various hosts (remember that an instance is a running copy of an application). Each instance should start automatically in about 30 seconds.
41
42 Once each application has started, check that they are running using Direct Connect - in the "Host-Port" column should be a hyperlink for each instance - click each link in turn and check that the instances are running properly.
43
44 Now to set up the adaptor. This is different for each platform and each webserver. First, note that the default method for all the adaptors is to get the site configuration is Hostlist. Specifically, the list of hosts is actually only "localhost" - so only applications that are on the same machine as the webserver will get vended. If you have separate application server(s), the adaptors will have to be reconfigured - adding the hosts to Monitor isn't good enough. For details on adaptor installation and options, see the Installation.html pages in the adaptor
45 source for each type of adaptor (/Developer/Examples/WebObjects/Source/Adaptors/<type>/Installation.html).
46
47 == Really Quick Adaptor Setup for Apache on OSX and Solaris ==
48
49 Locate the apache.conf file, located in
50 /System/Library/WebObjects/Adaptors/Apache/ or
51 $NEXT//ROOT/Library/WebObjects/Adaptors/Apache. Look for the line
52 "WebObjectsConfig [[http://localhost:1085]] 10". If you had the site
53 configuration from the Overview, you would change the line to say
54 "WebObjectsConfig [[http://appserver1:1085,http://appserver2:1085]] 10".//
55
56 == Really Quick Adaptor Setup for IIS on Win2K ==
57
58 Run regedit.exe. Locate "HKEY//LOCAL//MACHINE/SOFTWARE/Apple/WebObjects/Configuration/". Choose "Add Value" from the edit menu. Type in "CONF//URL"?; for the name and choose REG//SZ for the Data Type. Enter the URL you want to use for the value. The default URL is, as above, "http:~/~/localhost:1085";, but (for our example) should be entered as "http:~/~/appserver1:1085,[[http://appserver2:1085]]";. Note that we do not enter the trailing " 10" here, since it is a separate key/value (CONF//INTERVAL).//
59
60 Save changes and restart the websever.
61
62 At this point, you should be able to connect to your application, by connecting to the appropriate URL
63
64 {{panel}}
65
66 [http://webserverhost/cgi-bin/WebObjects/MyApp.woa]
67
68 {{/panel}}
69
70 or perhaps
71
72 {{panel}}
73
74 [http://webserverhost/scripts/WebObjects.dll/MyApp.woa]
75
76 {{/panel}}