Ejemplo n.º 1
0
    def startService(self):
        #ensure environment clean
        gridService.stopService(self)

        #start hub
        print 'Start Hub Service'
        os.system(startHubCmd)
        
        #start nodes
        hub_ip = self.nodes[0]['IP']
        print 'hub_ip is ', hub_ip
        for node in self.nodes:
            print 'Start Node Service On ', node['IP']
            conn = action(node['IP'], command=startNodeCmd.format(hub_ip = hub_ip))
            conn.ssh_connect()
Ejemplo n.º 2
0
    def startService(self):
        #ensure environment clean
        gridService.stopService(self)
        
        #start nodes
        hub_ip = self.nodes[0]['IP']
        print 'hub_ip is ', hub_ip
        for node in self.nodes:
            print 'Start Node Service On ', node['IP']
            conn = action(node['IP'], command=startNodeCmd.format(hub_ip = hub_ip, max_sessions=node['MaxSession'], max_instances=node['MaxSession'],file_name = NodeFile))
            conn.ssh_connect()

        #start hub
        print 'Start Hub Service'
        os.system(startHubCmd)
        
        #sleep 5 seconds for service start
        time.sleep(5)
Ejemplo n.º 3
0
 def stopService(self):
    for node in self.nodes:
         print 'Stop Service On ', node['IP']
         conn = action(node['IP'], stopCmd)
         conn.ssh_connect()