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) try: __wlst_helper.update_domain() except BundleAwareException, ex: __close_domain_on_error() raise ex
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)
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)
deployer_utils.ensure_no_uncommitted_changes_or_edit_sessions( model_context.is_discard_current_edit()) __wlst_helper.edit() __wlst_helper.start_edit() if model_context.is_discard_current_edit(): deployer_utils.discard_current_edit() except BundleAwareException, ex: raise ex __logger.info("WLSDPLY-09007", admin_url, method_name=_method_name, class_name=_class_name) topology_updater = TopologyUpdater(model, model_context, aliases, wlst_mode=WlstModes.ONLINE) try: topology_updater.update_machines_clusters_and_servers(delete_now=False) topology_updater.warn_set_server_groups() except DeployException, de: deployer_utils.release_edit_session_and_disconnect() raise de # Server or Cluster may be added, this is to make sure they are targeted properly topology_updater.set_server_groups() # Calling set_server_groups has a side effect, it throws itself out of the edit tree. # If it is not in edit tree then save in # __check_update_require_domain_restart will fail # Restart the edit session to compensate
try: __wlst_helper.connect(admin_user, admin_pwd, admin_url) deployer_utils.ensure_no_uncommitted_changes_or_edit_sessions() __wlst_helper.edit() __wlst_helper.start_edit() except BundleAwareException, ex: raise ex __logger.info("WLSDPLY-09007", admin_url, method_name=_method_name, class_name=_class_name) try: topology_updater = TopologyUpdater(model, model_context, aliases, wlst_mode=WlstModes.ONLINE) topology_updater.update() model_deployer.deploy_resources(model, model_context, aliases, wlst_mode=__wlst_mode) except DeployException, de: __release_edit_session_and_disconnect() raise de try: __wlst_helper.save() __wlst_helper.activate() except BundleAwareException, ex: