|
| 1 | +# Introduction |
| 2 | + |
| 3 | +Usage2ADW is a tool which uses the Python SDK to extract the usage and cost reports from OCI tenancy and load it to Oracle Autonomous Database. It is an extension to OCI's native Billing & Cost management capabilities, to provide customers with granular understanding of their spend and utilization of OCI. Using ADW and OAC features, this solution can provide high-level overview, in-depth spend analysis, trends in resource utilization and forecast as well. |
| 4 | +OCI automatically generates usage data and is stored in an Oracle owned Object Storage bucket. It contains one row per each OCI resource per hour along with consumption information, metadata, namespace and tags. Usage2ADW load this data to ADW database and OAC visualizations can be created on top of this database. |
| 5 | + |
| 6 | +## Required technical skills |
| 7 | + |
| 8 | +- Python scripting. |
| 9 | +- Oracle SQL. |
| 10 | +- Oracle Analytics Cloud (OAC). |
| 11 | +- Application Express (Apex). |
| 12 | + |
| 13 | +## OCI APIs Used |
| 14 | + |
| 15 | +- IdentityClient.list_compartments - Policy COMPARTMENT_INSPECT |
| 16 | +- IdentityClient.get_tenancy - Policy TENANCY_INSPECT |
| 17 | +- ObjectStorageClient.list_objects - Policy OBJECT_INSPECT |
| 18 | +- ObjectStorageClient.get_object - Policy OBJECT_READ |
| 19 | + |
| 20 | +## SDK Modules Used |
| 21 | + |
| 22 | +- oci.identity.IdentityClient |
| 23 | +- oci.object_storage.ObjectStorageClient |
| 24 | + |
| 25 | +## OCI Resources Used |
| 26 | + |
| 27 | +- Compute VM: The compute VM houses install script to create the required data structures and installs the package and Apex application. All data integrations to retrieve OCI information and load into ADW tables are run on the compute VM. |
| 28 | + |
| 29 | +- Oracle Analytics Cloud: OAC instance will contain Dashboards and Visualization of the cost and usage reports. |
| 30 | + |
| 31 | +- Autonomous Data Warehouse: ADW instance will be used to store and process the cost and usage data and effectively support a data mart that will provide usage and cost visibility of the tenancy and different dimensions like tenancy, region, project, environments. |
| 32 | + |
| 33 | +- ADW Private Endpoint: PE is used in order that ADW to be deployed on a private subnet and hence be only accessible from private connection and not from internet. |
| 34 | + |
| 35 | +- AC Private Access Channel: PAC provides the connectivity to private database from Oracle Analytics Cloud. It will enable a private endpoint in a private subnet of the Virtual Cloud Network (VCN) of OCI that will let OAC query the private ADW using the private endpoint of ADW. |
| 36 | + |
| 37 | +## Main features: |
| 38 | + |
| 39 | +- Load Usage Report to ADW. |
| 40 | +- Load Cost Reports to ADW. |
| 41 | +- Load Public Rates to ADW. |
| 42 | +- Report Usage Current State. |
| 43 | +- Report Usage Over Time. |
| 44 | +- Report Cost Analysis. |
| 45 | +- Report Cost Over Time. |
| 46 | +- Report Rate Card for Used Products. |
| 47 | + |
| 48 | +# Business Value |
| 49 | + |
| 50 | + With Usage2ADW, the customer will enjoy the benefits of an analytics platform with dashboards and data visualizations that provide cost by OCI Resources, PaaS and IaaS services and can be grouped by regions, compartments, etc. for budgetary purpose and chargeback. The analysis can be personalized by application, department, based on custom tags. Additionally, performance monitoring and utilization metrics will be available for applications running on OCI compute instances. |
| 51 | + |
| 52 | +## Use case |
| 53 | + |
| 54 | +When the extension Usage2ADW is implemented, the user through a dashboard will be able to visualize usage and cost reports over the dimension values. The Tag Namespace and Keys can be used to classify and group resources for Usage and Costing visibility. |
| 55 | +The Usage and Cost Reports provides customers granular understanding of their spend and utilization of OCI. This solution provides in-depth spend analysis on OCI. It includes high-level overview for executives, resource and cost trends for line of business application owners, trends in resource utilization and more. Usage2ADW is ideal for self-service analysis and allows users to build their own visualizations and enrich the analysis by bringing in their own data like departmental budgets. Customers can leverage a management module to securely retrieve their tenancy cost and usage data. The module can also be configured to retrieve multiple OCI tenancies data for analysis. This solution extends the core Usage2ADW solution with an integration to retrieve usage and cost metrics from other sources, in particular from OEM for the customer on-prem database estate. |
| 56 | + |
| 57 | +The implemented solution satisfies a broader set of functional requirements like: |
| 58 | + |
| 59 | +- Provides the cost of a specific instance. |
| 60 | +- Plot the cost evolution of a specific project over 1, 3, 6, 12, 24 months. |
| 61 | +- Plot the usage evolution of a specific instance per days & months. |
| 62 | +- View the current global consumption. |
| 63 | +- Predict of the consumption. |
| 64 | +- Plan budget in a better way. |
| 65 | + |
| 66 | + |
| 67 | + The solution can also be extended with the following set of capabilities using OCI Tags and drill-down features: |
| 68 | + |
| 69 | +- Extract and Load OCI Tags and Resource Identifiers into the database. |
| 70 | +- Define Meta-Data information about OCI Tags on OCI Resource Identifiers. |
| 71 | +- Data model for Oracle Analytics Cloud (OAC), extended tables for Tags, Meta-Data and Resource Identifies tables. |
| 72 | +- Custom Canvas/Report in OAC based on the Data Model with drill-down capabilities. |
| 73 | + |
| 74 | +## Sample visualizations |
| 75 | + |
| 76 | +Below are few visualizations that can be derived out of OCI usage data, using Usage2ADW. |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | +Figure 1. Representation of total cost incurred by compartments over period of time. |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +Figure 2. Representation of total cost incurred by services over period of time. |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +Figure 3. Representation of Oracle CPU usage in hours by compartments. |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | +Figure 4. Representation of running hours of each resource. |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | +Figure 5. Representation of profit earned each month and forecast for future months. |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +Figure 6. Representation of cost incurred each month. |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
0 commit comments