Exemplo n.º 1
0
def upgrade(new_rpm_path, local_config_dir=None, overwrite=False):
    """
    Copy and upgrade a new presto-server rpm to all of the nodes in the
    cluster. Retains existing node configuration.

    The existing topology information is read from the config.json file.
    Unlike install, there is no provision to supply topology information
    interactively.

    The existing cluster configuration is collected from the nodes on the
    cluster and stored on the host running presto-admin. After the
    presto-server packages have been upgraded, presto-admin pushes the
    collected configuration back out to the hosts on the cluster.

    Note that the configuration files in the presto-admin configuration
    directory are not updated during upgrade.

    :param new_rpm_path -       The path to the new Presto RPM to
                                install
    :param local_config_dir -   (optional) Directory to store the cluster
                                configuration in. If not specified, a temp
                                directory is used.
    :param overwrite -          (optional) if set to True then existing
                                configuration will be orerwriten.

    :param --nodeps -           (optional) Flag to indicate if server upgrade
                                should ignore checking Presto rpm package
                                dependencies. Equivalent to adding --nodeps
                                flag to rpm -U.
    """
    stop()

    temp_config_tar = configure_cmds.gather_config_directory()

    package.deploy_upgrade(new_rpm_path)

    configure_cmds.deploy_config_directory(temp_config_tar)
Exemplo n.º 2
0
def upgrade(new_rpm_path, local_config_dir=None, overwrite=False):
    """
    Copy and upgrade a new presto-server rpm to all of the nodes in the
    cluster. Retains existing node configuration.

    The existing topology information is read from the config.json file.
    Unlike install, there is no provision to supply topology information
    interactively.

    The existing cluster configuration is collected from the nodes on the
    cluster and stored on the host running presto-admin. After the
    presto-server packages have been upgraded, presto-admin pushes the
    collected configuration back out to the hosts on the cluster.

    Note that the configuration files in the presto-admin configuration
    directory are not updated during upgrade.

    :param new_rpm_path -       The path to the new Presto RPM to
                                install
    :param local_config_dir -   (optional) Directory to store the cluster
                                configuration in. If not specified, a temp
                                directory is used.
    :param overwrite -          (optional) if set to True then existing
                                configuration will be orerwriten.

    :param --nodeps -           (optional) Flag to indicate if server upgrade
                                should ignore checking Presto rpm package
                                dependencies. Equivalent to adding --nodeps
                                flag to rpm -U.
    """
    stop()

    temp_config_tar = configure_cmds.gather_config_directory()

    package.deploy_upgrade(new_rpm_path)

    configure_cmds.deploy_config_directory(temp_config_tar)