Skip to content

2.31.0.0-b371

@satvik279 satvik279 tagged this 20 Aug 06:37
Summary:
Adding support for  OCI instance configuration similar to GCP instance template.
YBA now accepts an OCI Instance Configuration OCID in the existing region-level instanceTemplate field. During node provisioning, YBA fetches the Instance Configuration using the OCID and uses its compatible launch attributes while continuing to override  using YBA-managed fields such as shape, image, subnet, metadata, and node identity.

Freeform tags from YBA and the Instance Configuration are merged with YBA taking precedence on duplicate keys. This may cause total number of tags to exceed the limit. If the merged result exceeds OCI’s 10-tag limit, provisioning fails with an actionable error listing the tag count and keys.

Test Plan:
manual testing

tested- creating provider with and without instance configuration - both pass

Enter a display name instead of an OCID. Enter an image, instance, or other non-configuration OCID. Enter an incomplete or malformed OCID. Validation rejects it.

tested edit provider by removing or adding instance config id , both pass

api call for creating provider with instance template

```
curl -X POST "http://localhost:9000/api/v1/customers/<cUUID>/providers" \
   -H "Content-Type: application/json" \
   -H "X-AUTH-YW-API-TOKEN: <apiToken>" \
   -d '{
     "code": "oci",
     "name": "oci-providertest30",
     "details": {
       "sshUser": "opc",
      "cloudInfo": {
         "oci": {
           "ociTenancyId": "<tenancy-ocid>",
           "ociUserId": "<user-ocid>",
           "ociFingerprint": "<fingerprint>",
           "ociPrivateKeyContent": "-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----",
           "ociCompartmentId": "compartment-ocid",
           "ociRegion": "us-sanjose-1"
         }
       }
    },
     "regions": [{
  "code": "us-sanjose-1",
  "name": "US West (San Jose)",
  "details": {
    "cloudInfo": {
      "oci": {
        "vnet": "<vnet-ocid>",
        "instanceTemplate": "<instance-configuration-ocid>"
      }
    }
  },
  "zones": [{
    "code": "us-sanjose-1-AD-1",
    "name": "us-sanjose-1-AD-1",
    "subnet": "<subnet-ocid>"
  }]
}]
 }'
```

Reviewers: anijhawan, nbhatia, nsingh, anabaria

Reviewed By: anabaria

Subscribers: yshchetinin, yugaware, nikhil

Differential Revision: https://phorge.dev.yugabyte.com/D55910
Assets 2
Loading