コード例 #1
0
ファイル: backend.py プロジェクト: zhous1q/dcos
def generate_node_upgrade_script(installed_cluster_version,
                                 config_path=CONFIG_PATH):

    if installed_cluster_version is None:
        print('Must provide the version of the cluster upgrading from')
        return 1

    config = Config(config_path)
    try:
        gen_out = config_util.onprem_generate(config)
    except ValidationError as e:
        validation = normalize_config_validation_exception(e)
        print_messages(validation)
        return 1
    except ExhibitorTLSBootstrapError as e:
        log.error('Failed to bootstrap Exhibitor TLS')
        for i, error in enumerate(e.errors):
            return log.error("{}: {}".format(i + 1, error))
        return 1

    config_util.make_serve_dir(gen_out)

    # generate the upgrade script
    upgrade.generate_node_upgrade_script(gen_out, installed_cluster_version)

    return 0
コード例 #2
0
ファイル: backend.py プロジェクト: rlugojr/dcos
def generate_node_upgrade_script(installed_cluster_version, config_path=CONFIG_PATH):

    if installed_cluster_version is None:
        print('Must provide the version of the cluster upgrading from')
        return 1

    config = Config(config_path)
    validation = validate_gen(config)
    if not validation:
        return 1
    gen_out = config_util.onprem_generate(config)
    config_util.make_serve_dir(gen_out)

    # generate the upgrade script
    upgrade.generate_node_upgrade_script(gen_out, installed_cluster_version)

    return 0
コード例 #3
0
ファイル: backend.py プロジェクト: zhaixuepan/dcos
def generate_node_upgrade_script(installed_cluster_version,
                                 config_path=CONFIG_PATH):

    if installed_cluster_version is None:
        print('Must provide the version of the cluster upgrading from')
        return 1

    config = Config(config_path)
    validation = validate_gen(config)
    if not validation:
        return 1
    gen_out = config_util.onprem_generate(config)
    config_util.make_serve_dir(gen_out)

    # generate the upgrade script
    upgrade.generate_node_upgrade_script(gen_out, installed_cluster_version)

    return 0
コード例 #4
0
ファイル: backend.py プロジェクト: branden/dcos
def generate_node_upgrade_script(installed_cluster_version, config_path=CONFIG_PATH):

    if installed_cluster_version is None:
        print('Must provide the version of the cluster upgrading from')
        return 1

    config = Config(config_path)
    try:
        gen_out = config_util.onprem_generate(config)
    except ValidationError as e:
        validation = normalize_config_validation_exception(e)
        print_messages(validation)
        return 1

    config_util.make_serve_dir(gen_out)

    # generate the upgrade script
    upgrade.generate_node_upgrade_script(gen_out, installed_cluster_version)

    return 0
コード例 #5
0
ファイル: backend.py プロジェクト: yapsterapp/dcos
def generate_node_upgrade_script(installed_cluster_version, config_path=CONFIG_PATH):

    if installed_cluster_version is None:
        print('Must provide the version of the cluster upgrading from')
        return 1

    config = Config(config_path)
    try:
        gen_out = config_util.onprem_generate(config)
    except ValidationError as e:
        validation = normalize_config_validation_exception(e)
        print_messages(validation)
        return 1

    config_util.make_serve_dir(gen_out)

    # generate the upgrade script
    upgrade.generate_node_upgrade_script(gen_out, installed_cluster_version)

    return 0