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,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OCI Kubernetes (OKE) Pricing Tools
|
|
3
|
+
*/
|
|
4
|
+
import { getKubernetesPricing, getComputePricing, getLastUpdated } from '../data/fetcher.js';
|
|
5
|
+
/**
|
|
6
|
+
* List available OKE (Kubernetes) options with pricing
|
|
7
|
+
*/
|
|
8
|
+
export function listKubernetesOptions(params = {}) {
|
|
9
|
+
let k8s = getKubernetesPricing();
|
|
10
|
+
// Filter by cluster type
|
|
11
|
+
if (params.clusterType) {
|
|
12
|
+
const typeFilter = params.clusterType.toLowerCase();
|
|
13
|
+
k8s = k8s.filter((k) => k.type?.toLowerCase().includes(typeFilter));
|
|
14
|
+
}
|
|
15
|
+
// Transform to user-friendly format
|
|
16
|
+
const options = k8s.map((k) => {
|
|
17
|
+
const fee = k.clusterManagementFee || k.pricePerUnit;
|
|
18
|
+
const isFree = fee === 0;
|
|
19
|
+
return {
|
|
20
|
+
name: k.type,
|
|
21
|
+
type: k.type?.includes('virtual') ? 'serverless' : k.type?.includes('enhanced') ? 'enhanced' : 'basic',
|
|
22
|
+
description: k.description,
|
|
23
|
+
managementFee: fee,
|
|
24
|
+
unit: k.unit,
|
|
25
|
+
monthlyExample: isFree
|
|
26
|
+
? 'FREE (pay only for worker nodes)'
|
|
27
|
+
: `$${Math.round(fee * 730 * 100) / 100}/month per cluster`,
|
|
28
|
+
features: getOKEFeatures(k.type),
|
|
29
|
+
notes: k.notes,
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
options,
|
|
34
|
+
totalCount: options.length,
|
|
35
|
+
lastUpdated: getLastUpdated(),
|
|
36
|
+
keyPoints: [
|
|
37
|
+
'OKE Basic clusters are FREE - pay only for worker node compute',
|
|
38
|
+
'OKE Enhanced clusters: $0.10/hour ($73/month) with 99.95% SLA',
|
|
39
|
+
'Virtual Nodes: Serverless pods, pay per OCPU and memory used',
|
|
40
|
+
'Control plane is always managed by OCI at no extra charge',
|
|
41
|
+
],
|
|
42
|
+
tips: [
|
|
43
|
+
'Start with Basic cluster - upgrade to Enhanced when you need SLA guarantees',
|
|
44
|
+
'Use A1.Flex (Arm) nodes for significant cost savings',
|
|
45
|
+
'Virtual Nodes eliminate node management but have higher per-pod cost',
|
|
46
|
+
'Consider spot/preemptible instances for non-critical workloads',
|
|
47
|
+
'OKE includes built-in integration with OCI networking, storage, IAM',
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function getOKEFeatures(type) {
|
|
52
|
+
const features = {
|
|
53
|
+
'oke-cluster-management': [
|
|
54
|
+
'Managed Kubernetes control plane',
|
|
55
|
+
'Auto-upgrade support',
|
|
56
|
+
'kubectl/API access',
|
|
57
|
+
],
|
|
58
|
+
'oke-basic-cluster': [
|
|
59
|
+
'No management fee',
|
|
60
|
+
'Standard Kubernetes features',
|
|
61
|
+
'Manual node management',
|
|
62
|
+
'Community support',
|
|
63
|
+
],
|
|
64
|
+
'oke-enhanced-cluster': [
|
|
65
|
+
'99.95% SLA',
|
|
66
|
+
'Virtual nodes support',
|
|
67
|
+
'Workload identity',
|
|
68
|
+
'Cluster add-ons management',
|
|
69
|
+
'Premium support eligible',
|
|
70
|
+
],
|
|
71
|
+
'oke-virtual-node': [
|
|
72
|
+
'Serverless pods',
|
|
73
|
+
'No node management',
|
|
74
|
+
'Auto-scaling',
|
|
75
|
+
'Pay per pod resources',
|
|
76
|
+
],
|
|
77
|
+
'oke-virtual-node-memory': [
|
|
78
|
+
'Memory for virtual node pods',
|
|
79
|
+
],
|
|
80
|
+
};
|
|
81
|
+
return features[type] || ['Standard OKE features'];
|
|
82
|
+
}
|
|
83
|
+
export function calculateKubernetesCost(params) {
|
|
84
|
+
const k8s = getKubernetesPricing();
|
|
85
|
+
const compute = getComputePricing();
|
|
86
|
+
const breakdown = [];
|
|
87
|
+
const notes = [];
|
|
88
|
+
// Cluster management fee
|
|
89
|
+
if (params.clusterType === 'enhanced') {
|
|
90
|
+
const enhancedCluster = k8s.find((k) => k.type === 'oke-enhanced-cluster');
|
|
91
|
+
if (enhancedCluster) {
|
|
92
|
+
const clusterFee = enhancedCluster.clusterManagementFee || enhancedCluster.pricePerUnit;
|
|
93
|
+
const clusterCost = clusterFee * 730;
|
|
94
|
+
breakdown.push({
|
|
95
|
+
item: 'OKE Enhanced Cluster',
|
|
96
|
+
quantity: 1,
|
|
97
|
+
unit: 'cluster',
|
|
98
|
+
unitPrice: clusterFee,
|
|
99
|
+
monthlyTotal: Math.round(clusterCost * 100) / 100,
|
|
100
|
+
});
|
|
101
|
+
notes.push('Enhanced cluster includes 99.95% SLA and advanced features');
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
breakdown.push({
|
|
106
|
+
item: 'OKE Basic Cluster',
|
|
107
|
+
quantity: 1,
|
|
108
|
+
unit: 'cluster',
|
|
109
|
+
unitPrice: 0,
|
|
110
|
+
monthlyTotal: 0,
|
|
111
|
+
});
|
|
112
|
+
notes.push('Basic cluster is FREE - control plane management included');
|
|
113
|
+
}
|
|
114
|
+
// Worker node compute cost
|
|
115
|
+
const nodeShape = compute.find((c) => c.shapeFamily?.toLowerCase() === params.nodeShape.toLowerCase());
|
|
116
|
+
if (nodeShape) {
|
|
117
|
+
// OCPU cost per node
|
|
118
|
+
const nodeOcpuCost = nodeShape.ocpuPrice * params.nodeOcpus * 730;
|
|
119
|
+
const totalOcpuCost = nodeOcpuCost * params.nodeCount;
|
|
120
|
+
breakdown.push({
|
|
121
|
+
item: `Worker Nodes - ${nodeShape.shapeFamily} OCPUs`,
|
|
122
|
+
quantity: params.nodeCount * params.nodeOcpus,
|
|
123
|
+
unit: 'OCPU',
|
|
124
|
+
unitPrice: nodeShape.ocpuPrice,
|
|
125
|
+
monthlyTotal: Math.round(totalOcpuCost * 100) / 100,
|
|
126
|
+
});
|
|
127
|
+
// Memory cost per node
|
|
128
|
+
const nodeMemoryCost = nodeShape.memoryPricePerGB * params.nodeMemoryGB * 730;
|
|
129
|
+
const totalMemoryCost = nodeMemoryCost * params.nodeCount;
|
|
130
|
+
breakdown.push({
|
|
131
|
+
item: `Worker Nodes - ${nodeShape.shapeFamily} Memory`,
|
|
132
|
+
quantity: params.nodeCount * params.nodeMemoryGB,
|
|
133
|
+
unit: 'GB',
|
|
134
|
+
unitPrice: nodeShape.memoryPricePerGB,
|
|
135
|
+
monthlyTotal: Math.round(totalMemoryCost * 100) / 100,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
notes.push(`Node shape "${params.nodeShape}" not found - compute costs not included`);
|
|
140
|
+
}
|
|
141
|
+
// Virtual nodes (if specified)
|
|
142
|
+
if (params.virtualNodes) {
|
|
143
|
+
const virtualNodeOcpu = k8s.find((k) => k.type === 'oke-virtual-node');
|
|
144
|
+
const virtualNodeMemory = k8s.find((k) => k.type === 'oke-virtual-node-memory');
|
|
145
|
+
if (virtualNodeOcpu && virtualNodeMemory) {
|
|
146
|
+
const vnOcpuCost = virtualNodeOcpu.pricePerUnit * params.virtualNodes.podOcpus * params.virtualNodes.hoursPerMonth;
|
|
147
|
+
const vnMemoryCost = virtualNodeMemory.pricePerUnit * params.virtualNodes.podMemoryGB * params.virtualNodes.hoursPerMonth;
|
|
148
|
+
breakdown.push({
|
|
149
|
+
item: 'Virtual Node Pod OCPUs',
|
|
150
|
+
quantity: params.virtualNodes.podOcpus,
|
|
151
|
+
unit: 'OCPU',
|
|
152
|
+
unitPrice: virtualNodeOcpu.pricePerUnit,
|
|
153
|
+
monthlyTotal: Math.round(vnOcpuCost * 100) / 100,
|
|
154
|
+
});
|
|
155
|
+
breakdown.push({
|
|
156
|
+
item: 'Virtual Node Pod Memory',
|
|
157
|
+
quantity: params.virtualNodes.podMemoryGB,
|
|
158
|
+
unit: 'GB',
|
|
159
|
+
unitPrice: virtualNodeMemory.pricePerUnit,
|
|
160
|
+
monthlyTotal: Math.round(vnMemoryCost * 100) / 100,
|
|
161
|
+
});
|
|
162
|
+
notes.push(`Virtual nodes calculated for ${params.virtualNodes.hoursPerMonth} hours/month`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const totalMonthly = breakdown.reduce((sum, item) => sum + item.monthlyTotal, 0);
|
|
166
|
+
// Calculate per-node cost for reference
|
|
167
|
+
const nodeComputeItems = breakdown.filter((b) => b.item.includes('Worker Nodes'));
|
|
168
|
+
const totalNodeCost = nodeComputeItems.reduce((sum, item) => sum + item.monthlyTotal, 0);
|
|
169
|
+
const perNodeCost = params.nodeCount > 0 ? Math.round((totalNodeCost / params.nodeCount) * 100) / 100 : 0;
|
|
170
|
+
return {
|
|
171
|
+
breakdown,
|
|
172
|
+
totalMonthly: Math.round(totalMonthly * 100) / 100,
|
|
173
|
+
perNodeCost,
|
|
174
|
+
notes,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Compare OKE pricing with EKS/AKS/GKE
|
|
179
|
+
*/
|
|
180
|
+
export function compareKubernetesProviders(nodeCount, nodeOcpus, nodeMemoryGB) {
|
|
181
|
+
// Get OCI compute pricing for comparison
|
|
182
|
+
const compute = getComputePricing();
|
|
183
|
+
const e5Shape = compute.find((c) => c.shapeFamily === 'VM.Standard.E5.Flex');
|
|
184
|
+
// Calculate OCI costs
|
|
185
|
+
const ociNodeCost = e5Shape
|
|
186
|
+
? (e5Shape.ocpuPrice * nodeOcpus + e5Shape.memoryPricePerGB * nodeMemoryGB) * 730 * nodeCount
|
|
187
|
+
: 0;
|
|
188
|
+
const ociBasic = Math.round(ociNodeCost * 100) / 100;
|
|
189
|
+
const ociEnhanced = Math.round((ociNodeCost + 73) * 100) / 100; // +$73/month for enhanced
|
|
190
|
+
// Rough estimates for other providers (based on similar 4 OCPU / 8 vCPU, 32GB instances)
|
|
191
|
+
// AWS: EKS cluster $73/month + EC2 costs (~$0.10-0.15/vCPU/hr)
|
|
192
|
+
// Azure: AKS free control plane + VM costs
|
|
193
|
+
// GCP: GKE $73/month (standard) + VM costs
|
|
194
|
+
// Using rough vCPU rates for comparison (1 OCPU = 2 vCPUs)
|
|
195
|
+
const vCpuCount = nodeOcpus * 2 * nodeCount;
|
|
196
|
+
const awsVcpuRate = 0.048; // Rough rate for m6i in us-east-1
|
|
197
|
+
const awsMemoryRate = 0.006;
|
|
198
|
+
const awsComputeCost = (awsVcpuRate * vCpuCount + awsMemoryRate * nodeMemoryGB * nodeCount) * 730;
|
|
199
|
+
const awsEks = Math.round((awsComputeCost + 73) * 100) / 100; // EKS cluster fee
|
|
200
|
+
// Azure AKS - free control plane
|
|
201
|
+
const azureVcpuRate = 0.045;
|
|
202
|
+
const azureMemoryRate = 0.005;
|
|
203
|
+
const azureComputeCost = (azureVcpuRate * vCpuCount + azureMemoryRate * nodeMemoryGB * nodeCount) * 730;
|
|
204
|
+
const azureAks = Math.round(azureComputeCost * 100) / 100;
|
|
205
|
+
// GCP GKE
|
|
206
|
+
const gcpVcpuRate = 0.044;
|
|
207
|
+
const gcpMemoryRate = 0.006;
|
|
208
|
+
const gcpComputeCost = (gcpVcpuRate * vCpuCount + gcpMemoryRate * nodeMemoryGB * nodeCount) * 730;
|
|
209
|
+
const gcpGke = Math.round((gcpComputeCost + 73) * 100) / 100; // GKE standard cluster fee
|
|
210
|
+
return {
|
|
211
|
+
ociBasic,
|
|
212
|
+
ociEnhanced,
|
|
213
|
+
awsEks,
|
|
214
|
+
azureAks,
|
|
215
|
+
gcpGke,
|
|
216
|
+
notes: [
|
|
217
|
+
'OCI Basic cluster has no management fee (others charge $73/month)',
|
|
218
|
+
'OCI offers ~30-50% lower compute costs for equivalent specs',
|
|
219
|
+
'OCI 1 OCPU = 2 vCPUs (physical cores vs threads)',
|
|
220
|
+
'Prices are estimates; actual costs vary by region and instance type',
|
|
221
|
+
'AWS EKS, GCP GKE Standard both charge $0.10/hour cluster fee',
|
|
222
|
+
'Azure AKS has free control plane like OCI Basic',
|
|
223
|
+
],
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=kubernetes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kubernetes.js","sourceRoot":"","sources":["../../src/tools/kubernetes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAiB7F;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAAsC,EAAE;IAO5E,IAAI,GAAG,GAAG,oBAAoB,EAAE,CAAC;IAEjC,yBAAyB;IACzB,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;QACpD,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,oCAAoC;IACpC,MAAM,OAAO,GAA2B,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACpD,MAAM,GAAG,GAAI,CAAuC,CAAC,oBAAoB,IAAI,CAAC,CAAC,YAAY,CAAC;QAC5F,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC;QAEzB,OAAO;YACL,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO;YACtG,WAAW,EAAE,CAAC,CAAC,WAAW;YAC1B,aAAa,EAAE,GAAG;YAClB,I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kDAAkD;YAClD,qEAAqE;YACrE,8DAA8D;YAC9D,iDAAiD;SAClD;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OCI Networking Pricing Tools
|
|
3
|
+
*/
|
|
4
|
+
export interface ListNetworkingOptionsParams {
|
|
5
|
+
type?: 'load-balancer' | 'fastconnect' | 'vpn' | 'egress' | 'gateway';
|
|
6
|
+
}
|
|
7
|
+
export interface NetworkingOptionInfo {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
pricePerUnit: number;
|
|
12
|
+
unit: string;
|
|
13
|
+
monthlyExample: string;
|
|
14
|
+
isFree: boolean;
|
|
15
|
+
notes?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List available OCI networking options with pricing
|
|
19
|
+
*/
|
|
20
|
+
export declare function listNetworkingOptions(params?: ListNetworkingOptionsParams): {
|
|
21
|
+
options: NetworkingOptionInfo[];
|
|
22
|
+
freeServices: string[];
|
|
23
|
+
totalCount: number;
|
|
24
|
+
lastUpdated: string;
|
|
25
|
+
freeTierNote: string;
|
|
26
|
+
tips: string[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Calculate networking cost for a given configuration
|
|
30
|
+
*/
|
|
31
|
+
export interface CalculateNetworkingCostParams {
|
|
32
|
+
flexibleLoadBalancers?: number;
|
|
33
|
+
loadBalancerBandwidthMbps?: number;
|
|
34
|
+
networkLoadBalancers?: number;
|
|
35
|
+
outboundDataGB?: number;
|
|
36
|
+
fastConnectGbps?: 1 | 10 | 100;
|
|
37
|
+
vpnConnections?: number;
|
|
38
|
+
natGateways?: number;
|
|
39
|
+
}
|
|
40
|
+
export declare function calculateNetworkingCost(params: CalculateNetworkingCostParams): {
|
|
41
|
+
breakdown: Array<{
|
|
42
|
+
item: string;
|
|
43
|
+
quantity: number;
|
|
44
|
+
unit: string;
|
|
45
|
+
unitPrice: number;
|
|
46
|
+
monthlyTotal: number;
|
|
47
|
+
note?: string;
|
|
48
|
+
}>;
|
|
49
|
+
totalMonthly: number;
|
|
50
|
+
freeCredits: number;
|
|
51
|
+
netCost: number;
|
|
52
|
+
notes: string[];
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Compare data egress pricing with other clouds
|
|
56
|
+
*/
|
|
57
|
+
export declare function compareDataEgress(monthlyGB: number): {
|
|
58
|
+
ociCost: number;
|
|
59
|
+
comparison: string;
|
|
60
|
+
savings: string;
|
|
61
|
+
notes: string[];
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=networking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networking.d.ts","sourceRoot":"","sources":["../../src/tools/networking.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,CAAC,EAAE,eAAe,GAAG,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;CACvE;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,2BAAgC,GAAG;IAC/E,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,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,6BAA6B;IAC5C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,6BAA6B,GAAG;IAC9E,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,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3H,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAuJA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAqCA"}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OCI Networking Pricing Tools
|
|
3
|
+
*/
|
|
4
|
+
import { getNetworkingPricing, getLastUpdated, getFreeTier } from '../data/fetcher.js';
|
|
5
|
+
/**
|
|
6
|
+
* List available OCI networking options with pricing
|
|
7
|
+
*/
|
|
8
|
+
export function listNetworkingOptions(params = {}) {
|
|
9
|
+
let networking = getNetworkingPricing();
|
|
10
|
+
// Filter by type
|
|
11
|
+
if (params.type) {
|
|
12
|
+
const typeFilter = params.type.toLowerCase();
|
|
13
|
+
networking = networking.filter((n) => n.networkingType?.toLowerCase().includes(typeFilter) ||
|
|
14
|
+
n.type?.toLowerCase().includes(typeFilter));
|
|
15
|
+
}
|
|
16
|
+
// Transform to user-friendly format
|
|
17
|
+
const options = networking.map((n) => {
|
|
18
|
+
const isFree = n.pricePerUnit === 0;
|
|
19
|
+
// Calculate monthly example based on service type
|
|
20
|
+
let monthlyExample = '';
|
|
21
|
+
if (isFree) {
|
|
22
|
+
monthlyExample = 'FREE';
|
|
23
|
+
}
|
|
24
|
+
else if (n.type === 'flexible-load-balancer') {
|
|
25
|
+
monthlyExample = `~$${Math.round(n.pricePerUnit * 730 * 100) / 100}/month base`;
|
|
26
|
+
}
|
|
27
|
+
else if (n.type === 'flexible-load-balancer-bandwidth') {
|
|
28
|
+
monthlyExample = `$${Math.round(n.pricePerUnit * 100 * 730 * 100) / 100}/month for 100 Mbps`;
|
|
29
|
+
}
|
|
30
|
+
else if (n.type === 'data-egress') {
|
|
31
|
+
monthlyExample = `First 10 TB FREE, then $${n.pricePerUnit}/GB`;
|
|
32
|
+
}
|
|
33
|
+
else if (n.type?.includes('fastconnect')) {
|
|
34
|
+
monthlyExample = `$${Math.round(n.pricePerUnit * 730 * 100) / 100}/month`;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
monthlyExample = `$${Math.round(n.pricePerUnit * 730 * 100) / 100}/month`;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
name: n.type,
|
|
41
|
+
type: n.networkingType || 'general',
|
|
42
|
+
description: n.description,
|
|
43
|
+
pricePerUnit: n.pricePerUnit,
|
|
44
|
+
unit: n.unit,
|
|
45
|
+
monthlyExample,
|
|
46
|
+
isFree,
|
|
47
|
+
notes: n.notes,
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
// Get free services
|
|
51
|
+
const freeServices = options.filter((o) => o.isFree).map((o) => o.name);
|
|
52
|
+
// Get free tier info
|
|
53
|
+
const freeTier = getFreeTier();
|
|
54
|
+
const freeTierNote = freeTier?.networking
|
|
55
|
+
? `Free: ${freeTier.networking.loadBalancer}, ${freeTier.networking.dataEgress}`
|
|
56
|
+
: 'VCN, Network LB free. First LB + 10 Mbps free. 10 TB egress free.';
|
|
57
|
+
return {
|
|
58
|
+
options,
|
|
59
|
+
freeServices,
|
|
60
|
+
totalCount: options.length,
|
|
61
|
+
lastUpdated: getLastUpdated(),
|
|
62
|
+
freeTierNote,
|
|
63
|
+
tips: [
|
|
64
|
+
'Network Load Balancer (L4) is completely FREE - no hourly or data charges',
|
|
65
|
+
'VCN, subnets, route tables, security lists are all FREE',
|
|
66
|
+
'First Flexible LB and 10 Mbps bandwidth free for paid accounts',
|
|
67
|
+
'10 TB/month outbound data transfer FREE - lowest in industry',
|
|
68
|
+
'FastConnect is port-only pricing; partner fees are separate',
|
|
69
|
+
'Service Gateway provides FREE private access to OCI services',
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export function calculateNetworkingCost(params) {
|
|
74
|
+
const networking = getNetworkingPricing();
|
|
75
|
+
const breakdown = [];
|
|
76
|
+
const notes = [];
|
|
77
|
+
let freeCredits = 0;
|
|
78
|
+
// Flexible Load Balancers
|
|
79
|
+
if (params.flexibleLoadBalancers && params.flexibleLoadBalancers > 0) {
|
|
80
|
+
const lbPrice = networking.find((n) => n.type === 'flexible-load-balancer');
|
|
81
|
+
if (lbPrice) {
|
|
82
|
+
const lbCost = lbPrice.pricePerUnit * params.flexibleLoadBalancers * 730;
|
|
83
|
+
// First LB is free for paid accounts
|
|
84
|
+
if (params.flexibleLoadBalancers >= 1) {
|
|
85
|
+
freeCredits += lbPrice.pricePerUnit * 730;
|
|
86
|
+
notes.push('First Flexible Load Balancer is free for paid accounts');
|
|
87
|
+
}
|
|
88
|
+
breakdown.push({
|
|
89
|
+
item: 'Flexible Load Balancer (base)',
|
|
90
|
+
quantity: params.flexibleLoadBalancers,
|
|
91
|
+
unit: 'instance',
|
|
92
|
+
unitPrice: lbPrice.pricePerUnit,
|
|
93
|
+
monthlyTotal: Math.round(lbCost * 100) / 100,
|
|
94
|
+
note: params.flexibleLoadBalancers === 1 ? 'First one free' : undefined,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// Load Balancer Bandwidth
|
|
99
|
+
if (params.loadBalancerBandwidthMbps && params.loadBalancerBandwidthMbps > 0) {
|
|
100
|
+
const bwPrice = networking.find((n) => n.type === 'flexible-load-balancer-bandwidth');
|
|
101
|
+
if (bwPrice) {
|
|
102
|
+
const bwCost = bwPrice.pricePerUnit * params.loadBalancerBandwidthMbps * 730;
|
|
103
|
+
// First 10 Mbps is free
|
|
104
|
+
if (params.loadBalancerBandwidthMbps <= 10) {
|
|
105
|
+
freeCredits += bwCost;
|
|
106
|
+
notes.push('First 10 Mbps bandwidth is free for paid accounts');
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
freeCredits += bwPrice.pricePerUnit * 10 * 730;
|
|
110
|
+
}
|
|
111
|
+
breakdown.push({
|
|
112
|
+
item: 'Load Balancer Bandwidth',
|
|
113
|
+
quantity: params.loadBalancerBandwidthMbps,
|
|
114
|
+
unit: 'Mbps',
|
|
115
|
+
unitPrice: bwPrice.pricePerUnit,
|
|
116
|
+
monthlyTotal: Math.round(bwCost * 100) / 100,
|
|
117
|
+
note: 'First 10 Mbps free',
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// Network Load Balancers (FREE)
|
|
122
|
+
if (params.networkLoadBalancers && params.networkLoadBalancers > 0) {
|
|
123
|
+
breakdown.push({
|
|
124
|
+
item: 'Network Load Balancer (L4)',
|
|
125
|
+
quantity: params.networkLoadBalancers,
|
|
126
|
+
unit: 'instance',
|
|
127
|
+
unitPrice: 0,
|
|
128
|
+
monthlyTotal: 0,
|
|
129
|
+
note: 'FREE - no charge',
|
|
130
|
+
});
|
|
131
|
+
notes.push('Network Load Balancers are completely free');
|
|
132
|
+
}
|
|
133
|
+
// Outbound Data Transfer
|
|
134
|
+
if (params.outboundDataGB && params.outboundDataGB > 0) {
|
|
135
|
+
const egressPrice = networking.find((n) => n.type === 'data-egress');
|
|
136
|
+
if (egressPrice) {
|
|
137
|
+
const freeGB = 10240; // 10 TB free
|
|
138
|
+
const billableGB = Math.max(0, params.outboundDataGB - freeGB);
|
|
139
|
+
const egressCost = egressPrice.pricePerUnit * billableGB;
|
|
140
|
+
if (params.outboundDataGB <= freeGB) {
|
|
141
|
+
freeCredits += egressPrice.pricePerUnit * params.outboundDataGB;
|
|
142
|
+
notes.push(`All ${params.outboundDataGB} GB outbound transfer covered by free tier`);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
freeCredits += egressPrice.pricePerUnit * freeGB;
|
|
146
|
+
notes.push(`First 10 TB (${freeGB} GB) outbound is free. Charging for ${billableGB} GB.`);
|
|
147
|
+
}
|
|
148
|
+
breakdown.push({
|
|
149
|
+
item: 'Outbound Data Transfer',
|
|
150
|
+
quantity: params.outboundDataGB,
|
|
151
|
+
unit: 'GB',
|
|
152
|
+
unitPrice: egressPrice.pricePerUnit,
|
|
153
|
+
monthlyTotal: Math.round(egressCost * 100) / 100,
|
|
154
|
+
note: `First 10 TB free (${billableGB} GB billable)`,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
// FastConnect
|
|
159
|
+
if (params.fastConnectGbps) {
|
|
160
|
+
const fcType = `fastconnect-${params.fastConnectGbps}g`;
|
|
161
|
+
const fcPrice = networking.find((n) => n.type === fcType);
|
|
162
|
+
if (fcPrice) {
|
|
163
|
+
const fcCost = fcPrice.pricePerUnit * 730;
|
|
164
|
+
breakdown.push({
|
|
165
|
+
item: `FastConnect ${params.fastConnectGbps} Gbps`,
|
|
166
|
+
quantity: 1,
|
|
167
|
+
unit: 'port',
|
|
168
|
+
unitPrice: fcPrice.pricePerUnit,
|
|
169
|
+
monthlyTotal: Math.round(fcCost * 100) / 100,
|
|
170
|
+
note: 'Port fee only; partner fees separate',
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// VPN Connections
|
|
175
|
+
if (params.vpnConnections && params.vpnConnections > 0) {
|
|
176
|
+
const vpnPrice = networking.find((n) => n.type === 'site-to-site-vpn');
|
|
177
|
+
if (vpnPrice) {
|
|
178
|
+
const vpnCost = vpnPrice.pricePerUnit * params.vpnConnections * 730;
|
|
179
|
+
breakdown.push({
|
|
180
|
+
item: 'Site-to-Site VPN',
|
|
181
|
+
quantity: params.vpnConnections,
|
|
182
|
+
unit: 'connection',
|
|
183
|
+
unitPrice: vpnPrice.pricePerUnit,
|
|
184
|
+
monthlyTotal: Math.round(vpnCost * 100) / 100,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
// NAT Gateways
|
|
189
|
+
if (params.natGateways && params.natGateways > 0) {
|
|
190
|
+
const natPrice = networking.find((n) => n.type === 'nat-gateway');
|
|
191
|
+
if (natPrice) {
|
|
192
|
+
const natCost = natPrice.pricePerUnit * params.natGateways * 730;
|
|
193
|
+
breakdown.push({
|
|
194
|
+
item: 'NAT Gateway',
|
|
195
|
+
quantity: params.natGateways,
|
|
196
|
+
unit: 'gateway',
|
|
197
|
+
unitPrice: natPrice.pricePerUnit,
|
|
198
|
+
monthlyTotal: Math.round(natCost * 100) / 100,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const totalMonthly = breakdown.reduce((sum, item) => sum + item.monthlyTotal, 0);
|
|
203
|
+
const netCost = Math.max(0, Math.round((totalMonthly - freeCredits) * 100) / 100);
|
|
204
|
+
return {
|
|
205
|
+
breakdown,
|
|
206
|
+
totalMonthly: Math.round(totalMonthly * 100) / 100,
|
|
207
|
+
freeCredits: Math.round(freeCredits * 100) / 100,
|
|
208
|
+
netCost,
|
|
209
|
+
notes,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Compare data egress pricing with other clouds
|
|
214
|
+
*/
|
|
215
|
+
export function compareDataEgress(monthlyGB) {
|
|
216
|
+
const networking = getNetworkingPricing();
|
|
217
|
+
const egressPrice = networking.find((n) => n.type === 'data-egress');
|
|
218
|
+
if (!egressPrice) {
|
|
219
|
+
return {
|
|
220
|
+
ociCost: 0,
|
|
221
|
+
comparison: 'Unable to calculate',
|
|
222
|
+
savings: '',
|
|
223
|
+
notes: [],
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
// OCI: First 10 TB free, then $0.0085/GB
|
|
227
|
+
const ociFreeGB = 10240;
|
|
228
|
+
const ociBillableGB = Math.max(0, monthlyGB - ociFreeGB);
|
|
229
|
+
const ociCost = ociBillableGB * egressPrice.pricePerUnit;
|
|
230
|
+
// Rough comparisons (AWS/Azure typically ~$0.09/GB after 10 GB free)
|
|
231
|
+
const awsRate = 0.09;
|
|
232
|
+
const awsFreeGB = 100; // AWS has ~100 GB free tier
|
|
233
|
+
const awsCost = (monthlyGB - awsFreeGB) * awsRate;
|
|
234
|
+
const savings = awsCost - ociCost;
|
|
235
|
+
const savingsPercent = awsCost > 0 ? Math.round((savings / awsCost) * 100) : 0;
|
|
236
|
+
return {
|
|
237
|
+
ociCost: Math.round(ociCost * 100) / 100,
|
|
238
|
+
comparison: `OCI: $${Math.round(ociCost * 100) / 100} vs AWS/Azure: ~$${Math.round(awsCost * 100) / 100}`,
|
|
239
|
+
savings: savings > 0 ? `Save ~$${Math.round(savings * 100) / 100}/month (${savingsPercent}%) with OCI` : 'No savings at this volume',
|
|
240
|
+
notes: [
|
|
241
|
+
`OCI: 10 TB free, then $${egressPrice.pricePerUnit}/GB`,
|
|
242
|
+
'AWS/Azure: ~100 GB free, then ~$0.09/GB (varies by region/tier)',
|
|
243
|
+
'GCP: Similar to AWS at scale',
|
|
244
|
+
'OCI consistently offers the lowest egress pricing',
|
|
245
|
+
],
|
|
246
|
+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,GAAG,GAAG,CAAC,GAAG,GAAG,oBAAoB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE;QACzG,OAAO,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,WAAW,cAAc,aAAa,CAAC,CAAC,CAAC,2BAA2B;QACpI,KAAK,EAAE;YACL,0BAA0B,WAAW,CAAC,YAAY,KAAK;YACvD,iEAAiE;YACjE,8BAA8B;YAC9B,mDAAmD;SACpD;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OCI Storage Pricing Tools
|
|
3
|
+
*/
|
|
4
|
+
export interface ListStorageOptionsParams {
|
|
5
|
+
type?: 'block' | 'object' | 'file' | 'archive';
|
|
6
|
+
}
|
|
7
|
+
export interface StorageOptionInfo {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
pricePerGB: number;
|
|
12
|
+
monthlyPer100GB: number;
|
|
13
|
+
monthlyPerTB: number;
|
|
14
|
+
performanceTier?: string;
|
|
15
|
+
notes?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List available OCI storage options with pricing
|
|
19
|
+
*/
|
|
20
|
+
export declare function listStorageOptions(params?: ListStorageOptionsParams): {
|
|
21
|
+
options: StorageOptionInfo[];
|
|
22
|
+
totalCount: number;
|
|
23
|
+
lastUpdated: string;
|
|
24
|
+
freeTierNote: string;
|
|
25
|
+
comparison: {
|
|
26
|
+
cheapest: string;
|
|
27
|
+
bestPerformance: string;
|
|
28
|
+
};
|
|
29
|
+
tips: string[];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Calculate storage cost for a given configuration
|
|
33
|
+
*/
|
|
34
|
+
export interface CalculateStorageCostParams {
|
|
35
|
+
blockVolumeGB?: number;
|
|
36
|
+
blockPerformanceTier?: 'basic' | 'balanced' | 'high' | 'ultra';
|
|
37
|
+
objectStorageGB?: number;
|
|
38
|
+
objectStorageTier?: 'standard' | 'infrequent' | 'archive';
|
|
39
|
+
fileStorageGB?: number;
|
|
40
|
+
}
|
|
41
|
+
export declare function calculateStorageCost(params: CalculateStorageCostParams): {
|
|
42
|
+
breakdown: Array<{
|
|
43
|
+
item: string;
|
|
44
|
+
gb: number;
|
|
45
|
+
pricePerGB: number;
|
|
46
|
+
monthlyTotal: number;
|
|
47
|
+
}>;
|
|
48
|
+
totalMonthly: number;
|
|
49
|
+
notes: string[];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Compare storage tiers for a given size
|
|
53
|
+
*/
|
|
54
|
+
export declare function compareStorageTiers(sizeGB: number): {
|
|
55
|
+
comparisons: Array<{
|
|
56
|
+
tier: string;
|
|
57
|
+
type: string;
|
|
58
|
+
pricePerGB: number;
|
|
59
|
+
monthlyTotal: number;
|
|
60
|
+
useCase: string;
|
|
61
|
+
}>;
|
|
62
|
+
recommendation: string;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/tools/storage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CACh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