—
Plain Text,
1 KB
File contents
# change the number of compute node wanted, to create a eucalyptus cloud of that many nodes
# default : maxnodes = 1 , creates a eucalyptus cloud of 1 compute node
set ns [new Simulator]
source tb_compat.tcl
# nodeA is cloud controller node
set nodeA [$ns node]
tb-set-hardware $nodeA d710
tb-set-node-os $nodeA ub10
tb-set-node-startcmd $nodeA "/share/eucalyptus/eucacc1.sh >& ~/foo.log"
#add nodeA to LAN
set lanstr ""
append lanstr "$nodeA "
# number of compute nodes wanted
set maxnodes 1
# allocate compute nodes and put them in common LAN
for {set i 1} {$i <= $maxnodes} {incr i} {
set node1v($i) [$ns node]
tb-set-hardware $node1v($i) d710
tb-set-node-os $node1v($i) ub10
tb-set-node-startcmd $node1v($i) "/share/eucalyptus/eucanc.sh >& ~/foo1.log"
append lanstr "$node1v($i) "
}
# create LAN
set big-lan [$ns make-lan "$lanstr" 100Mb 0ms]
$ns rtproto Static
# Go!
$ns run