[pkg-kolab] r1416 - pkg-kolab_testsuite
Mathieu Parent
sathieu at alioth.debian.org
Wed Nov 18 19:48:46 UTC 2009
Author: sathieu
Date: 2009-11-18 19:48:46 +0000 (Wed, 18 Nov 2009)
New Revision: 1416
Modified:
pkg-kolab_testsuite/testsuite
Log:
- adding ssh private key to each host to avoid password prompt from one domain to another
- enabling install on slaves, remaining things done
- start daemons after kolab_bootstrap
Modified: pkg-kolab_testsuite/testsuite
===================================================================
--- pkg-kolab_testsuite/testsuite 2009-11-18 19:35:44 UTC (rev 1415)
+++ pkg-kolab_testsuite/testsuite 2009-11-18 19:48:46 UTC (rev 1416)
@@ -315,9 +315,11 @@
domain_make_bootable($domid, $domname);
}
- print "* Copying ssh key";
+ print "* Adding to authorized_keys and copying ssh private key";
system("sudo mkdir -p '$storagepooldir/domains/$domname/disk/root/.ssh'");
system("sudo cp '$storagepooldir/key.pub' '$storagepooldir/domains/$domname/disk/root/.ssh/authorized_keys'");
+ # to avoid password prompt from one domain to another
+ system("sudo cp '$storagepooldir/key' '$storagepooldir/domains/$domname/disk/root/.ssh/id_rsa'");
print ".\n";
domain_post_chroot($domid, $domname);
@@ -421,11 +423,6 @@
my $domname = shift;
my $domip = domain_ip($domid, $domname);
- if($domid != 0) {
- print "* Installing slaves is not supported yet\n";
- return;
- }
-
print "* Copying /etc/hosts file:\n";
my $hosts = hosts_file();
system("ssh -i '".$config{'storagepooldir'}."/key' root\@$domip 'cat <<EOF > /etc/hosts
@@ -695,7 +692,19 @@
],
#Are you sure you want to continue connecting (yes/no)?
#root at kolab_test_master.local.tld's password:
- #Do you want to create a certificate request and sign it [y] (y/n):
+ [
+ qr'Do you want to create a certificate request and sign it \[y\] \(y/n\): $',
+ sub {
+ my $fh = shift;
+ if( $step == 7 ) {
+ $fh->send("y\n");
+ $step = 14 + $config{'slave_count'};
+ return exp_continue;
+ } else {
+ print "Step is $step (should be 7)\n";
+ }
+ },
+ ],
#root at kolab_test_master.local.tld's password:
#root at kolab_test_master.local.tld's password:
# >> slave only
@@ -746,6 +755,14 @@
# >> slave only
);
+ system("ssh -i '".$config{'storagepooldir'}."/key' root\@$domip '/etc/init.d/amavis start #optionally'");
+ system("ssh -i '".$config{'storagepooldir'}."/key' root\@$domip '/etc/init.d/slapd start'");
+ system("ssh -i '".$config{'storagepooldir'}."/key' root\@$domip '/etc/init.d/saslauthd start'");
+ system("ssh -i '".$config{'storagepooldir'}."/key' root\@$domip '/etc/init.d/postfix start'");
+ system("ssh -i '".$config{'storagepooldir'}."/key' root\@$domip '/etc/init.d/kolab-cyrus start'");
+ system("ssh -i '".$config{'storagepooldir'}."/key' root\@$domip '/etc/init.d/kolabd start'");
+ system("ssh -i '".$config{'storagepooldir'}."/key' root\@$domip '/etc/init.d/apache2 start'");
+
print "* Installing PHP Unit:\n";
system("ssh -i '".$config{'storagepooldir'}."/key' root\@$domip 'apt-get -qy install phpunit'");
}
More information about the pkg-kolab-devel
mailing list