From 197a0eb53dc9a44785f722f71936c58840c0d5d5 Mon Sep 17 00:00:00 2001 From: Thanasis Naskos Date: Thu, 12 Mar 2015 18:51:30 +0200 Subject: [PATCH] Installing mandatory packages --- .gitignore | 1 + GstarCluster.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f75ccb8..0ce674e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.py~ *.pyc logs* +*.db diff --git a/GstarCluster.py b/GstarCluster.py index e925e6a..73aa109 100755 --- a/GstarCluster.py +++ b/GstarCluster.py @@ -105,7 +105,8 @@ class GstarCluster(object): # Set hostname on the machine stdin, stdout, stderr = ssh.exec_command('echo \"'+host_template+"master\" > /etc/hostname") stdin, stdout, stderr = ssh.exec_command('hostname \"'+host_template+"master\"") - + stdin, stdout, stderr = ssh.exec_command('apt-get install -y python-paramiko htop') + # Add node to cluster self.cluster[host_template+"master"] = node @@ -156,6 +157,8 @@ class GstarCluster(object): # Set hostname on the machine stdin, stdout, stderr = ssh.exec_command('echo \"'+host_template+str(i)+"\" > /etc/hostname") stdin, stdout, stderr = ssh.exec_command('hostname \"'+host_template+str(i)+"\"") + stdin, stdout, stderr = ssh.exec_command('apt-get install -y htop') + shutil.copy("./templates/bashrc", "/tmp/bashrc") bashrc = "/tmp/bashrc" for line in fileinput.FileInput(bashrc,inplace=1): -- 2.2.2