Adding Resources to a Fleet Dynamically

When you want to dynamically add resources to a fleet in Fleet Application Management, update the rules that define the resources of the fleet.

When new resources are created in a tenancy, they're added to a fleet automatically if the rule criteria match. If the resource updates aren't available in the fleet, rescan resources. See Rescanning the Resources in a Fleet.
Note

After you add resources, Fleet Application Management plugin is enabled, and the resources become managed resources.
    1. On the Fleets list page, select the fleet that you want to work with. If you need help finding the list page or the fleet, see Listing Fleets.
    2. Select the Managed resources tab.
    3. Under Resource selection, select Edit.
      You can edit rules only when the resource selection type is dynamic.
    4. In the Edit rules panel, select one of the following options from the Include resources that match list.
      • All of the following: To include resources based on all rules, select this option and skip to step 5.
      • Any of the following: To include resources that are based on any of the matching rules, select this option and skip to step 6.
    5. If you selected All of the following in step 4, add rules that are based on resource properties or tags or both. Enter values in the following fields if configuring for resource property:
      • Rules based on: Under Rule 1, select a rule based on the resource property.

        You can select a resource that is available from all compartments or filter based on property name and value.

        To filter a resource that is available from all compartments:
        1. Turn on Include all compartments.
        2. Select a resource type.
        To filter a resource based on property name and value:
        1. Select a compartment that contains the resource you want to use for the fleet.
        2. To add a resource type, attribute, and value based on the resource property, select values for Resource type and Property name, and then enter a value for the property. For more information about the Compute resource type and Database resource type, see Creating an Instance and Database Management for Oracle Databases.
          Note

          The value you enter must be an exact match. For instance, consider the Availability domain associated with a Compute instance.
        3. To add more properties according to rule 1, select Add line and input the values.
      • To add more rules, select Add rule.
      • Rules based on: Under Rule 2, select a rule based on resource properties or tags or both. Enter values in the following fields if configuring for tags:
        • Select a compartment that includes the resources you want to filter.
        • Add one or more tags to the rule, which helps find only the resources that have these tags. Defined tags are listed based on your permissions to the tag namespace.
    6. If you selected Any of the following in step 4, add rules that are based on resource properties or tags. See step 5 for field descriptions.
    7. Select View resources.
    8. In the View Resources dialog box, verify the resources that are added based on the matching rules and then select Close.
    9. Select Save changes.
  • Use the oci fleet-apps-management fleet-resource update command and required parameters to update resources of a fleet:

    oci fleet-apps-management fleet-resource update --fleet-id <fleet_OCID> --fleet-resource-id <fleet_resource_OCID> [OPTIONS]

    For a complete list of flags and variable options for Fleet Application Management CLI commands, see the CLI for Fleet Application Management.

  • Run the UpdateFleetResource operation to update resources of a fleet.

    Example snippet: For a tenancy-wide rule, the rule you can pass as a payload can be as follows:
    "rules" : [
    		"basis" : "inventoryProperties",
    		"compartmentId" : "ocid1.tenancy.oc1..<unique_ID>",
    		"conditions" : [
    			{
    			"attrGroup" : "Instance",
    			"attrKey" : "*",
    			"attrValue" : "*"
    			}
    		]	
    	]
    

    If you need DB systems or VM clusters, add extra rules with wild card usage by setting the relevant resource types.