OCI Availability Domain Footprint Mapper for Oracle Cloud Infrastructure
Introduction of Python Tool That Maps OCI Resource Footprints Across Availability Domains For Resilience And Capacity Planning
Description
I built the OCI Availability Domain Footprint Mapper as a standalone, read-only OCI automation tool that maps Compute placement and network footprint by Availability Domain (AD). It generates timestamped JSON + Markdown reports and can optionally upload those artifacts to OCI Object Storage for easy sharing and repeatable auditing.
Codebase
Why This Is Useful
In real OCI environments, it is surprisingly easy for workloads to end up lopsided in one Availability Domain or concentrated in a small set of subnets. That can quietly reduce resilience, increase blast radius during failures and make capacity planning harder than it needs to be. This tool exists to give platform and operations teams a quick, repeatable way to understand where compute is placed, how IP usage is distributed and whether the deployment footprint looks balanced across ADs and subnets.
What The Tool Does
The tool scans your tenancy (optionally including subcompartments) and produces a clear footprint summary, including:
-
AD-level instance distribution
-
AD-level private/public IP distribution
-
Compartment-level footprint summary
-
Subnet occupancy summary
-
Top shape usage
-
A placement skew indicator with recommendation text (so you can immediately see if distribution looks healthy)
Behind the scenes, it uses OCI APIs across Identity, Compute, Virtual Network, and Object Storage and it avoids destructive operations.
High Level Architecture
This project is designed to be simple to operationalize from a Windows workstation, Cloud Shell-style environment or a CI runner:
-
Collect metadata via read-only calls to OCI Identity, Compute and VCN APIs.
-
Aggregate results into AD-level and subnet level summaries, plus a skew indicator.
-
Export a Markdown report for humans and JSON output for automation/diffing.
-
Archive (optional) the artifacts to OCI Object Storage using a consistent prefix and URI pattern.
Prerequisites
To run it, you need:
-
Python 3 and the dependencies in
requirements.txt -
OCI credentials configured (and permission to read Identity/Compute/VCN resources)
-
Optional: an OCI Object Storage bucket/namespace if you want uploads (the bucket can be auto discovered if omitted).
Expected Output
By default, the tool writes artifacts to output/ with a timestamped naming pattern:
-
ad_footprint_report_<timestamp>.json -
ad_footprint_report_<timestamp>.md
If uploads are enabled, it stores the same artifacts in Object Storage using a consistent URI pattern:
-
oci://<bucket>@<namespace>/<prefix>/ad_footprint_report_<timestamp>.json -
oci://<bucket>@<namespace>/<prefix>/ad_footprint_report_<timestamp>.md
Safety Notes
This tool is designed to be safe to run in production environments. It uses read-only calls to Identity/Compute/VCN APIs and the only write action is the optional Object Storage upload of the generated report artifacts.
Comments
Post a Comment