Exemplo n.º 1
0
def __update_offline(model, model_context, aliases):
    """
    Offline update orchestration
    :param model: the model
    :param model_context: the model context
    :param aliases: the aliases object
    :raises: DeployException: if an error occurs
    """
    _method_name = '__update_offline'

    domain_home = model_context.get_domain_home()
    __logger.info("WLSDPLY-09010",
                  domain_home,
                  method_name=_method_name,
                  class_name=_class_name)

    __wlst_helper.read_domain(domain_home)

    topology_updater = TopologyUpdater(model,
                                       model_context,
                                       aliases,
                                       wlst_mode=WlstModes.OFFLINE)
    # deleting servers that are added by templates before set server groups causes mayhem
    topology_updater.update_machines_clusters_and_servers(delete_now=False)

    # update rcu schema password must happen before updating jrf domain
    if model_context.get_update_rcu_schema_pass() is True:
        rcu_helper = RCUHelper(model, model_context, aliases)
        rcu_helper.update_rcu_password()

    __update_offline_domain()

    topology_updater.set_server_groups()

    topology_updater.update()

    # Add resources after server groups are established to prevent auto-renaming
    model_deployer.deploy_model_offline(model,
                                        model_context,
                                        aliases,
                                        wlst_mode=__wlst_mode)

    __update_offline_domain()

    model_deployer.deploy_model_after_update(model,
                                             model_context,
                                             aliases,
                                             wlst_mode=__wlst_mode)

    try:
        __wlst_helper.close_domain()
    except BundleAwareException, ex:
        # All the changes are made so don't raise an error that causes the program to indicate
        # a failure...just log the error since the process is going to exit anyway.
        __logger.warning('WLSDPLY-09011',
                         _program_name,
                         ex.getLocalizedMessage(),
                         error=ex,
                         class_name=_class_name,
                         method_name=_method_name)
Exemplo n.º 2
0
def __deploy_offline(model, model_context, aliases):
    """
    Offline deployment orchestration
    :param model: the model
    :param model_context: the model context
    :param aliases: the aliases object
    :raises: DeployException: if an error occurs
    """
    _method_name = '__deploy_offline'

    domain_home = model_context.get_domain_home()
    __logger.info("WLSDPLY-09010",
                  domain_home,
                  method_name=_method_name,
                  class_name=_class_name)

    __wlst_helper.read_domain(domain_home)

    model_deployer.deploy_model_offline(model,
                                        model_context,
                                        aliases,
                                        wlst_mode=__wlst_mode)

    try:
        __wlst_helper.update_domain()
    except BundleAwareException, ex:
        __close_domain_on_error()
        raise ex
Exemplo n.º 3
0
def __update_offline(model, model_context, aliases):
    """
    Offline update orchestration
    :param model: the model
    :param model_context: the model context
    :param aliases: the aliases object
    :raises: DeployException: if an error occurs
    """
    _method_name = '__update_offline'

    domain_home = model_context.get_domain_home()
    __logger.info("WLSDPLY-09010",
                  domain_home,
                  method_name=_method_name,
                  class_name=_class_name)

    __wlst_helper.read_domain(domain_home)

    topology_updater = TopologyUpdater(model,
                                       model_context,
                                       aliases,
                                       wlst_mode=WlstModes.OFFLINE)
    topology_updater.update()

    model_deployer.deploy_model_offline(model,
                                        model_context,
                                        aliases,
                                        wlst_mode=__wlst_mode)
    if model_context.get_update_rcu_schema_pass() is True:
        rcu_helper = RCUHelper(model, model_context, aliases)
        rcu_helper.update_rcu_password()

    __update_offline_domain()

    topology_updater.set_server_groups()

    __update_offline_domain()

    model_deployer.deploy_model_after_update(model,
                                             model_context,
                                             aliases,
                                             wlst_mode=__wlst_mode)

    try:
        __wlst_helper.close_domain()
    except BundleAwareException, ex:
        # All the changes are made so don't raise an error that causes the program to indicate
        # a failure...just log the error since the process is going to exit anyway.
        __logger.warning('WLSDPLY-09011',
                         _program_name,
                         ex.getLocalizedMessage(),
                         error=ex,
                         class_name=_class_name,
                         method_name=_method_name)