Attaching an Instance to a Lifecycle Environment

Add an instance to a lifecycle environment to associate it with a lifecycle stage in OS Management Hub.

When attaching an instance to a lifecycle stage, the service:

  • Detaches previously attached software sources from the instance.
  • Attaches the versioned custom software source associated with the lifecycle stage to the instance.
  • Installs all the packages and modules in the attached versioned custom software source to the instance.

If the lifecycle stage doesn't yet have a versioned custom software source promoted to it, no changes are made to the instance. However, you can no longer manage the instance as standalone (such as Updating a Standalone Instance). At the next promotion of a versioned custom software source, the service will refresh the packages and modules on the instance.

    1. Open the navigation menu and click Observability & Management. Under OS Management Hub, click Lifecycle environments.
    2. Under List scope, select the compartment that contains the lifecycle environment you're interested in.
    3. Click the name of the lifecycle environment.
    4. Under Resources, click Instances.
    5. Click Attach.
    6. Select the lifecycle stage to associate the instance with.
    7. Select the compartment the instance resides in.
    8. Select one or more instances to attach, and then click Select instances to attach.
      Note

      Available instances match the OS vendor, version, architecture, and location of the lifecycle environment. Offline instances or instances assigned to another group or lifecycle environment aren't listed.
    9. Repeat the preceding steps to select instances from other compartments.
    10. Review the instances that you selected. To remove instances, select them and click Remove instances from selection.
    11. Click Attach.
  • Use the oci os-management-hub lifecycle-stage attach-managed-instance command and required parameters to attach a managed instance to a lifecycle stage.

    oci os-management-hub lifecycle-stage attach-managed-instance --stage-id ocid --managed-instance-details instance.json [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the Command Line Reference.

  • Run the AttachManagedInstancesToLifecycleStage operation to attach a managed instance to a lifecycle stage.