Exemple #1
0
 def run(self):
     remote_client = RemoteMachineShellConnection(self.server)
     remote_client.create_file(self.script_name, self.script_content)
     output, error = remote_client.execute_command("chmod 777 {0} ; {0} ; rm -f {0}".format(self.script_name))
     print self.server.ip
     print "\n".join(output)
     print "\n".join(error)
Exemple #2
0
 def run(self):
     remote_client = RemoteMachineShellConnection(self.server)
     remote_client.create_file(self.script_name, self.script_content)
     output, error = remote_client.execute_command("chmod 777 {0} ; {0} ; rm -f {0}".format(self.script_name))
     print self.server.ip
     print "\n".join(output)
     print "\n".join(error)
Exemple #3
0
    def initialize(self, params):
#        log = logger.new_logger("Installer")
        remote_client = RemoteMachineShellConnection(params["server"])
        remote_client.create_directory("/opt/couchbase/var/lib/membase/data")
        remote_client.execute_command("chown couchbase:couchbase /opt/couchbase/var/lib/membase/data")
        remote_client.create_file("/tmp/init.sql", """PRAGMA journal_mode = TRUNCATE;
PRAGMA synchronous = NORMAL;""")
        remote_client.execute_command('/opt/couchbase/bin/memcached -d -v -c 80000 -p 11211 -E /opt/couchbase/lib/memcached/ep.so -r -e "dbname=/opt/couchbase/var/lib/membase/data/default;ht_size=12582917;min_data_age=0;queue_age_cap=900;initfile=/tmp/init.sql;vb0=true" -u couchbase > /tmp/memcache.log </dev/null 2>&1')
        time.sleep(5)
Exemple #4
0
 def create_file(self,chosen,buckets,serverMap):
     """ Created files in data paths for checking if delta/full recovery occured """
     fileMap={}
     for server in self.chosen:
         shell = RemoteMachineShellConnection(serverMap[server.ip])
         map = {}
         for bucket in buckets:
             bucket_data_path=self.data_path+"/"+bucket.name+"/"+"check.txt"
             full_path=self.data_path+"/"+bucket.name+"/"
             map[bucket.name] = full_path
             shell.create_file(bucket_data_path,"check")
         fileMap[server.ip] = map
         shell.disconnect()
     return fileMap
Exemple #5
0
 def create_file(self,chosen,buckets,serverMap):
     """ Created files in data paths for checking if delta/full recovery occured """
     fileMap={}
     for server in self.chosen:
         shell = RemoteMachineShellConnection(serverMap[server.ip])
         map = {}
         for bucket in buckets:
             bucket_data_path=self.data_path+"/"+bucket.name+"/"+"check.txt"
             full_path=self.data_path+"/"+bucket.name+"/"
             map[bucket.name] = full_path
             shell.create_file(bucket_data_path,"check")
         fileMap[server.ip] = map
         shell.disconnect()
     return fileMap
 def create_file(self, chosen, buckets, serverMap):
     """ Created files in data paths for checking if delta/full recovery occured """
     fileMap = {}
     for server in self.chosen:
         shell = RemoteMachineShellConnection(serverMap[server.ip])
         type = shell.extract_remote_info().distribution_type
         map = {}
         for bucket in buckets:
             if type.lower() == 'windows':
                 self.data_path = 'c:/Program\ Files/Couchbase/Server/var/lib/couchbase/data'
             bucket_data_path = self.data_path + "/" + bucket.name + "/" + "check.txt"
             full_path = self.data_path + "/" + bucket.name + "/"
             map[bucket.name] = full_path
             shell.create_file(bucket_data_path, "check")
         fileMap[server.ip] = map
         shell.disconnect()
     return fileMap
 def create_file(self, chosen, buckets, serverMap):
     """ Created files in data paths for checking if delta/full recovery occured """
     fileMap = {}
     for server in self.chosen:
         shell = RemoteMachineShellConnection(serverMap[server.ip])
         type = shell.extract_remote_info().distribution_type
         map = {}
         for bucket in buckets:
             if type.lower() == 'windows':
                 self.data_path = 'c:/Program\ Files/Couchbase/Server/var/lib/couchbase/data'
             bucket_data_path = self.data_path + "/" + bucket.name + "/" + "check.txt"
             full_path = self.data_path + "/" + bucket.name + "/"
             map[bucket.name] = full_path
             shell.create_file(bucket_data_path, "check")
         fileMap[server.ip] = map
         shell.disconnect()
     return fileMap