Previous: Partition Attribute ORB_Tasking_Policy, Up: The Configuration Language [Contents][Index]
Almost every keyword and construct defined in the configuration language has been used in the following sample configuration file.
configuration MyConfig is Partition_1 : Partition := (); procedure Master_Procedure is in Partition_1; Partition_2, Partition_3 : Partition; for Partition_2'Host use "foo.bar.com"; function Best_Node (Partition_Name : String) return String; pragma Import (Shell, Best_Node, "best-node"); for Partition_3'Host use Best_Node; Partition_4 : Partition := (RCI_B5); for Partition_1'Directory use "/usr/you/test/bin"; for Partition'Directory use "bin"; procedure Another_Main; for Partition_3'Main use Another_Main; for Partition_3'Reconnection use Block_Until_Restart; for Partition_4'Command_Line use "-v"; for Partition_4'Termination use Local_Termination; pragma Starter (Convention => Ada); pragma Boot_Server (Protocol_Name => "tcp", Protocol_Data => "`hostname`:`unused-port`"); pragma Version (False); begin Partition_2 := (RCI_B2, RCI_B4, Normal); Partition_3 := (RCI_B3); end MyConfig;
po_gnatdist myconfig.cfg
If the user wants to build only some partitions then he will list the partitions to build on the po_gnatdist command line as follows:
po_gnatdist myconfig.cfg partition_2 partition_3
The name of the file prefix must be the same as the name of the configuration unit, in this example myconfig.cfg. The file suffix must be cfg. For a given distributed application the user can have as many different configuration files as desired.
po_gnatdist produces an executable with the name of Master_Procedure which will start the various partitions on their host machines in the background. The main partition is launched in foreground. Note that by killing this main procedure the whole distributed application is terminated.
If no starter is given, then an Ada starter will be used.
In this example, Partition_2, Partitions_3 and Partition_4 will be started from Partition_1 (ie from the Ada procedure Master_Procedure).
Previous: Partition Attribute ORB_Tasking_Policy, Up: The Configuration Language [Contents][Index]