Prepare the Environment

Before you can use Java Management Service, you must ensure that your OCI environment is set up correctly. This is to allow the communication between all required components and cloud services.

Onboard Java Management Service

To onboard the service, use the Onboarding Wizard in the Oracle Cloud Infrastructure (OCI) Console or complete the steps manually. The Onboarding Wizard is the recommended option for users new to OCI.

  1. Sign in to the OCI Console as an administrator.
  2. Open the navigation menu, click Observability & Management, and then click Fleets under Java Management.
  3. Select the root compartment under which the Onboarding Wizard will create a new compartment for JMS fleets.
  4. Click Set up JMS to view details of the resources that the Onboarding Wizard will create.

    Note:

    If the Set up JMS button doesn't appear, then click the Inspect prerequisites button.
  5. JMS prerequisite details appear. By default, the following resources are created:
    1. Fleet_Compartment
      The compartment will house the fleets that you're going to create.
    2. Fleet_Managers
      The user group will begin with you as the sole user. You can add other users who are going to manage JMS.
    3. JMS_DYNAMIC_GROUP
      This dynamic group contains all of the managed instances that JMS will monitor.
    4. JMS_Policy_Fleet_Compartment
      This is the OCI Identity and Access Management policy name. All policies required for JMS are added to this policy document.
  6. Under Monitor OCI Instances , select the compartment that contains the OCI instances you want to monitor. To add more compartments, clickAdd Row.
  7. Click Review to see all the resource that will be created.
    1. Verify that the JMS_DYNAMIC_GROUP is setup with the following rules:
      ALL {resource.type='managementagent', resource.compartment.id=<Fleet_Compartment_OCID>}
      ANY {instance.compartment.id = <Fleet_Compartment_OCID>}
      ALL {resource.type='managementagent', resource.compartment.id=<OCI_Instance_Compartment_OCID>}
      ANY {instance.compartment.id = <OCI_Instance_Compartment_OCID>}
    2. Verify JMS_Policy_Fleet_Compartment is setup with the following rules:
      ALLOW GROUP FLEET_MANAGERS TO MANAGE fleet IN COMPARTMENT Fleet_Compartment
      ALLOW GROUP FLEET_MANAGERS TO MANAGE management-agents IN COMPARTMENT Fleet_Compartment
      ALLOW GROUP FLEET_MANAGERS TO MANAGE management-agent-install-keys IN COMPARTMENT Fleet_Compartment
      ALLOW GROUP FLEET_MANAGERS TO READ METRICS IN COMPARTMENT Fleet_Compartment
      ALLOW GROUP FLEET_MANAGERS TO MANAGE instance-family IN COMPARTMENT Fleet_Compartment
      ALLOW GROUP FLEET_MANAGERS TO READ instance-agent-plugins IN COMPARTMENT Fleet_Compartment
      ALLOW GROUP FLEET_MANAGERS TO MANAGE log-groups IN COMPARTMENT Fleet_Compartment
      ALLOW GROUP FLEET_MANAGERS TO MANAGE log-content IN COMPARTMENT Fleet_Compartment
      ALLOW GROUP FLEET_MANAGERS TO MANAGE jms-plugins IN COMPARTMENT Fleet_Compartment
      ALLOW GROUP FLEET_MANAGERS TO MANAGE instance-family IN COMPARTMENT <OCI_Instance_Compartment>
      ALLOW GROUP FLEET_MANAGERS TO READ instance-agent-plugins IN COMPARTMENT <OCI_Instance_Compartment>
       
      ALLOW DYNAMIC-GROUP JMS_DYNAMIC_GROUP TO USE METRICS IN COMPARTMENT Fleet_Compartment
      ALLOW DYNAMIC-GROUP JMS_DYNAMIC_GROUP TO MANAGE management-agents IN COMPARTMENT Fleet_Compartment
      ALLOW DYNAMIC-GROUP JMS_DYNAMIC_GROUP TO MANAGE log-content IN COMPARTMENT Fleet_Compartment
      ALLOW DYNAMIC-GROUP JMS_DYNAMIC_GROUP TO MANAGE jms-plugins IN COMPARTMENT Fleet_Compartment
      ALLOW DYNAMIC-GROUP JMS_DYNAMIC_GROUP TO MANAGE metrics IN COMPARTMENT Fleet_Compartment WHERE target.metrics.namespace='java_management_service'
      ALLOW DYNAMIC-GROUP JMS_Dynamic_Group TO MANAGE management-agents IN COMPARTMENT <OCI_Instance_Compartment>
      ALLOW DYNAMIC-GROUP JMS_DYNAMIC_GROUP TO USE METRICS IN COMPARTMENT <OCI_Instance_Compartment>
      ALLOW DYNAMIC-GROUP JMS_DYNAMIC_GROUP TO MANAGE jms-plugins IN COMPARTMENT <OCI_Instance_Compartment>
       
      ALLOW resource jms SERVER-COMPONENTS TO MANAGE metrics IN COMPARTMENT Fleet_Compartment WHERE target.metrics.namespace='java_management_service'
      ALLOW resource jms SERVER-COMPONENTS TO USE management-agent-install-keys IN COMPARTMENT Fleet_Compartment
      ALLOW resource jms SERVER-COMPONENTS TO MANAGE log-groups IN COMPARTMENT Fleet_Compartment
      ALLOW resource jms SERVER-COMPONENTS TO MANAGE log-content IN COMPARTMENT Fleet_Compartment
      ALLOW resource jms SERVER-COMPONENTS TO READ instances IN tenancy
      ALLOW resource jms SERVER-COMPONENTS TO INSPECT instance-agent-plugins IN tenancy
  8. Click Confirm at the bottom of the page to start the Onboarding Wizard.
  9. A screen informing you that the prerequisites have been successfully set-up will appear. Click Done to close the window.

    Note:

    An error message displays if an error occurs in the creation process. Resolve the error and restart the Onboarding Wizard to continue.

A JMS setup is successful notification message appears at the top.