Fractal - About the Fractal deployment Framework

About the Fractal deployment Framework

The aim of the Fractal Deployment Framework (FDF) is to deploy software on remote machines. This means uploading binaries, unzipping them, modifying environment variables, executing the software, stopping the software, unsetting the variables (left as before), removing unzipped directories and zipped files. The FDF covers the entire process of installation, starting, stopping and uninstalling of software on remote machines.

This process is described in the main ADL. ADLs are components defining and binding scripts on a component-based program. The main ADL (which can have a name other than main) is built in such a way that, for each host, software or function there is a sub ADL that may be called. This is done in the component definition of the main ADL. Then the components defined (by a sub ADL) must be bound to the FDF application depending on the execution order.

Among the main components ADL definition, there are two parts, the hosts definition with all the parameters defined for that host (OS, upload protocol ...), and the software and function definition. These software and functions must be applied on a host or on a software that is applied on a host.

Table of contents

  1. Main ADLs
  2. Sub ADL (hosts - software and function)
  3. Full examples of a main ADL
  4. Insert FDF in another application
  5. FDF-Library
  6. Conclusion

1. Main ADLs

Main ADLs are the structure of the deployment process. They are a combination of sub ADLs that concentrate on a particular piece of code. Main ADLs can have any type of name.

Main ADLs describe the components of FDF and bind them together in FractalADL format. There are two parts, the definition part and the binding part. Each component is defined by calling a sub ADL. The binding of the components defined previously sets their order in the FDF application. The binding is done with the FDF application component runner.

Main ADLs are structured as followed. The NameOfTheADL, the parts <!-- THIS IS THE COMPONENTS DEFINTION AREA --> and <!-- THIS IS THE COMPONENTS BINDING AREA--> must be modified and the rest must be copied as it is.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" "classpath://org/objectweb/fractal/adl/xml/standard.dtd">
<definition name="NameOfTheADL">

  <interface name="r" signature="org.objectweb.fractal.deployment.util.RunnableArg" role="server"/>
  <component name="runner" definition="org.objectweb.fractal.deployment.util.Runner"/>

  <!-- THIS IS THE COMPONENTS DEFINTION AREA -->

  <binding client="this.r" server="runner.r"/>

  <!-- THIS IS THE COMPONENTS BINDING  AREA-->

</definition>

	   

Note that the '\' character must be typed as double '\\' if for the character '\'.

The components definition area

This area is dedicated to the definition of components. This section describes how to build the necessary components with all their parameters.

There are two types of components, the hosts components and the software and functions components. The hosts components define hosts and their parameters (upload protocol, shell (OS), distant protocol, host name, user (login and password), temporary directory of file uploading). The second components of software and functions are deployed on a host component. They can be deployed on another software however, because it is possible to deduct the host where it is deployed.

The components are declared as follows:

<component name="host1"  definition="org.objectweb.fractal.deployment.hostserver.Host">
  <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
  <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(localhost)"/>
  <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/var/www)"/>
  <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.HTTP"/>
  <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
  <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.SH"/>
</component>

<component name="java1" definition="org.objectweb.fractal.deployment.java.Java">
  <component name="host"        definition="./host1/host"/>
  <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Java)"/>
  <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jdk1.5.0_06.tar)"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,jdk1.5.0_06)"/>
</component>
		

In a component definition there are two parts, the sub ADL name and definition (here host1 and java1) and the parameters ADL definition (here user, hostname, tmpdir, upload, protocol and shell for host1). All components definitions follow this scheme.

The sub ADL definition has a name, here host1 and java1. These names can be chosen as desired but must be unique (all the links to that name must be the same). It has a ADL, here org.objectweb.fractal.deployment.hostserver.Host. It is a host ADL and it has a number of parameters inside the <component> block.

The parameters ADLs have names that must not be modified. These have an ADL definition which must correspond with the parameter. For example, the parameter upload may be HTTP (org.objectweb.fractal.deployment.hostserver.HTTP), FTP (org.objectweb.fractal.deployment.hostserver.FTP) or SCP (org.objectweb.fractal.deployment.hostserver.SCP). All other ADL are forbidden, but one and only one must exist. Some parameter ADLs may have arguments such as org.objectweb.fractal.deployment.hostserver.Hostname(localhost). This means that the host name is 'localhost'.

The parameters ADLs may have one or several arguments. They must all be placed between brackets and have a comma to separate them. No other character is needed (and must be avoided except spaces for empty arguments). For example: Destination(/home/goal/manley,jdk1.5.0_06). To insert an empty argument, insert a space, i.e., org.objectweb.fractal.deployment.hostserver.Hostname( ).

The java component is a software component. The difference is that it must be deployed on a host. This host might be encapsulated in other software. This is not the case here. The host is 'host1' and is defined by the line <component name="host" definition="./host1/host"/>. To change hosts, the host1 value must be changed, i.e., definition="./XXX/host" stays the same, only XXX changes. The value of name cannot be changed; it must remain as name="host". This line actually means that the component host of java is the same as the component host defined higher in the main ADL.

There is no host for EJB being deployed on JOnAS, but the JOnAS software on which the EJB is deployed must be declared. This JOnAS software component has been deployed on a host before and gives this information to the EJB. The line seen on the upper paragraph becomes <component name="jonas" definition="./jonasName/jonas"/>. The jonasName stands for the name of the JOnAS component like host1 stands for the java1 host.

For software and functions, the host or the host software is mandatory. It is excluded for host definitions.

The binding components area

The components that have just been declared must be binded with the FDF application. It allows control of the order in which they will be deployed. This is important because it may be desirable to deploy Java before deploying JOnAS.

Here is an example of the main binding components area:

  <binding client="runner.deployment-01" server="java.deployment"/>
  <binding client="runner.deployment-02" server="jonas1.deployment"/>
  <binding client="runner.deployment-03" server="eb.deployment"/>
  <binding client="runner.deployment-04" server="jonas_client1.deployment"/>
  <binding client="runner.deployment-05" server="jonas_client2.deployment"/>
	

The example binds a client with a server. The client is the FDF application (component runner). The 'deployment' is the type of the client binding. The number after 'deployment' is the order in which to bind (and deploy) the component. On the server side the component has a name defined in the component definition area. That component is of type 'deployment' (after the dot).

The four phases

The Fractal Deployment Framework is divided into four phases: install, start, stop and uninstall. Each component of software or function has these four phases. It is possible to execute one phase from the command line. All sub ADLs are executed in their order. For example, for the install phase, all components are installed from number one to number N. All phases are independent except for variables setting and unsetting. The value before setting is saved (normally start) and is restored at the unsetting (normally stop).

The install phase uploads the binaries and unzips them. The start phase sets variables and starts the application. The stop phase stops the application and unsets the variables. The uninstall phase removes the unzipped directory and removes uploaded files.

To execute the FDF application

To execute the FDF application on a Linux machine, go to the ${JONAS_HOME}/bin/unix or %JONAS_HOME%\bin\nt home directory and execute the following:

>fdf launcher Main install
		

The launcher means that the application is launched. Main is the name of the main ADL. It can be any valid main ADL name. The last argument is the phase to be executed, i.e., install (install - start - stop - uninstall).

Several phases can be executed, one after the other:

>fdf launcher Main install start
		

This will execute install and start on the Main main ADL. All four phases can be executed like this but the order of the phase arguments (i.e., install ans start) has no importance.

A directory can be defined where the main ADL resides. To do that, use the -cp option:

>fdf launcher -cp ~/dir1/dir2 Main install start
		

Or directly insert the directory as follows:

>fdf launcher /dir1/dir2/Main install start
		

Or for Windows:

>fdf launcher c:\dir1\dir2\Main install start
		

2. Sub ADL (hosts - software and function)

The sub ADLs are composed of a name, a definition ADL, and parameters ADLs. The name can be chosen as desired (but must be unique) and all links to this component must be spelled the same way. The sub ADL definitions are listed below with their parameters.

The parameters ADLs are mandatory unless specified otherwise.

org.objectweb.fractal.deployment.hostserver.Host

This is the host definition. A host component is a reification of a host machine and contains its user parameters (login and password), host name, temporary directory where files are uploaded, upload protocol, and shell.

parameters ADL(s) argument(s) comments
user - org.objectweb.fractal.deployment.hostserver.InsertUser
a prompt will be displayed for the login and password

- org.objectweb.fractal.deployment.hostserver.DeclareUser
the login, password and private key will be passed by argument
- none for first ADL

- login, password and private key for the second
user password and login

for the second ADL login is mandatory and one among password and private key is mandatory.
hostname org.objectweb.fractal.deployment.hostserver.Hostname host name host name
tmpdir org.objectweb.fractal.deployment.hostserver.TmpDir tmpDir temporary directory where the files are uploaded (see upload)
upload - org.objectweb.fractal.deployment.hostserver.HTTP (http)
- org.objectweb.fractal.deployment.hostserver.FTP (ftp)
- org.objectweb.fractal.deployment.hostserver.SCP (scp)
none upload protocol
protocol - org.objectweb.fractal.deployment.hostserver.SSH (ssh) - org.objectweb.fractal.deployment.hostserver.Telnet (telnet) (see org.objectweb.fractal.exit.Exit) none distant protocol
shell - org.objectweb.fractal.deployment.hostserver.SH (sh)
- org.objectweb.fractal.deployment.hostserver.CSH (csh)
- org.objectweb.fractal.deployment.hostserver.WIN (windows)
none the shell of the host
<component name="host2"  definition="org.objectweb.fractal.deployment.hostserver.Host">
  <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
  <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(singha.lifl.fr)"/>
  <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/tmp)"/>
  <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.FTP"/>
  <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
  <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.CSH"/>
</component>

<component name="host3"  definition="org.objectweb.fractal.deployment.hostserver.Host">
  <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.DeclareUser(manley,XXXXX, )"/>
  <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(tecate)"/>
  <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/var/www)"/>
  <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.HTTP"/>
  <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
  <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.SH"/>
</component>
	   

org.objectweb.fractal.deployment.java.Java

This component defines a java software. It copies binaries on the host, unzips them (install), modifies JAVA_HOME and PATH variables (start), resets the JAVA_HOME and PATH variables (stop), and removes the binaries and the unzipped directory (uninstall). After start, java software is ready to be used.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
src org.objectweb.fractal.deployment.jonas.Src source directory source directory
filename org.objectweb.fractal.deployment.jonas.Filename source file name source file name
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
The but last directory can be any valid directory. The last directory depends on the source binary (unzipping that binary creates a directory)
<component name="java1" definition="org.objectweb.fractal.deployment.java.Java">
  <component name="host"        definition="./host1/host"/>
  <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Java)"/>
  <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jdk1.5.0_06.tar)"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,jdk1.5.0_06)"/>
</component>
	   

org.objectweb.fractal.deployment.java.Java_no_Install

This component defines a java software. It modifies JAVA_HOME and PATH variables (start), resets the JAVA_HOME and PATH variables (stop). After start, java software is ready to be used.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
These two arguments must correspond to where the software has been installed.
<component name="java1" definition="org.objectweb.fractal.deployment.java.Java_no_Install">
  <component name="host"        definition="./host1/host"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,jdk1.5.0_06)"/>
</component>
	   

org.objectweb.fractal.deployment.ant.Ant

This component defines an ant software. It copies binaries on the host, unzips them (install), modifies ANT_HOME and PATH variables (start), resets the ANT_HOME and PATH variables (stop), and removes the binaries and the unzipped directory (uninstall). After start, ant software is ready to be used.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
src org.objectweb.fractal.deployment.jonas.Src source directory source directory
filename org.objectweb.fractal.deployment.jonas.Filename source file name source file name
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
The but last directory can be any valid directory. The last directory depends on the source binary (unzipping that binary creates a directory)
<component name="ant" definition="org.objectweb.fractal.deployment.ant.Ant">
  <component name="host"        definition="./host1/host"/>
  <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Ant)"/>
  <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(apache-ant-1.6.5-bin.tar.gz)"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,apache-ant-1.6.5)"/>
</component>
	   

org.objectweb.fractal.deployment.ant.Ant_no_Install

This component defines an ant software. It modifies ANT_HOME and PATH variables (start), resets the ANT_HOME and PATH variables (stop). After start, ant software is ready to be used.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
These two arguments must correspond to where the software has been installed.
<component name="ant" definition="org.objectweb.fractal.deployment.ant.Ant_no_Install">
  <component name="host"        definition="./host1/host"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,apache-ant-1.6.5)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.HSQL

This component defines an HSQL database software that can be used for JOnAS. It copies binaries on the host, unzips them (install), modifies HSQL_ROOT and PATH variables (start), resets the HSQL_ROOT and PATH variables (stop), and removes the binaries and the unzipped directory (uninstall). After start, HSQL software is ready to be used.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
src org.objectweb.fractal.deployment.jonas.Src source directory source directory
filename org.objectweb.fractal.deployment.jonas.Filename source file name source file name
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
The but last directory can be any valid directory. The last directory depends on the source binary (unzipping that binary creates a directory)
<component name="hsql" definition="org.objectweb.fractal.deployment.jonas.HSQL">
  <component name="host"        definition="./host1/host"/>
  <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
  <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(hsqldb_1_8_0_4.tar)"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,hsqldb)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.HSQL_no_Install

This component defines an HSQL database software that can be used for JOnAS. It modifies HSQL_ROOT and PATH variables (start), resets the HSQL_ROOT and PATH variables (stop). After start, HSQL software is ready to be used.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
These two arguments must correspond to where the software has been installed.
<component name="hsql" definition="org.objectweb.fractal.deployment.jonas.HSQL_no_Install">
  <component name="host"        definition="./host1/host"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,hsqldb)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.SetJonasbase

This component sets the JONAS_BASE variable on the host machine (start). It gets unset by stop.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
jonasBase org.objectweb.fractal.deployment.jonas.JonasBase JOnAS base JOnAS base directory
<component name="jonas_base1" definition="org.objectweb.fractal.deployment.jonas.SetJonasbase">
  <component name="host"      definition="./host1/host"/>
  <component name="jonasbase" definition="org.objectweb.fractal.deployment.jonas.JonasBase(/home/goal/manley/JONAS_4_7_1)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.Autoload

Copies an EJB client in the JOnAS autoload directory. In uninstall, the uploaded binaries in temporary location are removed.

parameters ADL(s) argument(s) comments
jonas ./XXX/jonas none XXX is the JOnAS component on which it is deployed.
src org.objectweb.fractal.deployment.jonas.Src source directory source directory
filename org.objectweb.fractal.deployment.jonas.Filename source file name source file name
<component name="autoload" definition="org.objectweb.fractal.deployment.jonas.Autoload">
  <component name="jonas"     definition="./jonas1/jonas"/>
  <component name="src"       definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
  <component name="filename"  definition="org.objectweb.fractal.deployment.jonas.Filename(eb.jar)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.Jonas

This component defines a JOnAS software. It copies binaries on the host, unzips them (install), modifies JONAS_ROOT and PATH variables, and starts the application (start), stops the application, resets the JONAS_ROOT and PATH variables (stop), and removes the binaries and the unzipped directory (uninstall). After start, JOnAS software is ready to be used.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
src org.objectweb.fractal.deployment.jonas.Src source directory source directory
filename org.objectweb.fractal.deployment.jonas.Filename source file name source file name
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
The but last directory can be any valid directory. The last directory depends on the source binary (unzipping that binary creates a directory)
name org.objectweb.fractal.deployment.jonas.Name JOnAS name the name of the JOnAS execution (optional)
domain org.objectweb.fractal.deployment.jonas.Domain JOnAS domain the domain of the JOnAS execution (optional)
<component name="jonas1" definition="org.objectweb.fractal.deployment.jonas.Jonas">
  <component name="host"        definition="./host1/host"/>
  <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
  <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-tomcat5.5.12.tgz)"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  <component name="name"        definition="org.objectweb.fractal.deployment.jonas.Name(name)"/>
  <component name="domain"      definition="org.objectweb.fractal.deployment.jonas.Domain(domain)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.Jonas_no_Install

This component defines a JOnAS software. It copies binaries on the host, unzips them (install), modifies JONAS_ROOT and PATH variables, and starts the application (start), stops the application, resets the JONAS_ROOT and PATH variables (stop), and removes the binaries and the unzipped directory (uninstall). After start, JOnAS software is ready to be used.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
These two arguments must correspond to where the software has been installed.
name org.objectweb.fractal.deployment.jonas.Name JOnAS name the name of the JOnAS execution (optional)
domain org.objectweb.fractal.deployment.jonas.Domain JOnAS domain the domain of the JOnAS execution (optional)
<component name="jonas1" definition="org.objectweb.fractal.deployment.jonas.Jonas_no_Install">
  <component name="host"        definition="./host1/host"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  <component name="name"        definition="org.objectweb.fractal.deployment.jonas.Name(name)"/>
  <component name="domain"      definition="org.objectweb.fractal.deployment.jonas.Domain(domain)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.Load_Client

This component defines an EJB on a JOnAS software. It copies binaries on the host, unzips them (install), executes the SQL script (start), and removes the binaries and the unzipped files (uninstall). After start, the EJB and its HSQL database are ready.

parameters ADL(s) argument(s) comments
jonas ./XXX/jonas none XXX is the JOnAS component on which it is deployed.
src org.objectweb.fractal.deployment.jonas.Src source directory source directory
filename org.objectweb.fractal.deployment.jonas.Filename source file name source file name
src2 org.objectweb.fractal.deployment.jonas.Src source directory source directory of the ejb
filename2 org.objectweb.fractal.deployment.jonas.Filename source file name source file name of the ejb
sqltool org.objectweb.fractal.deployment.jonas.SqlTool rc sql tool rc sql tool
sqlfile org.objectweb.fractal.deployment.jonas.SqlFile sql file to execute sql file to execute
<component name="eb" definition="org.objectweb.fractal.deployment.jonas.Load_Client">
  <component name="jonas"     definition="./jonas1/jonas"/>
  <component name="src"       definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
  <component name="filename"  definition="org.objectweb.fractal.deployment.jonas.Filename(Jonas.tar)"/>
  <component name="src2"      definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
  <component name="filename2" definition="org.objectweb.fractal.deployment.jonas.Filename(eb.jar)"/>
  <component name="sqltool"   definition="org.objectweb.fractal.deployment.jonas.SqlTool(sqltool.rc)"/>
  <component name="sqlfile"   definition="org.objectweb.fractal.deployment.jonas.SqlFile(Accounthsqldb.sql)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.Jonas_jclient

Simulates a client call on the JOnAS software (start).

parameters ADL(s) argument(s) comments
jonas ./XXX/jonas none XXX is the JOnAS component on which it is deployed.
execclient org.objectweb.fractal.deployment.jonas.ExecClient jclient command jclient command to be executed on JOnAS software. The jclient name must be excluded from the command.
<component name="jonas_client1" definition="org.objectweb.fractal.deployment.jonas.Jonas_jclient">
  <component name="jonas"      definition="./jonas1/jonas"/>
  <component name="execclient" definition="org.objectweb.fractal.deployment.jonas.ExecClient(eb.ClientAccount AccountImplHome)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.CopyNonZip

Copies a non zipped (doesn't unzip the file) file to a specific location at start. At stop, the temporary file is removed.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
src org.objectweb.fractal.deployment.jonas.Src source directory source directory
filename org.objectweb.fractal.deployment.jonas.Filename source file name source file name
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
The but last directory can be any valid directory. The last directory depends on the source binary (unzipping that binary creates a directory).
<component name="copy" definition="org.objectweb.fractal.deployment.jonas.CopyNonZip">
  <component name="host"        definition="./host1/host"/>
  <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
  <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(hsqldb_1_8_0_4.tar)"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal,manley)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.CopyZip

Copies a zipped file to a specific location and unzips it at start. At stop, the temporary file is removed.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
src org.objectweb.fractal.deployment.jonas.Src source directory source directory
filename org.objectweb.fractal.deployment.jonas.Filename source file name source file name
destination org.objectweb.fractal.deployment.jonas.Destination (two) destination but last directory and the last directory destination directory.
The but last directory can be any valid directory. The last directory depends on the source binary (unzipping that binary creates a directory).
<component name="copy" definition="org.objectweb.fractal.deployment.jonas.CopyZip">
  <component name="host"        definition="./host1/host"/>
  <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
  <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(hsqldb_1_8_0_4.tar)"/>
  <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal,manley"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.Jonas_runner

Starts JOnAS at start time and stops JOnAS at stop. Caution: the JONAS_ROOT and PATH variables must be set first (they are assigned default values between phases launched by different command scripts). This is not done in this ADL but it is done in org.objectweb.fractal.deployment.jonas.Jonas_no_Install.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
<component name="runner1" definition="org.objectweb.fractal.deployment.jonas.Jonas_runner">
  <component name="host"        definition="./host1/host"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.SetVariable

Sets the environment variable at start and unsets it at stop.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
var org.objectweb.fractal.deployment.jonas.Variable variable the name of the variable
value org.objectweb.fractal.deployment.jonas.Value value the value of the variable
<component name="var1" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
  <component name="host"        definition="./host1/host"/>
  <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_HOME)"/>
  <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/manley/apache-tomcat-5.5.12)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.Jclusterd

Starts cluster daemon of the JOnAS application (that is deployed on a host) at start, and stops it at stop.

parameters ADL(s) argument(s) comments
jonas ./XXX/jonas none XXX is the JOnAS component on which it is deployed.
args org.objectweb.fractal.deployment.jonas.Arguments arguments list of arguments (separated by a space) given to cluster daemon.
<component name="jclusterd" definition="org.objectweb.fractal.deployment.jonas.Jclusterd">
  <component name="jonas"      definition="./jonas1/jonas"/>
  <component name="args"       definition="org.objectweb.fractal.deployment.jonas.Arguments(arg1 arg2 arg3)"/>
</component>
	   

org.objectweb.fractal.deployment.jonas.GetLogs

At start time it copies all the log files of the JOnAS application to a defined directory on the local machine.

parameters ADL(s) argument(s) comments
jonas ./XXX/jonas none XXX is the JOnAS component on which it is deployed.
logsdir org.objectweb.fractal.deployment.jonas.LogsDir local directory local directory where the log files are copied.
<component name="logs" definition="org.objectweb.fractal.deployment.jonas.GetLogs">
  <component name="jonas"   definition="./jonas1/jonas"/>
  <component name="logsdir" definition="org.objectweb.fractal.deployment.jonas.LogsDir(/home/manley/tmp)"/>
</component>
	   

org.objectweb.fractal.deployment.exit.Exit

This component exits the protocol. It isn't bound on the deployment interface of runner but on the exit interface of runner as shown below. It is necessary if the number of connections on the protocol is limited.

parameters ADL(s) argument(s) comments
host ./XXX/host none XXX is the host component on which it is deployed.
  <component name="exit1"   definition="org.objectweb.fractal.deployment.exit.Exit">
    <component name="host"        definition="./host1/host"/>
  </component>

  <!-- add exit command to the runner -->
  <binding client="runner.exit" server="exit1.command"/>
	   

3. Full examples of a main ADL

Here are some examples of main ADLs. The file in which there are set must have the same name and the .fractal extension. For example, the first one is called myMain. Main ADLs must be set in the $JONAS_ROOT/conf/fdf directory.

Example Main with JOnAS, JONAS_BASE on a single host

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" "classpath://org/objectweb/fractal/adl/xml/standard.dtd">

<definition name="myMain">

  <interface name="r" signature="org.objectweb.fractal.deployment.util.RunnableArg" role="server"/>

  <component name="runner" definition="org.objectweb.fractal.deployment.util.Runner"/>


<!-- HOST -->

  <component name="host1"  definition="org.objectweb.fractal.deployment.hostserver.Host">
    <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
    <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(tecate)"/>
    <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/tmp)"/>
    <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.FTP"/>
    <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
    <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.SH"/>
  </component>



<!--  JAVA  -->


  <component name="java1" definition="org.objectweb.fractal.deployment.java.Java">
    <component name="host"        definition="./host1/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Java)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jdk1.5.0_06.tar)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,jdk1.5.0_06)"/>
  </component>




<!--  JOnAS  -->

  <component name="var11" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_HOME)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/apache-tomcat-5.5.12)"/>
  </component>

  <component name="var21" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="var31" definition="org.objectweb.fractal.deployment.jonas.SetJonasbase">
    <component name="host"        definition="./host1/host"/>
    <component name="jonasbase"   definition="org.objectweb.fractal.deployment.jonas.JonasBase(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="jonas11" definition="org.objectweb.fractal.deployment.jonas.Jonas">
    <component name="host"        definition="./host1/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-bin.tgz)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  </component>


<!--  END -->


  <binding client="this.r" server="runner.r"/>

  <binding client="runner.deployment-01" server="java1.deployment"/>
  <binding client="runner.deployment-02" server="var11.deployment"/>
  <binding client="runner.deployment-03" server="var21.deployment"/>
  <binding client="runner.deployment-04" server="var31.deployment"/>
  <binding client="runner.deployment-05" server="jonas11.deployment"/>


</definition>
			

Example Main with JOnAS and JONAS_BASE on a cluster of two hosts

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" "classpath://org/objectweb/fractal/adl/xml/standard.dtd">

<definition name="The2Hosts">

  <interface name="r" signature="org.objectweb.fractal.deployment.util.RunnableArg" role="server"/>

  <component name="runner" definition="org.objectweb.fractal.deployment.util.Runner"/>


<!-- HOST -->

  <component name="host1"  definition="org.objectweb.fractal.deployment.hostserver.Host">
    <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
    <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(tecate)"/>
    <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/tmp)"/>
    <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.FTP"/>
    <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
    <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.SH"/>
  </component>


  <component name="host2"  definition="org.objectweb.fractal.deployment.hostserver.Host">
    <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
    <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(singha)"/>
    <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/tmp)"/>
    <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.FTP"/>
    <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
    <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.CSH"/>
  </component>


<!--  JAVA  -->


  <component name="java1" definition="org.objectweb.fractal.deployment.java.Java">
    <component name="host"        definition="./host1/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Java)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jdk1.5.0_06.tar)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,jdk1.5.0_06)"/>
  </component>


  <component name="java2" definition="org.objectweb.fractal.deployment.java.Java">
    <component name="host"        definition="./host2/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Java)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jdk1.5.0_06.tar)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,jdk1.5.0_06)"/>
  </component>


<!--  JOnAS  -->

  <component name="var11" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_HOME)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/apache-tomcat-5.5.12)"/>
  </component>

  <component name="var21" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="var31" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(JONAS_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="jonas11" definition="org.objectweb.fractal.deployment.jonas.Jonas">
    <component name="host"        definition="./host1/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-bin.tgz)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  </component>


  <component name="var12" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host2/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_HOME)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/apache-tomcat-5.5.12)"/>
  </component>

  <component name="var22" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host2/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="var32" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host2/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(JONAS_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="jonas12" definition="org.objectweb.fractal.deployment.jonas.Jonas">
    <component name="host"        definition="./host2/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-bin.tgz)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  </component>


<!--  END -->


  <binding client="this.r" server="runner.r"/>

  <binding client="runner.deployment-01" server="java1.deployment"/>
  <binding client="runner.deployment-02" server="var11.deployment"/>
  <binding client="runner.deployment-03" server="var21.deployment"/>
  <binding client="runner.deployment-04" server="var31.deployment"/>
  <binding client="runner.deployment-05" server="jonas11.deployment"/>
  <binding client="runner.deployment-06" server="java2.deployment"/>
  <binding client="runner.deployment-07" server="var12.deployment"/>
  <binding client="runner.deployment-08" server="var22.deployment"/>
  <binding client="runner.deployment-09" server="var32.deployment"/>
  <binding client="runner.deployment-10" server="jonas12.deployment"/>

</definition>
			

Example Main with JOnAS, JONAS_BASE and Jclustered on a cluster of two hosts

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" "classpath://org/objectweb/fractal/adl/xml/standard.dtd">

<definition name="Main">

  <interface name="r" signature="org.objectweb.fractal.deployment.util.RunnableArg" role="server"/>

  <component name="runner" definition="org.objectweb.fractal.deployment.util.Runner"/>


<!-- HOST -->

  <component name="host1"  definition="org.objectweb.fractal.deployment.hostserver.Host">
    <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
    <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(tecate)"/>
    <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/tmp)"/>
    <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.FTP"/>
    <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
    <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.SH"/>
  </component>


  <component name="host2"  definition="org.objectweb.fractal.deployment.hostserver.Host">
    <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
    <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(singha)"/>
    <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/tmp)"/>
    <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.FTP"/>
    <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
    <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.CSH"/>
  </component>


<!--  JAVA  -->


  <component name="java1" definition="org.objectweb.fractal.deployment.java.Java">
    <component name="host"        definition="./host1/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Java)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jdk1.5.0_06.tar)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,jdk1.5.0_06)"/>
  </component>


  <component name="java2" definition="org.objectweb.fractal.deployment.java.Java">
    <component name="host"        definition="./host2/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Java)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jdk1.5.0_06.tar)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,jdk1.5.0_06)"/>
  </component>


<!--  JOnAS  -->

  <component name="var11" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_HOME)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/apache-tomcat-5.5.12)"/>
  </component>

  <component name="var21" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="var31" definition="org.objectweb.fractal.deployment.jonas.SetJonasbase">
    <component name="host"        definition="./host1/host"/>
    <component name="jonasbase"   definition="org.objectweb.fractal.deployment.jonas.JonasBase(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="jonas11" definition="org.objectweb.fractal.deployment.jonas.Jonas">
    <component name="host"        definition="./host1/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-bin.tgz)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  </component>


 <component name="jclusterd1" definition="org.objectweb.fractal.deployment.jonas.Jclusterd">
    <component name="jonas"      definition="./jonas11/jonas"/>
    <component name="args"       definition="org.objectweb.fractal.deployment.jonas.Arguments( )"/>
  </component>


  <component name="var12" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host2/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_HOME)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/apache-tomcat-5.5.12)"/>
  </component>

  <component name="var22" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host2/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="var32" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host2/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(JONAS_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>

  <component name="jonas12" definition="org.objectweb.fractal.deployment.jonas.Jonas">
    <component name="host"        definition="./host2/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-bin.tgz)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  </component>


 <component name="jclusterd2" definition="org.objectweb.fractal.deployment.jonas.Jclusterd">
    <component name="jonas"      definition="./jonas12/jonas"/>
    <component name="args"       definition="org.objectweb.fractal.deployment.jonas.Arguments( )"/>
  </component>

<!--  END -->


  <binding client="this.r" server="runner.r"/>

  <binding client="runner.deployment-01" server="java1.deployment"/>
  <binding client="runner.deployment-02" server="var11.deployment"/>
  <binding client="runner.deployment-03" server="var21.deployment"/>
  <binding client="runner.deployment-04" server="var31.deployment"/>
  <binding client="runner.deployment-05" server="jonas11.deployment"/>
  <binding client="runner.deployment-06" server="jclusterd1.deployment"/>
  <binding client="runner.deployment-07" server="java2.deployment"/>
  <binding client="runner.deployment-08" server="var12.deployment"/>
  <binding client="runner.deployment-09" server="var22.deployment"/>
  <binding client="runner.deployment-10" server="var32.deployment"/>
  <binding client="runner.deployment-11" server="jonas12.deployment"/>
  <binding client="runner.deployment-12" server="jclusterd2.deployment"/>

</definition>
			

Deploying a correction patch with start and stop of JOnAS

To stop JOnAS, the stop phase must be launched, and to copy the path and start JOnAS, the start phase must be launched.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" "classpath://org/objectweb/fractal/adl/xml/standard.dtd">

<definition name="Main">

  <interface name="r" signature="org.objectweb.fractal.deployment.util.RunnableArg" role="server"/>

  <component name="runner" definition="org.objectweb.fractal.deployment.util.Runner"/>


<!-- HOST -->

  <component name="host1"  definition="org.objectweb.fractal.deployment.hostserver.Host">
    <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
    <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(tecate)"/>
    <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/tmp)"/>
    <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.FTP"/>
    <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
    <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.SH"/>
  </component>


<!--  JOnAS  -->

  <component name="copy" definition="org.objectweb.fractal.deployment.jonas.CopyZip">
    <component name="host"        definition="./host1/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-bin.tgz)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley, )"/>
  </component>

  <component name="runner1" definition="org.objectweb.fractal.deployment.jonas.Jonas_no_Install">
    <component name="host"        definition="./host1/host"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  </component>

<!--  END -->

  <binding client="this.r" server="runner.r"/>

  <binding client="runner.deployment-01" server="copy.deployment"/>
  <binding client="runner.deployment-02" server="runner1.deployment"/>

</definition>
			

Getting logs from a clustered host

To get logs from a JOnAS execution it is necessary to have the JOnAS component in the main ADL.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" "classpath://org/objectweb/fractal/adl/xml/standard.dtd">

<definition name="Main">

  <interface name="r" signature="org.objectweb.fractal.deployment.util.RunnableArg" role="server"/>

  <component name="runner" definition="org.objectweb.fractal.deployment.util.Runner"/>


<!-- HOST -->

  <component name="host1"  definition="org.objectweb.fractal.deployment.hostserver.Host">
    <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
    <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(tecate)"/>
    <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/tmp)"/>
    <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.FTP"/>
    <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
    <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.SH"/>
  </component>


<!--  JOnAS  -->

 <component name="var1" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_HOME)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/apache-tomcat-5.5.12)"/>
  </component>

  <component name="var2" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>


  <component name="copy" definition="org.objectweb.fractal.deployment.jonas.CopyZip">
    <component name="host"        definition="./host1/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-bin.tgz)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley, )"/>
  </component>

  <component name="jonas1" definition="org.objectweb.fractal.deployment.jonas.Jonas_no_Install">
    <component name="host"        definition="./host1/host"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  </component>

 <component name="logs" definition="org.objectweb.fractal.deployment.jonas.GetLogs">
    <component name="jonas"   definition="./jonas1/jonas"/>
    <component name="logsdir" definition="org.objectweb.fractal.deployment.jonas.LogsDir(/home/manley/tmp)"/>
  </component>

<!--  END -->

  <binding client="this.r" server="runner.r"/>

  <binding client="runner.deployment-01" server="var1.deployment"/>
  <binding client="runner.deployment-02" server="var2.deployment"/>
  <binding client="runner.deployment-03" server="copy.deployment"/>
  <binding client="runner.deployment-04" server="jonas1.deployment"/>
  <binding client="runner.deployment-05" server="logs.deployment"/>

</definition>
			

Example with SSH and SCP

To get logs from a JOnAS execution, it is necessary to have the JOnAS component in the main ADL.

<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" "classpath://org/objectweb/fractal/adl/xml/standard.dtd">

<definition name="Main">

  <interface name="r" signature="org.objectweb.fractal.deployment.util.RunnableArg" role="server"/>

  <component name="runner" definition="org.objectweb.fractal.deployment.util.Runner"/>


<!-- HOST -->

  <component name="host1"  definition="org.objectweb.fractal.deployment.hostserver.Host">
    <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
    <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(tecate)"/>
    <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(/tmp)"/>
    <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.SCP"/>
    <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.SSH"/>
    <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.SH"/>
  </component>


<!--  JOnAS  -->

 <component name="var1" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_HOME)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/apache-tomcat-5.5.12)"/>
  </component>

  <component name="var2" definition="org.objectweb.fractal.deployment.jonas.SetVariable">
    <component name="host"        definition="./host1/host"/>
    <component name="var"         definition="org.objectweb.fractal.deployment.jonas.Variable(CATALINA_BASE)"/>
    <component name="value"       definition="org.objectweb.fractal.deployment.jonas.Value(/home/goal/manley/JONAS_4_8_0)"/>
  </component>


  <component name="copy" definition="org.objectweb.fractal.deployment.jonas.CopyZip">
    <component name="host"        definition="./host1/host"/>
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-bin.tgz)"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley, )"/>
  </component>

  <component name="jonas1" definition="org.objectweb.fractal.deployment.jonas.Jonas_no_Install">
    <component name="host"        definition="./host1/host"/>
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(/home/goal/manley,JONAS_4_8_0)"/>
  </component>

 <component name="logs" definition="org.objectweb.fractal.deployment.jonas.GetLogs">
    <component name="jonas"   definition="./jonas1/jonas"/>
    <component name="logsdir" definition="org.objectweb.fractal.deployment.jonas.LogsDir(/home/manley/tmp)"/>
  </component>

<!--  END -->

  <binding client="this.r" server="runner.r"/>

  <binding client="runner.deployment-01" server="var1.deployment"/>
  <binding client="runner.deployment-02" server="var2.deployment"/>
  <binding client="runner.deployment-03" server="copy.deployment"/>
  <binding client="runner.deployment-04" server="jonas1.deployment"/>
  <binding client="runner.deployment-05" server="logs.deployment"/>

</definition>
			

Example with Windows and Telnet

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" "classpath://org/objectweb/fractal/adl/xml/standard.dtd">

<definition name="Win_Telnet">

  <interface name="r" signature="org.objectweb.fractal.deployment.util.RunnableArg" role="server"/>

  <component name="runner" definition="org.objectweb.fractal.deployment.util.Runner"/>


<!-- HOST -->

  <!-- defines the host name="hostname" -->
  <component name="host1"  definition="org.objectweb.fractal.deployment.hostserver.Host">
    <!-- user and password are inserted by popups windows -->
    <component name="user"     definition="org.objectweb.fractal.deployment.hostserver.InsertUser"/>
	 <!-- distant hostname by default tecate -->
    <component name="hostname" definition="org.objectweb.fractal.deployment.hostserver.Hostname(gueuze)"/>
    <!-- distant temporary directory by default /tmp -->
    <component name="tmpdir"   definition="org.objectweb.fractal.deployment.hostserver.TmpDir(c:/Temp)"/>
    <!-- upload protocol to distant machine choice is FTP, SCP and HTTP by default FTP -->
    <!-- for HTTP the distant machine must be configurated for upload -->
    <component name="upload"   definition="org.objectweb.fractal.deployment.hostserver.FTP"/>
    <!-- distant protocol connextion choice SSH, Telnet by default Telnet -->
    <component name="protocol" definition="org.objectweb.fractal.deployment.hostserver.Telnet"/>
    <!-- shell used by distant machine choice SH, CSH, WIN by default WIN -->
    <component name="shell"    definition="org.objectweb.fractal.deployment.hostserver.WIN"/>
  </component>


<!--  JONAS  -->




  <!-- the jonas component (named by default jonas1) to be deployed -->
  <component name="jonas1" definition="org.objectweb.fractal.deployment.jonas.Jonas">
    <!-- to be deployed on the host by default host1 -->
    <component name="host"        definition="./host1/host"/>
    <!-- directory of the source files on the local machine by default /home/manley/FDF-librairy/Jonas -->
    <component name="src"         definition="org.objectweb.fractal.deployment.jonas.Src(/home/manley/FDF-librairy/Jonas)"/>
    <!-- name of the zipped source file by default jonas4.8.0-bin.zip -->
    <component name="filename"    definition="org.objectweb.fractal.deployment.jonas.Filename(jonas4.8.0-bin.zip)"/>
    <!-- destination directory, the directory but last and the last directory -->
    <!-- the directory but last can be any valid directory by default /home/goal/manley -->
    <!-- the last directory depends on the zip file here by default it is c:\Temp\JONAS_4_8_0 -->
    <component name="destination" definition="org.objectweb.fractal.deployment.jonas.Destination(c:\\Temp,JONAS_4_8_0)"/>
  </component>


  <!-- exit command for telnet -->
  <component name="exit1"   definition="org.objectweb.fractal.deployment.exit.Exit">
    <!-- to be deployed on the host by default host1 -->
    <component name="host"        definition="./host1/host"/>
  </component>


<!--  END -->


  <binding client="this.r" server="runner.r"/>

  <!-- add exit command to the runner -->
  <binding client="runner.exit" server="exit1.command"/>

  <!-- bindings of all the components in order to be executed -->
  <binding client="runner.deployment-01" server="jonas1.deployment"/>


</definition>

			

4. Insert FDF in another application

It is possible to insert FDF in another application. The class to bind to the other application is org.objectweb.fractal.deployment.util.Runner. The main ADL describes all the components and all the binding of the Runner class. Therefore it is necessary to include the main ADL and the Runner class in the other project.

The class Runner has two interfaces, Runnable and Run. The interface Run gives two methods: void setArguments(String[] arg) and void run(). The setArguments() method takes a list of phases such as "install", "start", "stop", and "uninstall". The phases that have been inserted in the method will be executed at the next call of run(). To execute install and start, use the following:

setArguments({"install", "start"});
run();
		

and the call of run() will execute these two phases. The order of the phases inserted in setArguments() is of no importance. However, if a new list of phases is inserted, the old one will be removed. If no valid argument has been set, all four phases will be executed.

See the following for an example of binding the FDF to another application in Fractal. First an attribute of type run must be declared.

in a Java component for eg callFDF:

import org.objectweb.fractal.deployment.util.Run;
...

    /**
     * The FDF component.
     *
     * @fractal.bc
     */
    protected Run run;

...
   setArguments({"install"});
   run();
   setArguments({"start"});
   run();
   setArguments({"stop"});
   run();
   setArguments({"uninstall"});
   run();
....

		

Then in an ADL, bind the runner component of the FDF main ADL with callFDF. The runner component must be a shared component (with the main ADL) in the following example:

<component name="runner"      definition="./runner"/>
<binding client="callFDFComponent.run"  server="runner.run"/>
		

5. FDF-Library

The FDF-Library contains binary code that may be deployed on the remote machines.

6. Conclusion

The Fractal Deployment Framework (FDF) has been developed to deploy software on remote machines. For the moment Java, Ant and JOnAS software have been fully implemented and tested. But it is easy to extend the framework to other applications, and other applications are under development.

In comparison to a script, it has the advantage of being tested and to be extended. It is difficult to adapt a script to new software.

The level of complexity of this application can be reduced by further developments and by creating a deployment language that can take over the writing of the main ADL.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster |