-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts local system, before erase old Put,rm
- Loading branch information
Showing
16 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,46 @@ | ||
use strict; | ||
use Net::SCP qw(scp iscp); | ||
use Net::SSH qw(ssh); | ||
use Log::Dispatch::Syslog; | ||
use Net::SCP; | ||
|
||
# novello 146.48.82.73 | ||
|
||
# novello 146.48.82.73 | ||
# node1 146.48.82.91 node1.novello.isti.cnr.it | ||
# node2 146.48.82.84 | ||
# node3 146.48.82.75 | ||
# node4 146.48.82.76 | ||
# node5 146.48.82.93 | ||
# node5 146.48.82.93 (client) | ||
|
||
my %servers = ( | ||
"node1" => "146.48.82.91", | ||
"node2" => "146.48.82.84", | ||
"node3" => "146.48.82.75", | ||
"node4" => "146.48.82.76", | ||
"node5" => "146.48.82.93" | ||
); | ||
|
||
foreach my $key (keys %servers){ | ||
my $scp = Net::SCP->new( "$key.novello.isti.cnr.it", "aspirantidottori" ); | ||
# $scp->cwd(); | ||
`echo 'java -cp core-1.0-jar-with-dependencies.jar com.dido.pad.PadFsNode -ip $servers{$key} -id $key 146.48.82.91:node1 146.48.82.84:node2' > start.sh`; | ||
`chmod +x start.sh`; | ||
|
||
`echo 'rm /tmp/node*' > eraseData.sh`; | ||
`chmod +x eraseData.sh`; | ||
|
||
$scp->put('eraseData.sh') or die $scp->{errstr}; | ||
|
||
$scp->put('start.sh') or die $scp->{errstr}; | ||
$scp->put("core/target/core-1.0-jar-with-dependencies.jar") or die $scp->{errstr}; | ||
print ("Loaded PadFsNode into $key \n"); | ||
} | ||
|
||
#declare local variables | ||
my $scp; | ||
my $host = "node1.novello.isti.cnr.it"; | ||
my $user = "aspirantidottori"; | ||
my $remotedir = "/home/"; | ||
my $file = "test.txt"; | ||
my $cmd = "/bin/ls"; | ||
my $scp = Net::SCP->new( "node5.novello.isti.cnr.it", "aspirantidottori" ); | ||
#$scp->cwd('luca'); | ||
`echo 'java -cp cli-1.0-jar-with-dependencies.jar com.dido.pad.cli.MainClient -ip 146.48.82.93 -id client 146.48.82.91:node1' > start-client.sh`; | ||
`chmod +x start-client.sh`; | ||
$scp->put('start-client.sh') or die $scp->{errstr}; | ||
$scp->put("cli/target/cli-1.0-jar-with-dependencies.jar") or die $scp->{errstr}; | ||
print ("Loaded Client into node5 \n"); | ||
|
||
######first connect to $host via Net::SSH and run /bin/ls########### | ||
ssh("$user\@$host",$cmd); | ||
`rm start.sh && rm start-client.sh && rm eraseData.sh`` | ||
######first connect to $host via Net::SSH and copy file $file########### | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rm /tmp/node* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
mvn clean -DskipTests=true package | ||
|
||
gnome-terminal -e "java -cp cli/target/cli-1.0-jar-with-dependencies.jar com.dido.pad.cli.MainClient -ip 127.0.0.254 -id client 127.0.0.1:node1" | ||
echo "started Client 127.0.0.254" | ||
|
||
gnome-terminal -e "java -cp core/target/core-1.0-jar-with-dependencies.jar com.dido.pad.PadFsNode -ip 127.0.0.1 -id node1 127.0.0.1:node1" | ||
echo "started node 127.0.0.1" | ||
gnome-terminal -e "java -cp core/target/core-1.0-jar-with-dependencies.jar com.dido.pad.PadFsNode -ip 127.0.0.2 -id node2 127.0.0.1:node1" | ||
echo "started node 127.0.0.2" | ||
gnome-terminal -e "java -cp core/target/core-1.0-jar-with-dependencies.jar com.dido.pad.PadFsNode -ip 127.0.0.3 -id node3 127.0.0.1:node1" | ||
echo "started node 127.0.0.3" | ||
gnome-terminal -e "java -cp core/target/core-1.0-jar-with-dependencies.jar com.dido.pad.PadFsNode -ip 127.0.0.4 -id node4 127.0.0.1:node1" | ||
echo "started node 127.0.0.4" | ||
|