Attaching Instances to a Compute Cluster

After you create a compute cluster, you can create instances within the cluster. The instances must be in the same compartment and availability domain as the cluster.

For steps to create a compute cluster, see Creating a Compute Cluster.

When you use the API, SDKs, or CLI to create instances in a compute cluster, provide the compute cluster's OCID with the launch instance operation. For steps to find the OCID of a compute cluster, see Retrieving a Compute Cluster's OCID.

If the placement (Availability Domains and Fault Domains) of the compute cluster doesn't have enough capacity for the instances that you create, you might get an out of capacity error. If that occurs, create a compute cluster in a different placement, and launch instances into the new compute cluster.

To remove instances from a compute cluster, delete (terminate) the instances.

For information about required IAM policies, see Compute Clusters.

    1. Navigate to the Compute Clusters list page. If you need help finding the list page, see Listing Compute Clusters.
    2. Select the compute cluster that you're interested in.
    3. Select Attach instance.
    4. Follow the steps to create an instance, with the following specific choices for this instance.
      1. In the Placement section, select Show advanced options.
      2. For Capacity type, ensure Compute cluster is selected. In the Compute cluster list, confirm that the compute cluster that you want to create the instance in is selected.
      3. In the Image and shape section, select Change shape. Select Bare metal machine, and then select a shape that supports compute clusters.
    5. Select Create.
  • Use the instance launch command and required parameters to create an instance in a compute cluster:

    oci compute instance launch --from-json <file://path/to/file.json>

    <file://path/to/file.json> is the path to a JSON file that defines the instance details. For information about how to generate an example of the JSON file, see Advanced JSON Options.

    For a complete list of flags and variable options for the Compute service CLI commands, see the command line reference for Compute.

  • For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.

    Use this API operation to get attach an instance to a compute cluster: