def remote_run():
    aws_pool.make_pool()
    aws_pool.pool.run(f"rm -rf {convention.chain_param_data_path}")
    for i, e in enumerate(aws_pool.pool):
        print(f"{e.host} start muta-chain")
        e.run(
            f"cd {convention.remote_path}/muta && (CONFIG=config_{i+1}.toml GENESIS=genesis.toml nohup ./muta-chain >& log < /dev/null & echo $! > muta.pid) && sleep 1")
Example #2
0
def deploy_binary():
    aws_pool.make_pool()
    aws_pool.pool.run(f"rm -rf telnet")
    aws_pool.pool.run(f"mkdir -p telnet")
    for e in aws_pool.pool:
        print(f"{e.host} upload telnet binaries")
        e.put("./bin/telnet/server", "telnet/telnet_server")
        e.put("./bin/telnet/client", "telnet/telnet_client")
def deploy_binary():
    aws_pool.make_pool()
    with misc.chdir("./bin"):
        misc.call("python3 -m zipfile -c muta.zip muta")
        aws_pool.pool.run(f"rm -rf {convention.remote_path}/muta")
        aws_pool.pool.run("rm -rf /tmp/muta.zip")
        for e in aws_pool.pool:
            print(f"{e.host} upload muta.zip")
            e.put("muta.zip", "/tmp/muta.zip")
    aws_pool.pool.run(f"python3 -m zipfile -e /tmp/muta.zip {convention.remote_path}")
    aws_pool.pool.run(f"cd {convention.remote_path}/muta && chmod +x muta-chain && chmod +x muta-keypair")
def remote_kill():
    aws_pool.make_pool()
    aws_pool.pool.run(f"cd {convention.remote_path}/muta && kill -2 `cat muta.pid` || true")
def remote_run():
    aws_pool.make_pool()
    aws_pool.pool.run(f"rm -rf {convention.chain_param_data_path}")
    for i, e in enumerate(aws_pool.pool):
        print(f"{e.host} start huobi-chain")
        e.run(f"cd {convention.remote_path}/huobi && (nohup ./huobi-chain -c config_{i+1}.toml -g genesis.toml >& log < /dev/null & echo $! > huobi.pid) && sleep 1")
Example #6
0
def remote_kill():
    aws_pool.make_pool()
    aws_pool.pool.run("killall telnet_server | tee")