update_agents

Prepares the environment for updating your Management Agents and submits the Management Agent update job.

Format

emcli update_agents 
-gold_image_name | -gold_image_series  
-agents="agent_names" | -input_file="agents_file:input_file_location" 
[-validate_only] 
[-pre_script_loc="location_of_pre_script"]
[-pre_script_on_oms]
[-post_script_loc="location_of_post_script"]
[-post_script_on_oms]
[-op_name="custom_operation_name"]
[-override_credential="named_credential"]
[-additional_parameters]
[-stage_location="custom_stage_location"]
[-is_staged="true|false"]
[-stage_action="push|pull"] 

[ ]  indicates that the parameter is optional

Options

  • gold_image_series

    Specify this option to update the selected Management Agents to the latest Management Agent gold image of the specified series.

  • gold_image_name

    Specify this option to update the selected Management Agents to the specified Management Agent gold image.

  • agents

    Specify this option to enter the names of all the Management Agents that you want to update.

  • input_file

    Specify this option if the list of all the Management Agents that you want to update is stored in an input file.

  • validate_only

    Specify this option if you only want to check whether or not the Management Agents that you have selected for update can be updated, and not update these Management Agents immediately. If you use this option, the Management Agent update job will not be submitted.

  • pre_script_loc

    Specify this option if you want to execute a script before updating the selected Management Agents.

  • pre_script_on_oms

    Specify this option if the post-script is present on the OMS host.

  • op_name

    Specify this option to use a custom operation name for the Management Agent update.

  • override_credential

    The preferred credentials of the Management Agent Oracle home are used to run root.sh (on certain Management Agents) after the update. Specify this option if you want to override these credentials with different named credentials

  • additional_parameters

    Specify this option if you want to pass additional parameters for the Management Agent update.

  • stage_location

    Specify this option if you want to use a custom stage location for the Management Agent update.

  • is_staged

    Specify this option as 'true' if you have already staged the Management Agent gold image.

  • stage_action

    If the Management Agent gold image has not already been staged, by default, the gold image is pushed to the Management Agents that you have selected for update. Specify this option as 'pull' if you want the Management Agents selected for update to pull the Management Agent gold image instead.

It is mandatory to specify the -gold_image_name parameter or the -gold_image_series parameter. Also, it is mandatory to specify the -agents parameter or the -input_file parameter. If you specify -agents as well as -input_file, a union of the outputs (when each of these parameters is specified individually) is displayed.

All parameters can be passed in a response file, using the -input_file parameter. For example, -input_file="response_file:/scratch/response_file.txt".

In the response file, each parameter must be specified on a new line, and in name value pairs. For example, op_name=UPDATE_AGT_121020

If the same parameter is passed both on the command line as well as in the response file, the value of the command line parameter is given precedence

Examples

Example 1

The following example updates xyz.domain.com:1243 (creates an update job 'UPDATE_JOB123') using the Management Agent gold image 'OPC_AGT_ADC_POD_JUNE':.

mcli update_agents 
     -gold_image_name="OPC_AGT_ADC_POD_JUNE" 
     -agents="xyz.domain.com:1243" 
     -op_name="UPDATE_JOB123"
       

Example 2

The following example updates xyz.domain.com:1243 using the latest Management Agent gold image in the series 'OPC_AGT_ADC_POD', passing two additional parameters:

emcli update_agents 
      -gold_image_series="OPC_AGT_ADC_POD" 
      -agents="xyz.domain.com:1243" 
      -additional_parameters="-ignorePrereqs 
      -newParameter"