oci-pricing-mcp 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +24 -0
- package/README.md +299 -0
- package/dist/data/cache.d.ts +50 -0
- package/dist/data/cache.d.ts.map +1 -0
- package/dist/data/cache.js +90 -0
- package/dist/data/cache.js.map +1 -0
- package/dist/data/fetcher.d.ts +96 -0
- package/dist/data/fetcher.d.ts.map +1 -0
- package/dist/data/fetcher.js +232 -0
- package/dist/data/fetcher.js.map +1 -0
- package/dist/data/pricing-data.json +6162 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +582 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/calculator.d.ts +17 -0
- package/dist/tools/calculator.d.ts.map +1 -0
- package/dist/tools/calculator.js +318 -0
- package/dist/tools/calculator.js.map +1 -0
- package/dist/tools/compute.d.ts +58 -0
- package/dist/tools/compute.d.ts.map +1 -0
- package/dist/tools/compute.js +172 -0
- package/dist/tools/compute.js.map +1 -0
- package/dist/tools/core.d.ts +70 -0
- package/dist/tools/core.d.ts.map +1 -0
- package/dist/tools/core.js +113 -0
- package/dist/tools/core.js.map +1 -0
- package/dist/tools/database.d.ts +66 -0
- package/dist/tools/database.d.ts.map +1 -0
- package/dist/tools/database.js +212 -0
- package/dist/tools/database.js.map +1 -0
- package/dist/tools/kubernetes.d.ts +65 -0
- package/dist/tools/kubernetes.d.ts.map +1 -0
- package/dist/tools/kubernetes.js +226 -0
- package/dist/tools/kubernetes.js.map +1 -0
- package/dist/tools/networking.d.ts +63 -0
- package/dist/tools/networking.d.ts.map +1 -0
- package/dist/tools/networking.js +248 -0
- package/dist/tools/networking.js.map +1 -0
- package/dist/tools/storage.d.ts +64 -0
- package/dist/tools/storage.d.ts.map +1 -0
- package/dist/tools/storage.js +175 -0
- package/dist/tools/storage.js.map +1 -0
- package/dist/types.d.ts +162 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core OCI Pricing Tools
|
|
3
|
+
* get_pricing, list_services, compare_regions
|
|
4
|
+
*/
|
|
5
|
+
import { getServicesCatalog, getComputePricing, getStoragePricing, getDatabasePricing, getNetworkingPricing, getKubernetesPricing, getRegions, getLastUpdated, } from '../data/fetcher.js';
|
|
6
|
+
export function getPricing(params) {
|
|
7
|
+
const { service, type, region } = params;
|
|
8
|
+
let items = [];
|
|
9
|
+
switch (service) {
|
|
10
|
+
case 'compute':
|
|
11
|
+
items = getComputePricing();
|
|
12
|
+
break;
|
|
13
|
+
case 'storage':
|
|
14
|
+
items = getStoragePricing();
|
|
15
|
+
break;
|
|
16
|
+
case 'database':
|
|
17
|
+
items = getDatabasePricing();
|
|
18
|
+
break;
|
|
19
|
+
case 'networking':
|
|
20
|
+
items = getNetworkingPricing();
|
|
21
|
+
break;
|
|
22
|
+
case 'kubernetes':
|
|
23
|
+
items = getKubernetesPricing();
|
|
24
|
+
break;
|
|
25
|
+
default:
|
|
26
|
+
throw new Error(`Unknown service: ${service}. Valid services: compute, storage, database, networking, kubernetes`);
|
|
27
|
+
}
|
|
28
|
+
// Filter by type if specified
|
|
29
|
+
if (type) {
|
|
30
|
+
const typeFilter = type.toLowerCase();
|
|
31
|
+
items = items.filter((item) => item.type.toLowerCase().includes(typeFilter) ||
|
|
32
|
+
item.description.toLowerCase().includes(typeFilter) ||
|
|
33
|
+
('shapeFamily' in item && String(item.shapeFamily).toLowerCase().includes(typeFilter)) ||
|
|
34
|
+
('storageType' in item && String(item.storageType).toLowerCase().includes(typeFilter)) ||
|
|
35
|
+
('databaseType' in item && String(item.databaseType).toLowerCase().includes(typeFilter)) ||
|
|
36
|
+
('networkingType' in item && String(item.networkingType).toLowerCase().includes(typeFilter)));
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
items,
|
|
40
|
+
service,
|
|
41
|
+
type,
|
|
42
|
+
region: region || 'all (OCI has consistent global pricing)',
|
|
43
|
+
lastUpdated: getLastUpdated(),
|
|
44
|
+
note: 'OCI pricing is consistent across all commercial regions. Government and sovereign regions may vary.',
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export function listServices(params = {}) {
|
|
48
|
+
const { category } = params;
|
|
49
|
+
let services = getServicesCatalog();
|
|
50
|
+
// Filter by category if specified
|
|
51
|
+
if (category) {
|
|
52
|
+
services = services.filter((s) => s.category === category);
|
|
53
|
+
}
|
|
54
|
+
// Get unique categories
|
|
55
|
+
const allServices = getServicesCatalog();
|
|
56
|
+
const categories = [...new Set(allServices.map((s) => s.category))];
|
|
57
|
+
return {
|
|
58
|
+
services,
|
|
59
|
+
categories,
|
|
60
|
+
totalCount: services.length,
|
|
61
|
+
lastUpdated: getLastUpdated(),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function compareRegions(params) {
|
|
65
|
+
const { service, type } = params;
|
|
66
|
+
const regions = getRegions();
|
|
67
|
+
// Get the pricing item
|
|
68
|
+
const pricingResult = getPricing({ service, type });
|
|
69
|
+
if (pricingResult.items.length === 0) {
|
|
70
|
+
return {
|
|
71
|
+
result: null,
|
|
72
|
+
regions,
|
|
73
|
+
note: `No pricing found for ${service}/${type}`,
|
|
74
|
+
lastUpdated: getLastUpdated(),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const item = pricingResult.items[0];
|
|
78
|
+
// Since OCI has consistent pricing, all regions have the same price
|
|
79
|
+
const regionPricing = regions
|
|
80
|
+
.filter((r) => r.type === 'commercial')
|
|
81
|
+
.map((r) => ({
|
|
82
|
+
region: r.name,
|
|
83
|
+
pricePerUnit: item.pricePerUnit,
|
|
84
|
+
unit: item.unit,
|
|
85
|
+
}));
|
|
86
|
+
const result = {
|
|
87
|
+
service: item.service,
|
|
88
|
+
type: item.type,
|
|
89
|
+
regions: regionPricing,
|
|
90
|
+
cheapestRegion: regionPricing[0]?.region,
|
|
91
|
+
mostExpensiveRegion: regionPricing[0]?.region,
|
|
92
|
+
priceDifferencePercent: 0,
|
|
93
|
+
};
|
|
94
|
+
return {
|
|
95
|
+
result,
|
|
96
|
+
regions,
|
|
97
|
+
note: 'OCI maintains consistent pricing across all commercial regions. This is different from AWS/Azure/GCP where prices vary by region.',
|
|
98
|
+
lastUpdated: getLastUpdated(),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* List all available OCI regions
|
|
103
|
+
*/
|
|
104
|
+
export function listRegions() {
|
|
105
|
+
const regions = getRegions();
|
|
106
|
+
const commercial = regions.filter((r) => r.type === 'commercial');
|
|
107
|
+
return {
|
|
108
|
+
regions,
|
|
109
|
+
commercialCount: commercial.length,
|
|
110
|
+
totalCount: regions.length,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/tools/core.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,cAAc,GACf,MAAM,oBAAoB,CAAC;AAY5B,MAAM,UAAU,UAAU,CAAC,MAAwB;IAQjD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAEzC,IAAI,KAAK,GAAkB,EAAE,CAAC;IAE9B,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,SAAS;YACZ,KAAK,GAAG,iBAAiB,EAA8B,CAAC;YACxD,MAAM;QACR,KAAK,SAAS;YACZ,KAAK,GAAG,iBAAiB,EAA8B,CAAC;YACxD,MAAM;QACR,KAAK,UAAU;YACb,KAAK,GAAG,kBAAkB,EAA8B,CAAC;YACzD,MAA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1B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC;SACtC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACX,MAAM,EAAE,CAAC,CAAC,IAA2F;QACrG,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC,CAAC,CAAC;IAEN,MAAM,MAAM,GAA2B;QACrC,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,aAAkD;QAC3D,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,MAAkD;QACpF,mBAAmB,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,MAAuD;QAC9F,sBAAsB,EAAE,CAAC;KAC1B,CAAC;IAEF,OAAO;QACL,MAAM;QACN,OAAO;QACP,IAAI,EAAE,mIAAmI;QACzI,WAAW,EAAE,cAAc,EAAE;KAC9B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IAKzB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;IAElE,OAAO;QACL,OAAO;QACP,eAAe,EAAE,UAAU,CAAC,MAAM;QAClC,UAAU,EAAE,OAAO,CAAC,MAAM;KAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OCI Database Pricing Tools
|
|
3
|
+
*/
|
|
4
|
+
export interface ListDatabaseOptionsParams {
|
|
5
|
+
type?: 'autonomous' | 'mysql' | 'postgresql' | 'nosql' | 'base-db' | 'exadata';
|
|
6
|
+
licenseType?: 'included' | 'byol';
|
|
7
|
+
}
|
|
8
|
+
export interface DatabaseOptionInfo {
|
|
9
|
+
name: string;
|
|
10
|
+
type: string;
|
|
11
|
+
description: string;
|
|
12
|
+
computePrice: number;
|
|
13
|
+
computeUnit: string;
|
|
14
|
+
storagePrice: number;
|
|
15
|
+
licenseIncluded: boolean;
|
|
16
|
+
monthlyExample: string;
|
|
17
|
+
notes?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* List available OCI database options with pricing
|
|
21
|
+
*/
|
|
22
|
+
export declare function listDatabaseOptions(params?: ListDatabaseOptionsParams): {
|
|
23
|
+
options: DatabaseOptionInfo[];
|
|
24
|
+
totalCount: number;
|
|
25
|
+
lastUpdated: string;
|
|
26
|
+
freeTierNote: string;
|
|
27
|
+
tips: string[];
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Calculate database cost for a given configuration
|
|
31
|
+
*/
|
|
32
|
+
export interface CalculateDatabaseCostParams {
|
|
33
|
+
type: 'autonomous-transaction-processing' | 'autonomous-data-warehouse' | 'autonomous-json' | 'mysql-heatwave' | 'postgresql' | 'nosql' | 'base-database-vm';
|
|
34
|
+
computeUnits: number;
|
|
35
|
+
storageGB: number;
|
|
36
|
+
licenseType?: 'included' | 'byol';
|
|
37
|
+
hoursPerMonth?: number;
|
|
38
|
+
}
|
|
39
|
+
export declare function calculateDatabaseCost(params: CalculateDatabaseCostParams): {
|
|
40
|
+
breakdown: Array<{
|
|
41
|
+
item: string;
|
|
42
|
+
quantity: number;
|
|
43
|
+
unit: string;
|
|
44
|
+
unitPrice: number;
|
|
45
|
+
monthlyTotal: number;
|
|
46
|
+
}>;
|
|
47
|
+
totalMonthly: number;
|
|
48
|
+
savings?: {
|
|
49
|
+
byolSavings: number;
|
|
50
|
+
percentSaved: number;
|
|
51
|
+
};
|
|
52
|
+
notes: string[];
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Compare database options for a given workload
|
|
56
|
+
*/
|
|
57
|
+
export declare function compareDatabaseOptions(workloadType: 'oltp' | 'analytics' | 'document' | 'general'): {
|
|
58
|
+
recommended: DatabaseOptionInfo[];
|
|
59
|
+
comparison: Array<{
|
|
60
|
+
name: string;
|
|
61
|
+
monthlyFor2Units100GB: number;
|
|
62
|
+
bestFor: string;
|
|
63
|
+
}>;
|
|
64
|
+
notes: string[];
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/tools/database.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,YAAY,GAAG,OAAO,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAC/E,WAAW,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,GAAE,yBAA8B,GAAG;IAC3E,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAqEA;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EACA,mCAAmC,GACnC,2BAA2B,GAC3B,iBAAiB,GACjB,gBAAgB,GAChB,YAAY,GACZ,OAAO,GACP,kBAAkB,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,2BAA2B,GAAG;IAC1E,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5G,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAwGA;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAC1D;IACD,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,UAAU,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,qBAAqB,EAAE,MAAM,CAAC;QAC9B,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CA2DA"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OCI Database Pricing Tools
|
|
3
|
+
*/
|
|
4
|
+
import { getDatabasePricing, getLastUpdated, getFreeTier } from '../data/fetcher.js';
|
|
5
|
+
/**
|
|
6
|
+
* List available OCI database options with pricing
|
|
7
|
+
*/
|
|
8
|
+
export function listDatabaseOptions(params = {}) {
|
|
9
|
+
let databases = getDatabasePricing();
|
|
10
|
+
// Filter by type
|
|
11
|
+
if (params.type) {
|
|
12
|
+
const typeFilter = params.type.toLowerCase();
|
|
13
|
+
databases = databases.filter((d) => d.databaseType?.toLowerCase().includes(typeFilter) ||
|
|
14
|
+
d.type?.toLowerCase().includes(typeFilter));
|
|
15
|
+
}
|
|
16
|
+
// Filter by license type
|
|
17
|
+
if (params.licenseType) {
|
|
18
|
+
if (params.licenseType === 'byol') {
|
|
19
|
+
databases = databases.filter((d) => d.byol === true);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
databases = databases.filter((d) => d.licenseIncluded === true && d.byol !== true);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
// Transform to user-friendly format
|
|
26
|
+
const options = databases.map((d) => {
|
|
27
|
+
const ecpuPrice = d.ecpuPrice;
|
|
28
|
+
const storagePrice = d.storagePrice || 0.0255;
|
|
29
|
+
const computePrice = ecpuPrice || d.pricePerUnit;
|
|
30
|
+
const computeUnit = ecpuPrice ? 'ECPU/hour' : d.unit;
|
|
31
|
+
// Calculate example monthly cost (2 ECPUs/OCPUs, 100 GB storage)
|
|
32
|
+
const exampleCompute = computePrice * 2 * 730;
|
|
33
|
+
const exampleStorage = storagePrice * 100;
|
|
34
|
+
const exampleTotal = Math.round((exampleCompute + exampleStorage) * 100) / 100;
|
|
35
|
+
return {
|
|
36
|
+
name: d.type,
|
|
37
|
+
type: d.databaseType || 'general',
|
|
38
|
+
description: d.description,
|
|
39
|
+
computePrice,
|
|
40
|
+
computeUnit,
|
|
41
|
+
storagePrice,
|
|
42
|
+
licenseIncluded: d.licenseIncluded,
|
|
43
|
+
monthlyExample: `~$${exampleTotal}/month for 2 ${ecpuPrice ? 'ECPU' : 'OCPU'}, 100 GB`,
|
|
44
|
+
notes: d.notes,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
// Get free tier info
|
|
48
|
+
const freeTier = getFreeTier();
|
|
49
|
+
const freeTierNote = freeTier?.database
|
|
50
|
+
? `Always Free: ${freeTier.database.autonomous}`
|
|
51
|
+
: 'Always Free includes 2 Autonomous Databases, 20 GB each';
|
|
52
|
+
return {
|
|
53
|
+
options,
|
|
54
|
+
totalCount: options.length,
|
|
55
|
+
lastUpdated: getLastUpdated(),
|
|
56
|
+
freeTierNote,
|
|
57
|
+
tips: [
|
|
58
|
+
'Autonomous Database BYOL saves ~76% if you have existing Oracle licenses',
|
|
59
|
+
'Autonomous JSON is cheapest for document workloads at $0.0807/ECPU/hr',
|
|
60
|
+
'MySQL HeatWave provides real-time analytics at no extra cost on ML queries',
|
|
61
|
+
'PostgreSQL is fully managed with HA options',
|
|
62
|
+
'NoSQL has generous free tier: 200M reads, 50M writes, 25 GB storage',
|
|
63
|
+
'ECPU pricing provides finer granularity than OCPU (1 ECPU increments)',
|
|
64
|
+
],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export function calculateDatabaseCost(params) {
|
|
68
|
+
const databases = getDatabasePricing();
|
|
69
|
+
const breakdown = [];
|
|
70
|
+
const notes = [];
|
|
71
|
+
const hoursPerMonth = params.hoursPerMonth || 730;
|
|
72
|
+
// Find the database pricing
|
|
73
|
+
const licenseFilter = params.licenseType === 'byol' ? '-byol' : '';
|
|
74
|
+
let db = databases.find((d) => d.databaseType === params.type ||
|
|
75
|
+
d.type?.toLowerCase().includes(params.type.toLowerCase().replace(/-/g, '')));
|
|
76
|
+
// If BYOL requested, try to find BYOL variant
|
|
77
|
+
if (params.licenseType === 'byol') {
|
|
78
|
+
const byolDb = databases.find((d) => (d.databaseType === params.type || d.type?.toLowerCase().includes(params.type.toLowerCase())) &&
|
|
79
|
+
d.byol === true);
|
|
80
|
+
if (byolDb)
|
|
81
|
+
db = byolDb;
|
|
82
|
+
}
|
|
83
|
+
if (!db) {
|
|
84
|
+
return {
|
|
85
|
+
breakdown: [],
|
|
86
|
+
totalMonthly: 0,
|
|
87
|
+
notes: [`Database type "${params.type}" not found`],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
// Compute cost
|
|
91
|
+
const ecpuPrice = db.ecpuPrice;
|
|
92
|
+
const computePrice = ecpuPrice || db.pricePerUnit;
|
|
93
|
+
const computeUnit = ecpuPrice ? 'ECPU' : 'OCPU';
|
|
94
|
+
const computeCost = computePrice * params.computeUnits * hoursPerMonth;
|
|
95
|
+
breakdown.push({
|
|
96
|
+
item: `${db.description} - Compute`,
|
|
97
|
+
quantity: params.computeUnits,
|
|
98
|
+
unit: computeUnit,
|
|
99
|
+
unitPrice: computePrice,
|
|
100
|
+
monthlyTotal: Math.round(computeCost * 100) / 100,
|
|
101
|
+
});
|
|
102
|
+
// Storage cost
|
|
103
|
+
const storagePrice = db.storagePrice || 0.0255;
|
|
104
|
+
const storageCost = storagePrice * params.storageGB;
|
|
105
|
+
breakdown.push({
|
|
106
|
+
item: `${db.description} - Storage`,
|
|
107
|
+
quantity: params.storageGB,
|
|
108
|
+
unit: 'GB',
|
|
109
|
+
unitPrice: storagePrice,
|
|
110
|
+
monthlyTotal: Math.round(storageCost * 100) / 100,
|
|
111
|
+
});
|
|
112
|
+
const totalMonthly = Math.round((computeCost + storageCost) * 100) / 100;
|
|
113
|
+
// Calculate BYOL savings if applicable
|
|
114
|
+
let savings;
|
|
115
|
+
if (params.type.startsWith('autonomous') && params.licenseType !== 'byol') {
|
|
116
|
+
// Find BYOL variant to show potential savings
|
|
117
|
+
const byolDb = databases.find((d) => d.databaseType === params.type && d.byol === true);
|
|
118
|
+
if (byolDb) {
|
|
119
|
+
const byolEcpuPrice = byolDb.ecpuPrice || byolDb.pricePerUnit;
|
|
120
|
+
const byolComputeCost = byolEcpuPrice * params.computeUnits * hoursPerMonth;
|
|
121
|
+
const byolTotal = byolComputeCost + storageCost;
|
|
122
|
+
const savedAmount = totalMonthly - byolTotal;
|
|
123
|
+
const percentSaved = Math.round((savedAmount / totalMonthly) * 100);
|
|
124
|
+
savings = {
|
|
125
|
+
byolSavings: Math.round(savedAmount * 100) / 100,
|
|
126
|
+
percentSaved,
|
|
127
|
+
};
|
|
128
|
+
notes.push(`BYOL option available: Save $${savings.byolSavings}/month (${percentSaved}%) with existing Oracle licenses`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (db.byol) {
|
|
132
|
+
notes.push('Price reflects BYOL (Bring Your Own License) - infrastructure only');
|
|
133
|
+
}
|
|
134
|
+
if (hoursPerMonth < 730) {
|
|
135
|
+
notes.push(`Calculated for ${hoursPerMonth} hours/month (not 24/7 usage)`);
|
|
136
|
+
}
|
|
137
|
+
if (params.type === 'autonomous-transaction-processing' || params.type === 'autonomous-data-warehouse') {
|
|
138
|
+
notes.push('Auto-scaling can increase compute beyond configured ECPUs - set limits to control costs');
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
breakdown,
|
|
142
|
+
totalMonthly,
|
|
143
|
+
savings,
|
|
144
|
+
notes,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Compare database options for a given workload
|
|
149
|
+
*/
|
|
150
|
+
export function compareDatabaseOptions(workloadType) {
|
|
151
|
+
const databases = getDatabasePricing();
|
|
152
|
+
// Filter relevant options based on workload
|
|
153
|
+
const workloadMap = {
|
|
154
|
+
oltp: ['autonomous-transaction-processing', 'mysql-heatwave', 'postgresql', 'base-database-vm'],
|
|
155
|
+
analytics: ['autonomous-data-warehouse', 'mysql-heatwave'],
|
|
156
|
+
document: ['autonomous-json', 'nosql'],
|
|
157
|
+
general: [
|
|
158
|
+
'autonomous-transaction-processing',
|
|
159
|
+
'mysql-heatwave',
|
|
160
|
+
'postgresql',
|
|
161
|
+
'nosql',
|
|
162
|
+
],
|
|
163
|
+
};
|
|
164
|
+
const relevantTypes = workloadMap[workloadType] || workloadMap.general;
|
|
165
|
+
const relevantDbs = databases.filter((d) => relevantTypes.some((t) => d.databaseType === t || d.type?.toLowerCase().includes(t.replace(/-/g, ''))) && d.byol !== true // Exclude BYOL variants for comparison
|
|
166
|
+
);
|
|
167
|
+
const comparison = relevantDbs.map((d) => {
|
|
168
|
+
const ecpuPrice = d.ecpuPrice;
|
|
169
|
+
const computePrice = ecpuPrice || d.pricePerUnit;
|
|
170
|
+
const storagePrice = d.storagePrice || 0.0255;
|
|
171
|
+
const monthly = computePrice * 2 * 730 + storagePrice * 100;
|
|
172
|
+
return {
|
|
173
|
+
name: d.type,
|
|
174
|
+
monthlyFor2Units100GB: Math.round(monthly * 100) / 100,
|
|
175
|
+
bestFor: getDatabaseUseCase(d.databaseType || d.type),
|
|
176
|
+
};
|
|
177
|
+
});
|
|
178
|
+
// Sort by price
|
|
179
|
+
comparison.sort((a, b) => a.monthlyFor2Units100GB - b.monthlyFor2Units100GB);
|
|
180
|
+
return {
|
|
181
|
+
recommended: relevantDbs.map((d) => ({
|
|
182
|
+
name: d.type,
|
|
183
|
+
type: d.databaseType || 'general',
|
|
184
|
+
description: d.description,
|
|
185
|
+
computePrice: d.ecpuPrice || d.pricePerUnit,
|
|
186
|
+
computeUnit: d.ecpuPrice ? 'ECPU/hour' : d.unit,
|
|
187
|
+
storagePrice: d.storagePrice || 0.0255,
|
|
188
|
+
licenseIncluded: d.licenseIncluded,
|
|
189
|
+
monthlyExample: '',
|
|
190
|
+
notes: d.notes,
|
|
191
|
+
})),
|
|
192
|
+
comparison,
|
|
193
|
+
notes: [
|
|
194
|
+
`For ${workloadType} workloads, cheapest option: ${comparison[0]?.name} at $${comparison[0]?.monthlyFor2Units100GB}/month`,
|
|
195
|
+
'Always Free tier includes 2 Autonomous Databases (20 GB each)',
|
|
196
|
+
],
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function getDatabaseUseCase(type) {
|
|
200
|
+
const useCases = {
|
|
201
|
+
'autonomous-transaction-processing': 'High-performance OLTP, mixed workloads',
|
|
202
|
+
'autonomous-data-warehouse': 'Analytics, BI, data warehousing',
|
|
203
|
+
'autonomous-json': 'Document databases, JSON workloads',
|
|
204
|
+
'mysql-heatwave': 'MySQL apps, real-time analytics',
|
|
205
|
+
'postgresql': 'PostgreSQL apps, open source preference',
|
|
206
|
+
'nosql': 'Key-value, serverless apps, IoT',
|
|
207
|
+
'base-database-vm': 'Traditional Oracle Database workloads',
|
|
208
|
+
'exadata-cloud': 'Mission-critical, highest performance',
|
|
209
|
+
};
|
|
210
|
+
return useCases[type] || 'General database workloads';
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/tools/database.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAmBrF;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAoC,EAAE;IAOxE,IAAI,SAAS,GAAG,kBAAkB,EAAE,CAAC;IAErC,iBAAiB;IACjB,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAChB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAC7C,SAAS,GAAG,SAAS,CAAC,MAAM,CAC1B,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC,YAAY,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC;YAClD,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAC7C,CAAC;IACJ,CAAC;IAED,yBAAyB;IACzB,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,IAAI,MAAM,CAAC,WAAW,KAAK,MAAM,EAAE,CAAC;YAClC,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAE,CAAwB,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QAC/E,CAAC;aAAM,CAAC;YACN,SAAS,GAAG,SAAS,CAAC,MAAM,CAC1B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,KAAK,IAAI,IAAK,CAAwB,CAAC,IAAI,KAAK,I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AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAY;IACtC,MAAM,QAAQ,GAA2B;QACvC,mCAAmC,EAAE,wCAAwC;QAC7E,2BAA2B,EAAE,iCAAiC;QAC9D,iBAAiB,EAAE,oCAAoC;QACvD,gBAAgB,EAAE,iCAAiC;QACnD,YAAY,EAAE,yCAAyC;QACvD,OAAO,EAAE,iCAAiC;QAC1C,kBAAkB,EAAE,uCAAuC;QAC3D,eAAe,EAAE,uCAAuC;KACzD,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,4BAA4B,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OCI Kubernetes (OKE) Pricing Tools
|
|
3
|
+
*/
|
|
4
|
+
export interface ListKubernetesOptionsParams {
|
|
5
|
+
clusterType?: 'basic' | 'enhanced' | 'virtual-nodes';
|
|
6
|
+
}
|
|
7
|
+
export interface KubernetesOptionInfo {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
managementFee: number;
|
|
12
|
+
unit: string;
|
|
13
|
+
monthlyExample: string;
|
|
14
|
+
features: string[];
|
|
15
|
+
notes?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List available OKE (Kubernetes) options with pricing
|
|
19
|
+
*/
|
|
20
|
+
export declare function listKubernetesOptions(params?: ListKubernetesOptionsParams): {
|
|
21
|
+
options: KubernetesOptionInfo[];
|
|
22
|
+
totalCount: number;
|
|
23
|
+
lastUpdated: string;
|
|
24
|
+
keyPoints: string[];
|
|
25
|
+
tips: string[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Calculate OKE cluster cost for a given configuration
|
|
29
|
+
*/
|
|
30
|
+
export interface CalculateKubernetesCostParams {
|
|
31
|
+
clusterType: 'basic' | 'enhanced';
|
|
32
|
+
nodeCount: number;
|
|
33
|
+
nodeShape: string;
|
|
34
|
+
nodeOcpus: number;
|
|
35
|
+
nodeMemoryGB: number;
|
|
36
|
+
virtualNodes?: {
|
|
37
|
+
podOcpus: number;
|
|
38
|
+
podMemoryGB: number;
|
|
39
|
+
hoursPerMonth: number;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export declare function calculateKubernetesCost(params: CalculateKubernetesCostParams): {
|
|
43
|
+
breakdown: Array<{
|
|
44
|
+
item: string;
|
|
45
|
+
quantity: number;
|
|
46
|
+
unit: string;
|
|
47
|
+
unitPrice: number;
|
|
48
|
+
monthlyTotal: number;
|
|
49
|
+
}>;
|
|
50
|
+
totalMonthly: number;
|
|
51
|
+
perNodeCost: number;
|
|
52
|
+
notes: string[];
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Compare OKE pricing with EKS/AKS/GKE
|
|
56
|
+
*/
|
|
57
|
+
export declare function compareKubernetesProviders(nodeCount: number, nodeOcpus: number, nodeMemoryGB: number): {
|
|
58
|
+
ociBasic: number;
|
|
59
|
+
ociEnhanced: number;
|
|
60
|
+
awsEks: number;
|
|
61
|
+
azureAks: number;
|
|
62
|
+
gcpGke: number;
|
|
63
|
+
notes: string[];
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=kubernetes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kubernetes.d.ts","sourceRoot":"","sources":["../../src/tools/kubernetes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,2BAA2B;IAC1C,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,eAAe,CAAC;CACtD;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CA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