Repository navigation
Add Oracle Cloud Infrastructure (OCI) as a provider - #7174
gadgilrajeev wants to merge 5 commits into
Conversation
Reworks the OCI provider from the oci-provider branch (originally proposed in GoogleCloudPlatform#4061) on top of current master: - VMs: launch via the oci CLI with Flex shape config (OCPUs/memory), boot volume size, preemptible instances, fault/availability domain selection, start/stop, interruption detection and resource metadata. Images are resolved per os_type (Ubuntu 22.04/24.04, Oracle Linux 8/9), by display name, or by OCID. - Zones are OCI regions with an optional "-ad-N" availability domain suffix, e.g. us-ashburn-1-ad-2. VMs in a region share one VCN. - Networking: VCN, internet gateway, default route and a regional subnet, with intra-VCN traffic allowed. OciFirewall opens TCP/UDP ports and ICMP on the VCN security list. --oci_network_name reuses an existing VCN without modifying it. - Disks: block volumes with disk types mapped to VPUs/GB (lower_cost, balanced, higher_performance, ultra_high_performance), paravirtualized or iSCSI attachment at consistent device paths, and striping via the standard scratch disk strategies. - Unit tests for util, network, firewall, disk and VM modules, plus docs and default config constants.
|
@s-deitz @anksena, reviving the OCI provider from #4061. You'd agreed in principle to accept it back then, but it ended up on the backburner after I closed that PR because of conflicts. I'd like to pick it up again now: this PR is rebuilt on current master, without the unrelated docs/scripts changes you flagged, and includes unit tests. I'm happy to maintain the OCI provider going forward, so it won't be left for your team to keep working. |
# Conflicts: # CHANGES.next.md
|
Thanks @gadgilrajeev. I appreciate the offer to maintain this provider. It has been quite some time. As a result, I've opened a new discussion internally to review the intent of this PR and will try to respond by next week. |
# Conflicts: # CHANGES.next.md
Keep both the OCI and spanner_omni_cluster entries in CHANGES.next.md, and switch the OCI tests to unittest.mock to match master's migration away from the mock package.
|
Hi @gadgilrajeev - After internal discussion, I'd like to flag the OCI ToS. These ToS have certain clauses that restrict performance benchmarking on OCI. Do you have a contact at OCI? If so, we'd be happy to accept this PR if the ToS are changed. |
|
Thanks @s-deitz, that’s a fair concern, and I appreciate the team taking the time to discuss it. I’ll pursue this through Oracle’s partner channel at Oracle and ask whether they’d revise the benchmarking clause, or give PKB a written exemption, so OCI can be benchmarked the same way the other providers are. I’ll report back here once I hear from them. In the meantime I’ll keep this PR rebased on master so it’s ready to go. |
Adds Oracle Cloud Infrastructure (OCI) as a PKB provider. This replaces #4061, which was closed because of conflicts with master; the provider has been reworked on top of current master and the unrelated
docs/,bash_scripts/andconfig_files/changes from that PR are gone.The provider drives the
ociCLI, in the same style as the DigitalOcean and AliCloud providers.What's supported
--os_type=ubuntu2204|ubuntu2404|ol8|ol9). Platform images are resolved per OS and shape;--imagealso accepts an image display name or OCID. Flex shapes are sized with--oci_ocpus/--oci_memory_in_gbs. Also supports boot disk size, preemptible instances (--oci_preemptible) with interruption detection, fault/availability domain selection, start/stop, and resource metadata. Capacity and quota launch errors map toInsufficientCapacityCloudFailure/QuotaFailure.--zoneis an OCI region, optionally with an-ad-Nsuffix to choose an availability domain (e.g.us-ashburn-1-ad-2), similar to AWS zones. VMs in a region share one network.OciFirewallopens TCP/UDP ports and ICMP on the VCN's default security list.--oci_network_namereuses an existing VCN without modifying its security list.disk_typemapped to VPUs/GB (lower_cost,balanced,higher_performance,ultra_high_performance), overridable with--oci_vpus_per_gb. Paravirtualized (default) or iSCSI attachment at consistent device paths; striping works through the standard scratch disk strategies. Local NVMe disks are not supported yet.~/.oci/configprofile from--oci_profile(defaultDEFAULT) and--oci_compartment_idor theoci_cli_rcdefault.Setup docs are in
perfkitbenchmarker/providers/README.md, plus default config constants, a README example and a CHANGES entry.Testing
tests/providers/oci/(util, network/firewall, disk, VM): 106 tests, all passing withpython -m unittestper file.pyink(flags from CONTRIBUTING.md) andlint-diffsare clean for the changed files.Example:
./pkb.py --cloud=OCI --benchmarks=iperf --machine_type=VM.Standard.E5.Flex \ --oci_ocpus=2 --zone=us-ashburn-1 --os_type=ol9