DeterVirtualProject: 4nodes.ns

File 4nodes.ns, 890 bytes (added by liyin, 12 years ago)

The example ns script to install one simple eucalyptus in one experiment

Line 
1set ns [new Simulator]
2source tb_compat.tcl
3
4tb-set-delay-capacity 1
5
6#create nodes
7
8set node1 [$ns node]
9tb-set-node-os $node1 Ubuntu-Xen-904
10
11set node2 [$ns node]
12tb-set-node-os $node2 Ubuntu-Xen-904
13
14set ctl [$ns node]
15tb-set-node-os $ctl  Ubuntu904-unsup
16
17set cli [$ns node]
18tb-set-node-os $cli  Ubuntu904-unsup
19
20set mylan [$ns make-lan "$ctl $node1 $node2 $cli" 1000Mb 0ms]
21$ns rtproto Static
22
23tb-set-sync-server $ctl
24tb-set-node-startcmd $ctl "bash /proj/Virtual/script/eucalyptus_setup/install_ctl.sh node1 node2 >& /tmp/ctl.log "
25tb-set-node-startcmd $node1 "bash /proj/Virtual/script/eucalyptus_setup/install_node.sh >& /tmp/node1.log"
26tb-set-node-startcmd $node2 "bash /proj/Virtual/script/eucalyptus_setup/install_node.sh >& /tmp/node2.log"
27tb-set-node-startcmd $cli "bash /proj/Virtual/script/eucalyptus_setup/install_cli.sh >& /tmp/cli.log"
28
29$ns run