Skip to content

Commit ac8523e

Browse files
lift-tenancy-usage-cost-reports
1 parent 996a000 commit ac8523e

File tree

9 files changed

+185
-0
lines changed

9 files changed

+185
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
Copyright (c) 2023 Oracle and/or its affiliates.
3+
4+
The Universal Permissive License (UPL), Version 1.0
5+
6+
Subject to the condition set forth below, permission is hereby granted to any
7+
person obtaining a copy of this software, associated documentation and/or data
8+
(collectively the "Software"), free of charge and under any and all copyright
9+
rights in the Software, and any and all patent rights owned or freely
10+
licensable by each licensor hereunder covering either (i) the unmodified
11+
Software as contributed to or provided by such licensor, or (ii) the Larger
12+
Works (as defined below), to deal in both
13+
14+
(a) the Software, and
15+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
16+
one is included with the Software (each a "Larger Work" to which the Software
17+
is contributed by such licensors),
18+
19+
without restriction, including without limitation the rights to copy, create
20+
derivative works of, display, perform, and distribute the Software and make,
21+
use, sell, offer for sale, import, export, have made, and have sold the
22+
Software and the Larger Work(s), and to sublicense the foregoing rights on
23+
either these or other terms.
24+
25+
This license is subject to the following condition:
26+
The above copyright notice and either this complete permission notice or at
27+
a minimum a reference to the UPL must be included in all copies or
28+
substantial portions of the Software.
29+
30+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36+
SOFTWARE.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Tenancy Usage and Cost Reports
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+
5+
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.
6+
7+
# When to use this asset?
8+
9+
Usage2ADW 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.
10+
11+
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-premises database estate.
12+
13+
This asset will provide the following key features and benefits:
14+
15+
1) Load Usage Report to ADW.
16+
2) Load Cost Reports to ADW.
17+
3) Load Public Rates to ADW.
18+
4) Report Usage Current State.
19+
5) Report Usage Over Time.
20+
6) Report Cost Analysis.
21+
7) Report Cost Over Time.
22+
8) Report Rate Card for Used Products.
23+
24+
# How to use this asset?
25+
26+
Here is an overview of how to use this asset:
27+
28+
Step 1: Provision ADW, OAC and a VM on Oracle cloud.
29+
Step 2: Deploy Usage2ADW scripts on VM.
30+
Step 3: Upload and restore catalog file on OAC.
31+
Step 4: Create necessary connections between OCI, ADW and OAC.
32+
Step 5: Refresh OAC dashboard to retrieve your tenancy usage and cost details.
33+
34+
Note: Usage2ADW can be downloaded from https://github.com/oracle/oci-python-sdk/tree/master/examples/usage_reports_to_adw .
35+
36+
37+
## License
38+
Copyright (c) 2023 Oracle and/or its affiliates.
39+
Licensed under the Universal Permissive License (UPL), Version 1.0.
40+
See [LICENSE](LICENSE) for more details.
88 KB
Loading
105 KB
Loading
55.9 KB
Loading
92.9 KB
Loading
123 KB
Loading
106 KB
Loading
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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+
![Alt text](image.png)
79+
80+
Figure 1. Representation of total cost incurred by compartments over period of time.
81+
82+
![Alt text](image-1.png)
83+
84+
Figure 2. Representation of total cost incurred by services over period of time.
85+
86+
![Alt text](image-2.png)
87+
88+
Figure 3. Representation of Oracle CPU usage in hours by compartments.
89+
90+
![Alt text](image-3.png)
91+
92+
Figure 4. Representation of running hours of each resource.
93+
94+
![Alt text](image-4.png)
95+
96+
Figure 5. Representation of profit earned each month and forecast for future months.
97+
98+
![Alt text](image-5.png)
99+
100+
101+
Figure 6. Representation of cost incurred each month.
102+
103+
104+
105+
106+
107+
108+
109+

0 commit comments

Comments
 (0)