예제 #1
0
파일: create.py 프로젝트: lntdev/raft_22Oct
def do(args):
    # if args.id == "":
    # args.id = network.config.get_random_name()

    # 1. Create dir to store network info
    network.config.create_dir(args.id)

    # 2. Save network info for future reference
    network.config.save(args)
    config = network.config.load(args.id)

    # 3. Create the network in terraform
    tf.create(config)

    # 4. Install sawtooth and configure
    genesis_hostname = tf.get_node_name(0, config)
    ansible.playbook(
        "setup_sawtooth",
        config, [
            "sawtooth_packages='{}'".format(config['sawtooth_packages']),
            "sawtooth_validator_transaction_families='{}'".format(",".join(
                config['sawtooth_transaction_families'])),
            "genesis_node='{}'".format(genesis_hostname),
            "sawtooth_validator_ledger_type='{}'".format(
                config['sawtooth_ledger_type']),
            "sawtooth_local_validation='{}'".format(
                config['sawtooth_local_validation']),
            "sawtooth_logging_syslog_ip='{}'".format(
                config['sawtooth_syslog_ip']),
            "sawtooth_logging_syslog_facility='{}'".format(
                config['sawtooth_syslog_facility']),
        ],
        retries=5,
        delay=60)
예제 #2
0
def do(args):
    config = network.config.load(args.id)
    print(config)
    ansible.playbook("install_pr",
                     config,
                     playbook_args=["pr_number='{}'".format(args.pr)],
                     retries=5,
                     delay=60)
예제 #3
0
def do(args):

    config = network.config.load(args.id)

    genesis_hostname = tf.get_node_name(0, config)
    ansible.playbook("upgrade_sawtooth", config, [
        "sawtooth_packages='{}'".format(
            config['sawtooth_packages']),
    ], retries=5, delay=60)
예제 #4
0
파일: start.py 프로젝트: lntdev/raft_22Oct
def do(args):
    config = network.config.load(args.id)

    ansible.playbook("start_sawtooth", config, [
        "genesis_tag='{}'".format(ansible.get_name_tag(0,
                                                       config['network_id'])),
        "sawtooth_validator_ledger_type='{}'".format(
            config['sawtooth_ledger_type']),
    ])
예제 #5
0
def do(args):
    # 1. Create dir to store network info
    network.config.create_dir(args.id)

    # 2. Save network info for future reference
    network.config.save(args)
    config = network.config.load(args.id)

    # 3. Create the network in terraform
    tf.create(config)

    # 4. Install sawtooth and configure
    time.sleep(3)
    ansible.playbook("setup_sawtooth", config, retries=5, delay=60)
예제 #6
0
파일: stop.py 프로젝트: lntdev/raft_22Oct
def do(args):
    config = network.config.load(args.id)

    ansible.playbook("stop_sawtooth", config)
예제 #7
0
파일: reset.py 프로젝트: lntdev/raft_22Oct
def do(args):
    config = network.config.load(args.id)

    playbook = ansible.playbook("reset_sawtooth", config)
예제 #8
0
def do(args):
    config = network.config.load(args.id)
    ansible.playbook("setup_sawtooth", config, retries=5, delay=60)
예제 #9
0
def do(args):
    config = network.config.load(args.id)
    print(config)
    ansible.playbook("upgrade_sawtooth", config, retries=5, delay=60)