You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: workspaces/redhat-resource-optimization/README.md
+59-23Lines changed: 59 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,29 @@
1
-
# Welcome to the Resource Optimization plugin workspace
1
+
# Welcome to the Cost Management plugin workspace
2
2
3
-
## Resource Optimization
3
+
## Cost Management
4
4
5
-
Welcome to the Resource Optimization plugin!
5
+
Welcome to the Cost Management plugin!
6
6
7
-
Resource Optimization plugin allows users to visualize usage trends and receive optimization recommendations for workloads running on OpenShift clusters.
8
-
There is also an option to automatically apply recommendations. Refer to [Optimizer App](#optimizer-app) section
7
+
The Cost Management plugin consists of two main parts:
8
+
9
+
### 1. OpenShift
10
+
11
+
The OpenShift section displays cost tracking for OpenShift clusters with flexible grouping options. Users can view costs grouped by cluster, project, node, or tag, monitor month-over-month cost changes, and filter data to analyze spending patterns and identify cost trends.
12
+
13
+
### 2. Optimizations
14
+
15
+
The Optimizations section allows users to visualize usage trends and receive optimization recommendations for workloads running on OpenShift clusters. There is also an option to automatically apply recommendations. Refer to [Optimizer App](#optimizer-app) section for more details.
9
16
10
17
## Getting started
11
18
12
19
### Prerequisite
13
20
14
-
The plugin consumes services from [Red Hat Hybrid Cloud Console](https://console.redhat.com/openshift/cost-management/optimizations), therefore your clusters [must be configured to receive optimization recommendations](https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html-single/getting_started_with_resource_optimization_for_openshift/index).
21
+
The plugin consumes services from [Red Hat Hybrid Cloud Console](https://console.redhat.com/openshift/cost-management) for both OpenShift and Optimizations sections, therefore your clusters [must be configured to access cost management data and optimization recommendations](https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html/integrating_openshift_container_platform_data_into_cost_management/index).
22
+
23
+
**Learn more:**
24
+
25
+
-[OpenShift cost tracking and analysis](https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html/analyzing_your_cost_data/index)
26
+
-[Resource optimization for OpenShift](https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html-single/getting_started_with_resource_optimization_for_openshift/index)
15
27
16
28
#### Service Account Details
17
29
@@ -22,22 +34,22 @@ You will need to two service accounts from Red Hat Hybrid Cloud Console.
22
34
-[please go through this guide](https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html/limiting_access_to_cost_management_resources/assembly-limiting-access-cost-resources-rbac) and assign below roles to your `service accounts`
23
35
24
36
1. Service account with `Cloud Administrator` role for configuring `Cost Management Metrics Operator`
25
-
2. Service account with `Cost OpenShift Viewer` role for viewing the optimization data in the RHDH Resource Optimization plugin
37
+
2. Service account with `Cost OpenShift Viewer` role for viewing both OpenShift cost data and optimization recommendations in the Cost Management plugin
26
38
27
39
## Setup
28
40
29
-
You can follow one of these options for installing `Resource Optimization` depending on your environment.
41
+
You can follow one of these options for installing `Cost Management` plugin depending on your environment.
30
42
31
43
### Option 1: Dynamic plugin - on a Red Hat Developer Hub(RHDH) instance
32
44
33
45
[Follow this link](./docs/dynamic-plugin.md) for installing plugin as Dynamic Plugin
34
46
35
47
#### Dependency on Orchestrator plugin and Workflow details
36
48
37
-
The Resource Optimization pluginis dependent on [Orchestrator plugin](https://www.rhdhorchestrator.io/main/docs/) to run the workflow for applying the recommendation. Make sure you have installed the [Orchestrator plugin](https://www.rhdhorchestrator.io/main/docs/) by following one of these options depending on your environment:
49
+
The Cost Management plugin's Optimizations section is dependent on [Orchestrator plugin](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.8/html/orchestrator_in_red_hat_developer_hub/index) to run the workflow for applying the recommendation. Make sure you have installed the [Orchestrator plugin](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.8/html/orchestrator_in_red_hat_developer_hub/index) by following one of these options depending on your environment:
38
50
39
-
-[Install Orchestrator plugin on an exisiting RHDH instance](https://www.rhdhorchestrator.io/main/docs/installation/installation-on-existing-rhdh/)
40
-
-[Install Orchestrator plugin with an RHDH instance](https://www.rhdhorchestrator.io/main/docs/installation/orchestrator/)
51
+
-[Installing Red Hat Developer Hub with Orchestrator by using the Red Hat Developer Hub Operator](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.8/html/orchestrator_in_red_hat_developer_hub/assembly-install-rhdh-orchestrator-operator)
52
+
-[Installing Red Hat Developer Hub with Orchestrator by using the Red Hat Developer Hub Helm chart](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.8/html/orchestrator_in_red_hat_developer_hub/assembly-install-rhdh-orchestrator-helm)
41
53
42
54
This method requires vanilla backstage to be used:
43
55
@@ -87,22 +99,36 @@ This method requires vanilla backstage to be used:
87
99
88
100
1. Add the `ResourceOptimizationPage` extension to your `App.tsx` routes
89
101
90
-
```ts
102
+
Add the import and a single route. The plugin handles its own sub-routes:
103
+
104
+
- `/redhat-resource-optimization`— Optimizations list
import { ResourceOptimizationPage } from '@red-hat-developer-hub/plugin-redhat-resource-optimization';
94
112
95
-
<FlatRoutes>
96
-
...
97
-
<Route
98
-
path="/redhat-resource-optimization"
99
-
element={<ResourceOptimizationPage />}
100
-
/>
101
-
...
102
-
</FlatRoutes>;
113
+
const routes = (
114
+
<FlatRoutes>
115
+
{/* ... other routes ... */}
116
+
<Route
117
+
path="/redhat-resource-optimization"
118
+
element={<ResourceOptimizationPage />}
119
+
/>
120
+
{/* ... */}
121
+
</FlatRoutes>
122
+
);
123
+
```
124
+
103
125
```
104
126
105
-
1. Add a link to the Resource Optimization page in the side bar
127
+
```
128
+
129
+
1. Add a link to the Cost Management page in the side bar
130
+
131
+
The plugin provides a single sidebar item that gives access to the Cost Management plugin. The plugin internally handles navigation between the OpenShift and Optimizations sections through tabs within the plugin interface.
106
132
107
133
```diff
108
134
// packages/app/src/components/Root/Root.tsx
@@ -131,7 +157,7 @@ This method requires vanilla backstage to be used:
131
157
+ <SidebarItem
132
158
+ icon={ResourceOptimizationIconOutlined}
133
159
+ to="/redhat-resource-optimization"
134
-
+ text="Optimizations"
160
+
+ text="Cost Management"
135
161
+ />
136
162
</SidebarGroup>
137
163
<SidebarSpace />
@@ -149,13 +175,23 @@ This method requires vanilla backstage to be used:
149
175
);
150
176
```
151
177
178
+
Once added to the sidebar, users can navigate between sections using the plugin's internal navigation tabs.
179
+
152
180
## RBAC Permissions
153
181
154
182
The HTTP endpoints exposed by the redhat-resource-optimization-backend can enforce authorization if the [RBAC plugin](https://github.com/backstage/community-plugins/tree/main/workspaces/rbac/plugins) is deployed. Please refer the RBAC plugin documentation for the setup steps (mind they rely on the [Backstage authentication and identity](https://backstage.io/docs/auth/)).
155
183
156
-
- More detailed info about Resource Optimization plugin RBAC permissions can be found in [docs/rbac.md](./docs/rbac.md)
184
+
- More detailed info about Cost Management plugin RBAC permissions can be found in [docs/rbac.md](./docs/rbac.md)
157
185
- More detailed info about Orcestrator plugin RBAC for setting up permission for workflow can be [found here](https://github.com/redhat-developer/rhdh-plugins/blob/main/workspaces/orchestrator/docs/Permissions.md).
158
186
159
187
## Optimizer App
160
188
161
189
An application for applying the recommendations automatically. The application makes use of OSL (OpenShift Serverless Logic, a.k.a. SonataFlow) which is part of the Orchestrator installation. If you already have the [Orchestrator plugin and the workflow](#dependency-on-orchestrator-plugin-and-workflow-details) installed then you are ready for installing the Optimizer application. Follow the [application instructions](https://github.com/rhdhorchestrator/optimizer/tree/main) for installing and configuring it.
190
+
191
+
## References
192
+
193
+
-[Installing ROS-OCP RHDH plugin on Red Hat Developer Hub on a Openshift Cluster](https://docs.google.com/document/d/1tExe7cEBYMJplkk9ppSdBINwE-14KmxURczGjloHqZ4/edit?usp=sharing)
194
+
195
+
-[Documentation to understand how to export, package & publish plugin as a dynamic plugin](https://github.com/redhat-developer/rhdh/blob/main/docs/dynamic-plugins/packaging-dynamic-plugins.md#packaging-and-publishing-backstage-plugin-as-a-dynamic-plugin)
196
+
197
+
- For comprehensive RHDH documentation, visit: [Red Hat Developer Hub 1.8 Documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.8/)
Copy file name to clipboardExpand all lines: workspaces/redhat-resource-optimization/docs/dynamic-plugin.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,13 @@ Red Hat Developer Hub (RHDH) leverages dynamic plugins to efficiently deploy plu
5
5
6
6
The procedure involves the following steps:
7
7
8
-
1. Ensure you are familiar with the [RHDH configuration docs](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.6/html/configuring_red_hat_developer_hub/index) and [RHDH plugin installation guide](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.6/html/installing_and_viewing_plugins_in_red_hat_developer_hub/index)
8
+
1. Ensure you are familiar with the [Red Hat Developer Hub 1.8 configuration docs](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.8/html/configuring_red_hat_developer_hub/index) and [Red Hat Developer Hub 1.8 plugin installation guide](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.8/html/installing_and_viewing_plugins_in_red_hat_developer_hub/index)
9
9
10
-
2. The plugin consumes services from [Red Hat Hybrid Cloud Console](https://console.redhat.com/openshift/cost-management/optimizations), therefore your clusters [must be configured to receive optimization recommendations](https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html-single/getting_started_with_resource_optimization_for_openshift/index).
10
+
**Additional Resources:**
11
+
12
+
- For comprehensive RHDH documentation, visit: [Red Hat Developer Hub 1.8 Documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.8/)
13
+
14
+
2. The plugin consumes services from [Red Hat Hybrid Cloud Console](https://console.redhat.com/openshift/cost-management) for both OpenShift and Optimizations sections, therefore your clusters [must be configured to access cost management data and optimization recommendations](https://docs.redhat.com/en/documentation/cost_management_service/1-latest/html/integrating_openshift_container_platform_data_into_cost_management/index).
11
15
Copy and save the `CLIENT_ID` & `CLIENT_SECRET` from service account you created earlier with `Cost OpenShift Viewer` role. This will be needed during configuration step below.
12
16
13
17
3. Specially, make sure you have configured
@@ -58,9 +62,3 @@ The procedure involves the following steps:
58
62
clientSecret: ${ROS_CLIENT_SECRET}
59
63
optimizationWorkflowId: 'patch-k8s-resource'
60
64
```
61
-
62
-
### References
63
-
64
-
- [Installing ROS-OCP RHDH plugin on Red Hat Developer Hub on a Openshift Cluster](https://docs.google.com/document/d/1tExe7cEBYMJplkk9ppSdBINwE-14KmxURczGjloHqZ4/edit?usp=sharing)
65
-
66
-
- [Documentation to understand how to export, package & publish plugin as a dynamic plugin](https://github.com/redhat-developer/rhdh/blob/main/docs/dynamic-plugins/packaging-dynamic-plugins.md#packaging-and-publishing-backstage-plugin-as-a-dynamic-plugin)
0 commit comments