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)
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)
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)
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']), ])
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)
def do(args): config = network.config.load(args.id) ansible.playbook("stop_sawtooth", config)
def do(args): config = network.config.load(args.id) playbook = ansible.playbook("reset_sawtooth", config)
def do(args): config = network.config.load(args.id) ansible.playbook("setup_sawtooth", config, retries=5, delay=60)
def do(args): config = network.config.load(args.id) print(config) ansible.playbook("upgrade_sawtooth", config, retries=5, delay=60)