Recipe 3. Integrate Java Tango servers with Astor
|
|
---|---|
Problem overview One wants to control Java Tango servers using Astor after deployment. Detailed cases Simplify deployment and integration of new Java Tango servers with existing Tango environment. Give users ability to use well known tools for controlling and monitoring Java Tango servers. Solution overview The following describes solutions for linux. Windows users may use the same strategy except bash files must be replaced with corresponding batch files. There are two possible ways we can prepare this receipt:
Executing mvn assembly:single produces one big jar file in the target folder, i.e. TestServer-1.4.jar. To use our server we just copy it to some location on the target machine and use the following bash script:
Super easy, isn't it? (Do not mind the last two parameters they are here to workaround issue #744) This script is saved into /usr/lib/tango/server/TestServer. /usr/lib/tango/server can be replaced with any other location where Starter can find the script, i.e. defined in StartDsPath property. We need to specify an absolute path to the jar file as Astor runs servers from /var/tmp/ds.log folder TODO: check in the source code of Astor PROS
CONS
When deployed it is extracted from the archive and copied to some placed aka SERVER_ROOT. Exploded archive has the following structure:
Startup bash script may look like this:
Again the script is in /usr/lib/tango/server/TestServer. /usr/lib/tango/server can be replaced with any other location where Starter can find the script, i.e. defined in StartDsPath property. We need to specify an absolute path to the lib and conf folders as Astor runs servers from /var/tmp/ds.log folder TODO: check in the source code of Astor PROS
CONS
Both solutions assume that maven is used to handle project’s lifecycle. In fact it would be nice if POGO would generate maven projects for Java by default as requested in #106 |