
		========================================
		The ${JONAS_ROOT}/examples/fdf directory
		========================================
		
Fractal Deployment Framework : A Practical Example		
	
		
This directory contains examples of main ADLs what commands the deployment of applications with FDF.


I) Definitions
--------------

Deployment action: is a framework operation : copying, installing and executing an application on a host.

Application: is a software having a specific task. It can be a final program or a middleware (example : JOnAS or Java VM).

Main ADL: is the description of the deployment actions to do. It is placed in a *.fractal file. 
    

II) The main ADLs examples
--------------------------



1) DoubleHost.fractal

This sample will deploy a JVM, and a JOnAS on 2 hosts : 
'tecate' (under SH) and 'singha' (under CSH).
The environment variables CATALINA_BASE, CATALINA_HOME and JONAS_BASE 
will be set on the target hosts. This ADL uses FTP for file transfert 
and SSH for remote execution.

  a. pre-requisites :

Before executing the sample, you have to manually edit the ADL file 
(DoubleHost.fractal) to adapt the configuration with you own directory 
paths and host names.
Check the occurences of the following strings :
* 'singha' & 'tecate' : the hostnames where the applications will be 
deployed
Take a close look at the component definitions because directory paths 
and filenames are hardcoded.

  b. Running the sample :

Once the DoubleHost.fractal file is adpated to your configuration, you can launch it:

>$ fdf launcher DoubleHost install start stop uninstall

This command will execute sequentially 4 phases (install, start, stop, uninstall):
* 'install' will copy and unzip binaries
* 'start' will set environment variables and start applications
* 'stop' will unset the variables and stop applications
* 'uninstall' will remove the binaries

As a result of the command, you should see the following traces, describing step by step the deployment actions executed by the framework:
org.objectweb.fractal.adl.BasicFactory: Loading time = 1184 milliseconds
org.objectweb.fractal.adl.BasicFactory: Compiling time = 61 milliseconds
org.objectweb.fractal.adl.BasicFactory: Execution time = 25 milliseconds
DoubleHost: Loading time = 2783 milliseconds
DoubleHost: Compiling time = 83 milliseconds
DoubleHost: Execution time = 1243 milliseconds
8 sept. 2006 13:38:20 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Running...
8 sept. 2006 13:38:21 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Installing...
8 sept. 2006 13:38:21 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:38:21 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: CommandUpload: Uploading
8 sept. 2006 13:38:21 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: SH: Setting prompt=distant_machine_prompt >



2) DoubleHostJclust.fractal

This sample will deploy a JVM, a JOnAS and a Cluster Daemon on 2 hosts : 
'tecate' (under SH) and 'singha' (under CSH).
The environment variables CATALINA_BASE, CATALINA_HOME and JONAS_BASE 
will be set on the target hosts. This ADL uses FTP for file transfert 
and SSH for remote execution.

  a. pre-requisites :

Before executing the sample, you have to manually edit the ADL file 
(DoubleHostJclust.fractal) to adapt the configuration with you own directory 
paths and host names.
Check the occurences of the following strings :
* 'singha' & 'tecate' : the hostnames where the applications will be 
deployed
Take a close look at the component definitions because directory paths 
and filenames are hardcoded.

  b. Running the sample :

Once the DoubleHostJclust.fractal file is adpated to your configuration, you can launch it:

>$ fdf launcher DoubleHostJclust install start stop uninstall

This command will execute sequentially 4 phases (install, start, stop, uninstall):
* 'install' will copy and unzip binaries
* 'start' will set environment variables and start applications
* 'stop' will unset the variables and stop applications
* 'uninstall' will remove the binaries

As a result of the command, you should see the following traces, describing step by step the deployment actions executed by the framework:
org.objectweb.fractal.adl.BasicFactory: Loading time = 900 milliseconds
org.objectweb.fractal.adl.BasicFactory: Compiling time = 51 milliseconds
org.objectweb.fractal.adl.BasicFactory: Execution time = 23 milliseconds
DoubleHostJclust: Loading time = 3590 milliseconds
DoubleHostJclust: Compiling time = 123 milliseconds
DoubleHostJclust: Execution time = 1345 milliseconds
8 sept. 2006 13:40:09 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Running...
8 sept. 2006 13:40:09 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Installing...
8 sept. 2006 13:40:09 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:40:09 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: CommandUpload: Uploading
8 sept. 2006 13:40:09 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: SH: Setting prompt=distant_machine_prompt >



3) FDF.fractal

This sample will deploy a JOnAS and call two clients on it on host : 
'tecate' (under SH).
The environment variables CATALINA_BASE and CATALINA_HOME  
will be set on the target hosts. This ADL uses FTP for file transfert 
and SSH for remote execution.

  a. pre-requisites :

Before executing the sample, you have to manually edit the ADL file 
(FDF.fractal) to adapt the configuration with you own directory 
paths and host names.
Check the occurences of the following strings :
* 'tecate' : the hostnames where the applications will be 
deployed
Take a close look at the component definitions because directory paths 
and filenames are hardcoded.

  b. Running the sample :

Once the FDF.fractal file is adpated to your configuration, you can launch it:

>$ fdf launcher FDF install start stop uninstall

This command will execute sequentially 4 phases (install, start, stop, uninstall):
* 'install' will copy and unzip binaries
* 'start' will set environment variables and start applications
* 'stop' will unset the variables and stop applications
* 'uninstall' will remove the binaries

As a result of the command, you should see the following traces, describing step by step the deployment actions executed by the framework:
org.objectweb.fractal.adl.BasicFactory: Loading time = 902 milliseconds
org.objectweb.fractal.adl.BasicFactory: Compiling time = 57 milliseconds
org.objectweb.fractal.adl.BasicFactory: Execution time = 48 milliseconds
FDF: Loading time = 3339 milliseconds
FDF: Compiling time = 103 milliseconds
FDF: Execution time = 1293 milliseconds
8 sept. 2006 13:40:43 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Running...
8 sept. 2006 13:40:43 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Installing...
8 sept. 2006 13:40:43 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:40:43 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:40:43 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:40:43 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: CommandUpload: Uploading
8 sept. 2006 13:40:43 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: SH: Setting prompt=distant_machine_prompt >



4) GetLogs.fractal

This sample will deploy a path of JOnAS and uploads the log files on it on host : 
'tecate' (under SH).
The environment variables CATALINA_BASE and CATALINA_HOME  
will be set on the target hosts. This ADL uses FTP for file transfert 
and SSH for remote execution.

  a. pre-requisites :

Before executing the sample, you have to manually edit the ADL file 
(GetLogs.fractal) to adapt the configuration with you own directory 
paths and host names.
Check the occurences of the following strings :
* 'tecate' : the hostnames where the applications will be 
deployed
Take a close look at the component definitions because directory paths 
and filenames are hardcoded.

  b. Running the sample :

Once the GetLogs.fractal file is adpated to your configuration, you can launch it:

>$ fdf launcher GetLogs install start stop uninstall

This command will execute sequentially 4 phases (install, start, stop, uninstall):
* 'install' will copy and unzip binaries
* 'start' will set environment variables and start applications
* 'stop' will unset the variables and stop applications
* 'uninstall' will remove the binaries

As a result of the command, you should see the following traces, describing step by step the deployment actions executed by the framework:
org.objectweb.fractal.adl.BasicFactory: Loading time = 904 milliseconds
org.objectweb.fractal.adl.BasicFactory: Compiling time = 53 milliseconds
org.objectweb.fractal.adl.BasicFactory: Execution time = 47 milliseconds
GetLogs: Loading time = 2262 milliseconds
GetLogs: Compiling time = 69 milliseconds
GetLogs: Execution time = 1181 milliseconds
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Running...
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Installing...
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Starting...
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Starting...
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: VariableCommand: SetVariable (CATALINA_HOME,/home/goal/manley/apache-tomcat-5.5.12)
8 sept. 2006 13:42:51 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: SH: Setting prompt=distant_machine_prompt >


5) Main.fractal

This sample will deploy a path of JOnAS and uploads the log files on it on host : 
'tecate' (under SH).
The environment variables CATALINA_BASE and CATALINA_HOME  
will be set on the target hosts. This ADL uses FTP for file transfert 
and SSH for remote execution.

  a. pre-requisites :

Before executing the sample, you have to manually edit the ADL file 
(Main.fractal) to adapt the configuration with you own directory 
paths and host names.
Check the occurences of the following strings :
* 'tecate' : the hostnames where the applications will be 
deployed
Take a close look at the component definitions because directory paths 
and filenames are hardcoded.

  b. Running the sample :

Once the GetLogs.fractal file is adpated to your configuration, you can launch it:

>$ fdf launcher Main install start stop uninstall

This command will execute sequentially 4 phases (install, start, stop, uninstall):
* 'install' will copy and unzip binaries
* 'start' will set environment variables and start applications
* 'stop' will unset the variables and stop applications
* 'uninstall' will remove the binaries

As a result of the command, you should see the following traces, describing step by step the deployment actions executed by the framework:
org.objectweb.fractal.adl.BasicFactory: Loading time = 902 milliseconds
org.objectweb.fractal.adl.BasicFactory: Compiling time = 54 milliseconds
org.objectweb.fractal.adl.BasicFactory: Execution time = 48 milliseconds
Main: Loading time = 2285 milliseconds
Main: Compiling time = 71 milliseconds
Main: Execution time = 1159 milliseconds
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Running...
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Installing...
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Starting...
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Starting...
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: VariableCommand: SetVariable (CATALINA_HOME,/home/goal/manley/apache-tomcat-5.5.12)
8 sept. 2006 13:43:44 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: SH: Setting prompt=distant_machine_prompt >



6) Pactch.fractal

This sample will deploy a path of JOnAS and uploads the log files on it on host : 
'tecate' (under SH).
The environment variables CATALINA_BASE and CATALINA_HOME  
will be set on the target hosts. This ADL uses FTP for file transfert 
and SSH for remote execution.

  a. pre-requisites :

Before executing the sample, you have to manually edit the ADL file 
(Patch.fractal) to adapt the configuration with you own directory 
paths and host names.
Check the occurences of the following strings :
* 'tecate' : the hostnames where the applications will be 
deployed
Take a close look at the component definitions because directory paths 
and filenames are hardcoded.

  b. Running the sample :

Once the Patch.fractal file is adpated to your configuration, you can launch it:

>$ fdf launcher Patch install start stop uninstall

This command will execute sequentially 4 phases (install, start, stop, uninstall):
* 'install' will copy and unzip binaries
* 'start' will set environment variables and start applications
* 'stop' will unset the variables and stop applications
* 'uninstall' will remove the binaries

As a result of the command, you should see the following traces, describing step by step the deployment actions executed by the framework:
org.objectweb.fractal.adl.BasicFactory: Loading time = 904 milliseconds
org.objectweb.fractal.adl.BasicFactory: Compiling time = 50 milliseconds
org.objectweb.fractal.adl.BasicFactory: Execution time = 44 milliseconds
Patch: Loading time = 1822 milliseconds
Patch: Compiling time = 59 milliseconds
Patch: Execution time = 1128 milliseconds
8 sept. 2006 13:45:11 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Running...
8 sept. 2006 13:45:11 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Installing...
8 sept. 2006 13:45:11 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:45:11 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:45:11 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Starting...
8 sept. 2006 13:45:11 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Starting...
8 sept. 2006 13:45:11 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: CommandUpload: Uploading
8 sept. 2006 13:45:11 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: SH: Setting prompt=distant_machine_prompt >



7) SingleHost.fractal

This sample will deploy a JVM, and a JOnAS on host : 
'tecate' (under SH) and 'singha' (under CSH).
The environment variables CATALINA_BASE, CATALINA_HOME and JONAS_BASE 
will be set on the target hosts. This ADL uses FTP for file transfert 
and SSH for remote execution.

  a. pre-requisites :

Before executing the sample, you have to manually edit the ADL file 
(SingleHost.fractal) to adapt the configuration with you own directory 
paths and host names.
Check the occurences of the following strings :
* 'tecate' : the hostnames where the applications will be 
deployed
Take a close look at the component definitions because directory paths 
and filenames are hardcoded.

  b. Running the sample :

Once the SingleHost.fractal file is adpated to your configuration, you can launch it:

>$ fdf launcher SingleHost install start stop uninstall

This command will execute sequentially 4 phases (install, start, stop, uninstall):
* 'install' will copy and unzip binaries
* 'start' will set environment variables and start applications
* 'stop' will unset the variables and stop applications
* 'uninstall' will remove the binaries

As a result of the command, you should see the following traces, describing step by step the deployment actions executed by the framework:
org.objectweb.fractal.adl.BasicFactory: Loading time = 905 milliseconds
org.objectweb.fractal.adl.BasicFactory: Compiling time = 53 milliseconds
org.objectweb.fractal.adl.BasicFactory: Execution time = 31 milliseconds
SingleHost: Loading time = 2123 milliseconds
SingleHost: Compiling time = 68 milliseconds
SingleHost: Execution time = 1132 milliseconds
8 sept. 2006 13:45:38 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Running...
8 sept. 2006 13:45:38 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Installing...
8 sept. 2006 13:45:38 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:45:38 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: CommandUpload: Uploading
8 sept. 2006 13:45:38 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: SH: Setting prompt=distant_machine_prompt >



8) SSH_SCP.fractal

This sample will deploy a path of JOnAS and uploads the log files on it on host : 
'tecate' (under SH).
The environment variables CATALINA_BASE and CATALINA_HOME  
will be set on the target hosts. This ADL uses SCP for file transfert 
and SSH for remote execution.

  a. pre-requisites :

Before executing the sample, you have to manually edit the ADL file 
(SSH_SCP.fractal) to adapt the configuration with you own directory 
paths and host names.
Check the occurences of the following strings :
* 'tecate' : the hostnames where the applications will be 
deployed
Take a close look at the component definitions because directory paths 
and filenames are hardcoded.

  b. Running the sample :

Once the SSH_SCP.fractal file is adpated to your configuration, you can launch it:

>$ fdf launcher SSH_SCP install start stop uninstall

This command will execute sequentially 4 phases (install, start, stop, uninstall):
* 'install' will copy and unzip binaries
* 'start' will set environment variables and start applications
* 'stop' will unset the variables and stop applications
* 'uninstall' will remove the binaries

As a result of the command, you should see the following traces, describing step by step the deployment actions executed by the framework:
org.objectweb.fractal.adl.BasicFactory: Loading time = 919 milliseconds
org.objectweb.fractal.adl.BasicFactory: Compiling time = 52 milliseconds
org.objectweb.fractal.adl.BasicFactory: Execution time = 26 milliseconds
SSH_SCP: Loading time = 2337 milliseconds
SSH_SCP: Compiling time = 87 milliseconds
SSH_SCP: Execution time = 1325 milliseconds
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Running...
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Installing...
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Installing
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: Runner: Starting...
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: MacroCommand: Starting...
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: VariableCommand: SetVariable (CATALINA_HOME,/home/goal/manley/apache-tomcat-5.5.12)
8 sept. 2006 13:46:36 org.objectweb.util.monolog.wrapper.javaLog.Logger log
INFO: SH: Setting prompt=distant_machine_prompt >





see the wiki page for further informations : https://wiki.objectweb.org/jonas/Wiki.jsp?page=MiddlewareDeployment