def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) oooutils.ffwd_upgrade_operator_confirm(parsed_args.yes, self.log) verbosity = self.app_args.verbose_level clients = self.app.client_manager orchestration = clients.orchestration stack = parsed_args.stack ansible_dir = None key = None # Disable mistral if parsed_args.no_workflow: ansible_dir = oooutils.download_ansible_playbooks( orchestration, stack) key = package_update.get_key(clients) # Run ansible: inventory = oooutils.get_tripleo_ansible_inventory( inventory_file=parsed_args.static_inventory, ssh_user=parsed_args.ssh_user, stack=parsed_args.stack) # Don't expost limit_hosts. We need this on the whole overcloud. limit_hosts = '' oooutils.run_update_ansible_action( self.log, clients, limit_hosts, inventory, constants.FFWD_UPGRADE_PLAYBOOK, [], parsed_args.ssh_user, (None if parsed_args.no_workflow else package_update), verbosity=verbosity, workdir=ansible_dir, priv_key=key)
def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) oooutils.ffwd_upgrade_operator_confirm(parsed_args.yes, self.log) clients = self.app.client_manager stack = oooutils.get_stack(clients.orchestration, parsed_args.stack) stack_name = stack.stack_name # ffwd-upgrade "init" run command on overcloud nodes package_update.run_on_nodes( clients, server_name='all', config_name='ffwd-upgrade-prepare', config=constants.FFWD_UPGRADE_PREPARE_SCRIPT, group='script', queue_name=constants.FFWD_UPGRADE_QUEUE) registry = oooutils.load_container_registry( self.log, parsed_args.container_registry_file) ceph_ansible_playbook = parsed_args.ceph_ansible_playbook # In case of update and upgrade we need to force the # update_plan_only. The heat stack update is done by the # packag_update mistral action parsed_args.update_plan_only = True # Add the prepare environment into the args to unset noop etc templates_dir = (parsed_args.templates or constants.TRIPLEO_HEAT_TEMPLATES) if not parsed_args.environment_files: parsed_args.environment_files = [] parsed_args.environment_files = oooutils.prepend_environment( parsed_args.environment_files, templates_dir, constants.FFWD_UPGRADE_PREPARE_ENV) super(FFWDUpgradePrepare, self).take_action(parsed_args) package_update.update(clients, container=stack_name, container_registry=registry, ceph_ansible_playbook=ceph_ansible_playbook) package_update.get_config(clients, container=stack_name) overcloudrcs = deployment.create_overcloudrc(clients.workflow_engine, container=stack_name) oooutils.write_overcloudrc(stack_name, overcloudrcs) self.log.info("FFWD Upgrade Prepare on stack {0} complete.".format( parsed_args.stack))
def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) oooutils.ffwd_upgrade_operator_confirm(parsed_args.yes, self.log) clients = self.app.client_manager stack = oooutils.get_stack(clients.orchestration, parsed_args.stack) stack_name = stack.stack_name # ffwd-upgrade "init" run command on overcloud nodes package_update.run_on_nodes( clients, server_name='all', config_name='ffwd-upgrade-prepare', config=constants.FFWD_UPGRADE_PREPARE_SCRIPT, group='script') # In case of update and upgrade we need to force the # update_plan_only. The heat stack update is done by the # packag_update mistral action parsed_args.update_plan_only = True # Add the prepare environment into the args to unset noop etc templates_dir = (parsed_args.templates or constants.TRIPLEO_HEAT_TEMPLATES) if not parsed_args.environment_files: parsed_args.environment_files = [] parsed_args.environment_files = oooutils.prepend_environment( parsed_args.environment_files, templates_dir, constants.FFWD_UPGRADE_PREPARE_ENV) super(FFWDUpgradePrepare, self).take_action(parsed_args) package_update.update(clients, container=stack_name) package_update.get_config(clients, container=stack_name) overcloudrcs = deployment.create_overcloudrc(clients, container=stack_name) oooutils.write_overcloudrc(stack_name, overcloudrcs) # refresh stack info and enable ssh admin for Ansible-via-Mistral stack = oooutils.get_stack(clients.orchestration, parsed_args.stack) deployment.get_hosts_and_enable_ssh_admin( self.log, clients, stack, parsed_args.overcloud_ssh_network, parsed_args.overcloud_ssh_user, parsed_args.overcloud_ssh_key) self.log.info("FFWD Upgrade Prepare on stack {0} complete.".format( parsed_args.stack))
def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) oooutils.ffwd_upgrade_operator_confirm(parsed_args.yes, self.log) clients = self.app.client_manager stack = oooutils.get_stack(clients.orchestration, parsed_args.stack) stack_name = stack.stack_name # In case of update and upgrade we need to force the # update_plan_only. The heat stack update is done by the # packag_update mistral action parsed_args.update_plan_only = True # Add the prepare environment into the args to unset noop etc templates_dir = (parsed_args.templates or constants.TRIPLEO_HEAT_TEMPLATES) if not parsed_args.environment_files: parsed_args.environment_files = [] parsed_args.environment_files = oooutils.prepend_environment( parsed_args.environment_files, templates_dir, constants.FFWD_UPGRADE_PREPARE_ENV) super(FFWDUpgradePrepare, self).take_action(parsed_args) package_update.update(clients, container=stack_name) oooutils.get_config( clients, container=stack_name, container_config='{}-config'.format(stack.stack_name)) overcloudrcs = deployment.create_overcloudrc( clients, container=stack_name) oooutils.write_overcloudrc(stack_name, overcloudrcs) # refresh stack info and enable ssh admin for Ansible-via-Mistral stack = oooutils.get_stack(clients.orchestration, parsed_args.stack) deployment.get_hosts_and_enable_ssh_admin( stack, parsed_args.overcloud_ssh_network, parsed_args.overcloud_ssh_user, self.get_key_pair(parsed_args), parsed_args.overcloud_ssh_port_timeout, verbosity=oooutils.playbook_verbosity(self=self) ) self.log.info("FFWD Upgrade Prepare on stack {0} complete.".format( parsed_args.stack))
def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) oooutils.ffwd_upgrade_operator_confirm(parsed_args.yes, self.log) # Add the converge environment into the args to unset noop etc templates_dir = (parsed_args.templates or constants.TRIPLEO_HEAT_TEMPLATES) if not parsed_args.environment_files: parsed_args.environment_files = [] parsed_args.environment_files = oooutils.prepend_environment( parsed_args.environment_files, templates_dir, constants.FFWD_UPGRADE_CONVERGE_ENV) super(FFWDUpgradeConverge, self).take_action(parsed_args) self.log.info("FFWD Upgrade Converge on stack {0} complete.".format( parsed_args.stack))
def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) oooutils.ffwd_upgrade_operator_confirm(parsed_args.yes, self.log) clients = self.app.client_manager # Run ansible: inventory = oooutils.get_tripleo_ansible_inventory( inventory_file=parsed_args.static_inventory, ssh_user=parsed_args.ssh_user, stack=parsed_args.stack) # Don't expost limit_hosts. We need this on the whole overcloud. limit_hosts = '' oooutils.run_update_ansible_action(self.log, clients, limit_hosts, inventory, constants.FFWD_UPGRADE_PLAYBOOK, constants.FFWD_UPGRADE_QUEUE, [], package_update, parsed_args.ssh_user)