#!/usr/bin/python # encoding: utf-8 import tarsLog import shutil import os import sys import stat from tarsUtil import * log = tarsLog.getLogger() tarsDeploy = "/usr/local/app/tars" tarsDeployFrameBasicServerList = [ "tarsregistry", "tarsnode", "tarsAdminRegistry", "tarspatch", "tarsconfig" ] tarsDeployFrameCommServerList = [ "tarsnotify", "tarsstat", "tarsproperty", "tarsquerystat", "tarsqueryproperty", "tarslog", "tarsauth" ] baseDir = getBaseDir() def do(): log.infoPrint("initDB start ...") initDB() log.infoPrint("initDB success ") log.infoPrint("deploy frameServer start ...") deployFrameServer() log.infoPrint("deploy frameServer success ") log.infoPrint("deploy web start ... ") deployWeb() log.infoPrint("deploy web success") return
#!/usr/bin/python # encoding: utf-8 import subprocess import tarsLog import os import requests from tarsUtil import * log = tarsLog.getLogger() localIp = getLocalIp() webPort = "3000" def do(): (rCode,msg) = testWeb() if rCode !=0: log.infoPrint(msg) return (rCode,msg) = testFrameServer() if rCode !=0: log.infoPrint(msg) return print " test success!" def testWeb(): return testByInterface("/pages/server/api/tree","","tarspatch") def testFrameServer(): if True: return (0,"") frameServer = [("tarspatch","1"),("tarsconfig","2"),("tarsnotify","20"),("tarsstat","23"),("tarsproperty","25"),("tarsqueryproperty","27"),("tarsquerystat","29")] for (serverName,serverId) in frameServer: log.infoPrint("test server {} start ".format(serverName))