This tutorial demonstrates how to deAfter executing ui-custom-cmd there will be an output to the console with receiving and sending custom commands. Also check output files of tasks.
This tutorial demonstrates how to use DDS in an automated script environment. It shows a complete workflow from starting a DDS session to activating a topology and cleaning up afterwards.
The tutorial is provided as a shell script that automates the entire DDS workflow, making it useful for batch processing, testing, or integration with other automation tools.
After DDS is installed the tutorial can be found in $DDS_LOCATION/tutorials/tutorial3
- run_tutorial3.sh: Main automation script that demonstrates the complete DDS workflow.
Before running the tutorial, you need to configure the script variables:
- Set the
locationvariable to your DDS installation directory - Set the
topologyFilevariable to point to your topology file - Set the
requiredNofAgentsvariable to the number of agents needed for your topology
cd $DDS_LOCATION/tutorials/tutorial3
# Edit run_tutorial3.sh to set proper paths and requirements
./run_tutorial3.shThe automation script performs the following steps:
- Sources DDS environment
- Starts a new DDS session
- Submits the required number of agents using the localhost plug-in
- Waits for agents to come online
- Activates the specified topology
- Runs for a specified duration (configurable)
- Stops the DDS session and cleans up
This tutorial is particularly useful for:
- Automated testing environments
- Batch processing workflows
- Integration with external job schedulers
- Learning the complete DDS command sequenceloy a simple topology of 2 types of tasks (TaskTypeOne and TaskTypeTwo).
By default, there will be deployed one instance of TaskTypeTwo and 5 instances of TaskTypeOne. Additionally TaskTypeTwo subscribes on key-value property from TaskTypeOne, which name is TaskIndexProperty.
Once TaskTypeTwo receives values of TaskIndexProperty from all TaskTypeOne, it will set the ReplyProperty property.
Number of instances can be changed in the topology file (tutorial1_topo.xml) using the--instancesoption of TaskTypeOne. Please note that number of worker nodes in the SSH-plugin configuration file (tutorial1_hosts.cfg) has to be changed accordingly.
After DDS is installed the tutorial can be found in $DDS_LOCATION/tutorials/tutorial1
The source code of tasks is located in <DDS_SRC_DIR>/dds-tutorials/dds-tutorial1
-
task-type-one: executable of the task TaskTypeOne.
-
task-type-two: executable of the task TaskTypeTwo.
-
tutorial1_topo.xml: a topology file.
-
tutorial1_hosts.cfg: a configuration file for DDS SSH plug-in.
Before running the tutorial make sure that:
- Default working directory
~/tmp/dds_wn_testmust exist before running the tutorial. The directory can be changed intutorial1_hosts.cfg. - An SSH passwordless access to the localhost is required.
cd $DDS_LOCATION/tutorials/tutorial1
dds-session start
dds-submit -r ssh -c tutorial1_hosts.cfg
dds-topology --activate tutorial1_topo.xmlTo check the result, change to ~/tmp/dds_wn_test. If the default setup was used, then there will be WN directories located: wn, wn_1, wn_2, wn_3, wn_4, wn_5.
DDS catches output of tasks and saves it in log files under names [task_name]_[date_time]_out|err.log.
For example: TaskTypeOne_2015-07-16-11-44-42_6255430612052815609_out.log
Before running the tutorial make sure that:
- Default working directory
~/tmp/dds_wn_testmust exist before running the tutorial. The directory can be changed intutorial1_hosts.cfg. - An SSH passwordless access to the localhost is required.
cd $DDS_LOCATION/tutorials/tutorial2
dds-session start
dds-submit -r ssh -c tutorial2_hosts.cfg
dds-topology --activate tutorial2_topo.xml
ui-custom-cmdTo check the result, change to ~/tmp/dds_wn_test. If the default setup was used, then there will be WN directories located: wn, wn_1, wn_2, wn_3, wn_4, wn_5.
DDS catches output of tasks and saves it in log files under names [task_name]_[date_time]_out|err.log.
For example: TaskTypeOne_2015-07-16-11-44-42_6255430612052815609_out.log
After executing ui-custom-command there will be an output to the console with receiving and sending custom commands. Also check output files of tasks.