GODIET is a Java-based tool for automatic DIET deployment that manages configuration file creation, staging of files, launch of elements, monitoring and reporting on launch success, and process cleanup when the DIET deployment is no longer needed . The user of GODIET describes the desired deployment in an XML file including all needed external services (e.g., omniNames and LogService); the desired hierarchical organization of agents and servers is expressed directly using the hierarchical organization of XML. The user also defines all machines available for the deployment, disk scratch space available at each site for storage of configuration files, and which machines share the same disk to avoid unecessary copies. GODIET is extremely useful for large deployments (e.g., more than 5 elements) and for experiments where one needs to deploy and shut-down multiple deployments to test different configurations. Note that debugging deployment problems when using GODIET can be difficult, especially if you don't fully understand the role of each element you are launching. If you have trouble identifying the problem, read the rest of this chapter in full and try launching key elements of your deployment by hand. GODIET is available for download on the web10.2.
An example input XML file is shown in Figure 10.1; see  for a full explanation of all entries in the XML. You can also have a look at the fully commented XML example file provided in the GODIET distribution under examples/commented.xml, each option is explained. To launch GODIET for the simple example XML file provided in the GODIET distribution under examples/example1.xml, run:
~ > java -jar GoDIET-x.x.x.jar example1.xml XmlScanner constructor Parsing xml file: example1.xml GoDIET>
GODIET reads the XML file and then enters an interactive console mode. In this mode you have a number of options:
GoDIET> help The following commands are available: launch: launch entire DIET platform launch_check: launch entire DIET platform then check its status relaunch: kill the current platform and launch entire DIET platform once again stop: kill entire DIET platform using kill pid status: print run status of each DIET component history: print history of commands executed help: print this message check: check the platform status stop_check: stop the platform status then check its status before exit exit: exit GoDIET, do not change running platform.
We will now launch this example; note that this example is intentionally very simple with all components running locally to provide initial familiarity with the GODIET run procedure. Deployment with GODIET is especially useful when launching components on multiple remote machines.
GoDIET> launch * Launching DIET platform at Wed Jul 13 09:57:03 CEST 2005 Local scratch directory ready: /home/hdail/tmp/scratch_godiet ** Launching element OmniNames on localHost Writing config file omniORB4.cfg Staging file omniORB4.cfg to localDisk Executing element OmniNames on resource localHost Waiting for 3 seconds after service launch ** Launching element MA_0 on localHost Writing config file MA_0.cfg Staging file MA_0.cfg to localDisk Executing element MA_0 on resource localHost Waiting for 2 seconds after launch without log service feedback ** Launching element LA_0 on localHost Writing config file LA_0.cfg Staging file LA_0.cfg to localDisk Executing element LA_0 on resource localHost Waiting for 2 seconds after launch without log service feedback ** Launching element SeD_0 on localHost Writing config file SeD_0.cfg Staging file SeD_0.cfg to localDisk Executing element SeD_0 on resource localHost Waiting for 2 seconds after launch without log service feedback * DIET launch done at Wed Jul 13 09:57:14 CEST 2005 [time= 11.0 sec]
The status command will print out the run-time status of all launched components. The LaunchState reports whether GODIET observed any errors during the launch itself. When the user requests the launch of LogService in the input XML file, GODIET can connect to the LogService after launching it to obtain the state of launched components; when available, this state is reported in the LogState column.
GoDIET> status Status Element LaunchState LogState Resource PID OmniNames running none localHost 1232 MA_0 running none localHost 1262 LA_0 running none localHost 1296 SeD_0 running none localHost 1329
Finally, when you are done with your DIET deployment you should always run stop. To clean-up each element, GODIET runs a kill operation on the appropriate host using the stored PID of that element.
GoDIET> stop * Stopping DIET platform at Wed Jul 13 10:05:42 CEST 2005 Trying to stop element SeD_0 Trying to stop element LA_0 Trying to stop element MA_0 Trying to stop element OmniNames * DIET platform stopped at Wed Jul 13 10:05:43 CEST 2005[time= 0.0 sec] * Exiting GoDIET. Bye.
One of the main problem when writing a GODIET XML input file is to be compliant with the dtd. A good tool to validate a GODIET file before using GODIET is xmllint. This tool exist on most platforms and with the following command:
$ xmllint your_xml_file --dtdvalid path_to_GoDIET.dtd -nooutyou will see the different lines where there is problem and a clear description of why your XML file is not compliant.