Skip to content

Commit 85a7b4f

Browse files
ShibamDHarness
authored andcommitted
feat: [IDP-7726] platform integration for catalog discovery (#100795)
* e7ca72 docs: Add comprehensive documentation for Platform Integration, Aggregation Rules, and Hierarchy Entity Layouts * d5e139 added * 3c8bb0 alot of things * 503b5f Update harness-cd.md * d6d882 platform integration
1 parent 8f8efdf commit 85a7b4f

File tree

17 files changed

+465
-1
lines changed

17 files changed

+465
-1
lines changed
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
---
2+
title: Aggregation Rules
3+
sidebar_label: Aggregation Rules
4+
sidebar_position: 8
5+
description: Learn how to create aggregation rules to roll up metrics from entities to hierarchy levels.
6+
keywords:
7+
- aggregation rules
8+
- metrics rollup
9+
- hierarchy aggregation
10+
- DORA metrics
11+
tags:
12+
- catalog
13+
- aggregation
14+
- metrics
15+
---
16+
17+
Aggregation rules allow you to roll up metrics from lower-level entities to higher levels in the organizational hierarchy. This enables you to view aggregated metrics at account, organization, and project levels, providing insights into performance across your entire platform.
18+
19+
:::info
20+
Aggregation Rules are behind a feature flag. Contact your Harness representative to enable this feature.
21+
:::
22+
23+
## Overview
24+
25+
Aggregation rules compute aggregate values (sum, average, maximum, minimum, median) from entity properties and display them on hierarchy entities.
26+
27+
:::note
28+
Aggregations are always computed from the source entities (typically components) to hierarchy entities. When you select multiple roll-up scopes (project, organization, account), the aggregation is calculated from all matching source entities at each level, not by aggregating the already-aggregated values.
29+
:::
30+
31+
**Example use cases:**
32+
33+
- Aggregate DORA metrics (deployment frequency, change failure rate) from service components to project, organization, and account entities
34+
- Roll up test coverage metrics from service components to organization and account levels
35+
- Compute account-wide metrics by aggregating from all service components across the account
36+
37+
:::note
38+
These are just examples. Aggregation rules work with any custom metric or property you've added to your entities, not just DORA or test coverage metrics.
39+
:::
40+
41+
The aggregated values are stored as metadata properties on hierarchy entities and can be displayed using [hierarchy entity layouts](/docs/internal-developer-portal/layout-and-appearance/catalog#hierarchy-entity-layouts).
42+
43+
## Accessing Aggregation Rules
44+
45+
Navigate to **Configure****Integrations****Aggregation Rules** to view and manage your aggregation rules.
46+
47+
![Aggregation Rules](./static/agg-rule.png)
48+
49+
50+
51+
## Creating an Aggregation Rule
52+
53+
54+
Click **New Aggregation Rule** to open the aggregation rule form. The form is organized into two main sections:
55+
56+
![rules-aggre](./static/rules-aggre.png)
57+
58+
59+
### Section 1: Basic Details
60+
61+
Configure the metric and how it should be aggregated:
62+
63+
#### Metric / Field to Aggregate
64+
65+
Enter the property path in the entity YAML (e.g., `metadata.changeFailureRatePercent`).
66+
67+
**Finding the field path:**
68+
69+
To find the correct field path, view the YAML of an entity that has the property you want to aggregate. The field path is the dot-notation path to that property.
70+
71+
Example: If your entity YAML has:
72+
```yaml
73+
metadata:
74+
changeFailureRatePercent: 10
75+
```
76+
77+
The field path is: `metadata.changeFailureRatePercent`
78+
79+
#### Aggregation Formula
80+
81+
Choose how multiple values should be combined:
82+
83+
- **Average** - Calculate the mean of all values
84+
- **Sum** - Add all values together
85+
- **Median** - Take the middle value
86+
- **Min** - Take the lowest value
87+
- **Max** - Take the highest value
88+
89+
#### Aggregation Property Name
90+
91+
Enter a name for the aggregated property. This will become the property name on hierarchy entities (e.g., `Max Change Failure Rate`).
92+
93+
#### Description (optional)
94+
95+
Provide an optional description for the aggregation rule.
96+
97+
### Section 2: At What Levels Should This Be Aggregated
98+
99+
Configure where and from which entities the aggregation should be computed:
100+
101+
#### Roll-up Scope
102+
103+
Select at which hierarchy levels you want to see the aggregated value:
104+
105+
- **Project** - Display aggregated value on project entities
106+
- **Organization** - Display aggregated value on organization entities
107+
- **Account** - Display aggregated value on account entities
108+
- **System** - Display aggregated value on system entities
109+
110+
111+
:::info
112+
You can select multiple levels. At each level, the aggregation is computed from all matching source entities (defined by your entity filters), not by aggregating the values from the level below.
113+
For example, if you select Project, Organization, and Account:
114+
- Project entities will show the aggregate of all matching components in that project
115+
- Organization entities will show the aggregate of all matching components across all projects in that organization
116+
- Account entities will show the aggregate of all matching components across the entire account
117+
:::
118+
119+
#### Configure Entities to Aggregate Metric From
120+
121+
Define which entities to include in the aggregation. All filters are combined with AND logic:
122+
123+
- **Aggregation Scope** - Filter by scope (e.g., select specific account/org/project or leave as default for all)
124+
- **Entity Kind** - Select the kind of entities to aggregate (e.g., `Component` or `hierarchy`)
125+
- **Entity Type** - Filter by entity type (e.g., `service`, or select `all`)
126+
- **Owners** (optional) - Filter by entity owners
127+
- **Tags** (optional) - Filter by entity tags
128+
- **Lifecycle** (optional) - Filter by lifecycle stage
129+
130+
131+
## Aggregation Use Cases
132+
133+
### Use Case 1: DORA Metrics from CD Integration
134+
135+
Aggregate DORA metrics that are ingested from CD integration to hierarchy entities.
136+
137+
**Example:** Roll up deployment frequency and change failure rate from service components to projects, organizations, and account.
138+
139+
```yaml
140+
Field to Aggregate: metadata.changeFailureRatePercent
141+
Rule Name: Max Change Failure Rate
142+
Formula: Maximum
143+
Roll-up Scope: Project, Organization, Account
144+
Entity Kind: Component
145+
Type: service
146+
```
147+
148+
**Result:** The maximum change failure rate across all services will be displayed on project, organization, and account entities as `metadata.Max Change Failure Rate`.
149+
150+
### Use Case 2: Custom Ingested Properties
151+
152+
Aggregate custom properties that you've ingested into entities using the [Catalog Ingestion API](/docs/internal-developer-portal/catalog/integrate-tools/catalog-ingestion-api).
153+
154+
**Example:** Aggregate MTTR (Mean Time To Recovery) from service components.
155+
156+
```yaml
157+
Field to Aggregate: metadata.mttr
158+
Rule Name: Max MTTR
159+
Formula: Maximum
160+
Roll-up Scope: Project, Organization
161+
Entity Kind: Component
162+
Type: service
163+
```
164+
165+
**Result:** The maximum MTTR value will be available as `metadata.Max MTTR` on project and organization entities.
166+
167+
### Use Case 3: Hierarchical Aggregation
168+
169+
Aggregate properties from hierarchy entities (projects) to higher levels (organizations, account).
170+
171+
**Example:** Roll up test coverage from projects to organizations.
172+
173+
```yaml
174+
Field to Aggregate: metadata.qa.integrationTestCoverage
175+
Rule Name: Avg Unit Test Coverage
176+
Formula: Average
177+
Roll-up Scope: Organization, Account
178+
Entity Kind: hierarchy
179+
Type: project
180+
```
181+
182+
**Result:** The average test coverage across all projects will be displayed on organization and account entities as `metadata.Avg Unit Test Coverage`.
183+
184+
## Managing Aggregation Rules
185+
186+
### Compute on Demand
187+
188+
Click the **⋮** (three dots) menu next to an aggregation rule and select **Compute** to manually trigger computation. This is useful when you want to see updated values immediately.
189+
190+
![Compute](./static/compute.png)
191+
192+
### Edit an Aggregation Rule
193+
194+
1. Click the **⋮** menu next to the rule
195+
2. Select **Edit**
196+
3. Make your changes
197+
4. Click **Save**
198+
199+
The rule will be recomputed automatically after saving.
200+
201+
### Delete an Aggregation Rule
202+
203+
1. Click the **⋮** menu next to the rule
204+
2. Select **Delete**
205+
3. Confirm the deletion
206+
207+
:::warning
208+
When you delete an aggregation rule, all aggregated values created by that rule will be removed from hierarchy entities. If you have layout components referencing the deleted property, they will show a dash (-) or empty value.
209+
:::

docs/internal-developer-portal/catalog/create-entity/catalog-discovery/harness-cd.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Catalog Auto-Discovery with Harness CD Services
3-
description: Steps to use Catalog Ingestion API to ingest metadata and use the information on catalog overview and workflows
3+
description: Steps to use Catalog Ingestion API to ingest metadata and use the information on the catalog overview and workflows
44
sidebar_position: 1
55
sidebar_label: Harness CD
66
---
@@ -14,6 +14,7 @@ Make sure the following prerequisites are met:
1414

1515
1. The feature flag **`IDP_CATALOG_CD_AUTO_DISCOVERY`** is enabled. Contact [Harness Support](mailto:[email protected]) to enable it.
1616
2. **Harness CD** is enabled for your account. This must be the **same account** you use for Harness IDP.
17+
3. You have the required **RBAC permissions** to manage integrations. All operations for CD and Platform integrations require the **IDP Integration Edit** permission (`IDP_INTEGRATION_EDIT`) on the **IDP Integration** resource type (`IDP_INTEGRATION`).
1718

1819
---
1920

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
title: Catalog Auto-Discovery with Platform Integrations
3+
sidebar_position: 2
4+
sidebar_label: Platform Integration
5+
description: Discover services from Platform integrations and sync them to the IDP Catalog
6+
keywords:
7+
- catalog auto-discovery
8+
- platform integrations
9+
- cd auto-discovery
10+
- hierarchy entities
11+
tags:
12+
- catalog-discovery
13+
- platform-cd
14+
- cd-auto-discovery
15+
---
16+
17+
The Platform Integration feature in Harness IDP automatically syncs all scope-level entities from the Harness Platform as IDP catalog entities. This integration creates a hierarchical view of your Harness account structure, including accounts, organizations, and projects, making them discoverable and manageable within the IDP catalog.
18+
19+
## Overview
20+
21+
Platform Integration synchronizes your entire Harness Platform hierarchy into the IDP catalog as entities with a special `hierarchy` kind. This provides a unified view of your organizational structure and all associated services across accounts, organizations, and projects.
22+
23+
**Key features:**
24+
25+
- **Automatic synchronization** - Syncs all entities from the Harness Platform to IDP catalog
26+
- **Hierarchical structure** - Maintains account → organization → project relationships
27+
- **Scope-based filtering** - View entities by account, organization, or project scope
28+
- **Read-only entities** - Imported entities cannot be deleted from the catalog
29+
- **Continuous sync** - Keeps catalog entities up-to-date with Platform changes
30+
31+
## Enabling Platform Integration
32+
33+
To enable Platform Integration:
34+
35+
1. Navigate to **Configure****Integrations****Platform Integration**
36+
2. If not already enabled, click **Enable** to activate the integration
37+
3. The integration will display an enable/disable toggle with minimal configuration required
38+
39+
40+
<DocImage path={require('./static/enable-pl-int.png')} alt="Enable Platform Integration" title="Click to view full size image" />
41+
42+
:::info
43+
Once you import entities using Platform Integration, you won't be able to delete them from the catalog. They are managed by the Platform Integration sync process.
44+
:::
45+
46+
After enabling, all scope-level entities (accounts, organizations, and projects) from the Harness Platform will be automatically imported into the IDP catalog.
47+
48+
## Viewing Imported Entities
49+
50+
Once the import is complete, you can view all imported entities in two ways:
51+
52+
#### From Platform Integration Page
53+
54+
Navigate to **Configure****Integrations****Platform Integration** to view the imported entities table:
55+
56+
<DocImage path={require('./static/pl-int-list.png')} alt="Platform Integration List" title="Click to view full size image" />
57+
58+
59+
Clicking on an entity in this table will navigate you to the IDP catalog entity details page.
60+
61+
#### From IDP Catalog
62+
63+
Navigate to **Catalog** and filter by **Kind: hierarchy** to view all hierarchical entities. You can then select the specific type (account, organization, or project) to view entities at that level.
64+
65+
<DocImage path={require('./static/hierarchy.png')} alt="Hierarchy entities" title="Click to view full size image" />
66+
67+
## Hierarchy Entity Structure
68+
69+
Platform Integration creates entities with `Kind: hierarchy`, which represents the organizational structure of your Harness Platform. These entities have different types based on their level in the hierarchy:
70+
71+
72+
import Tabs from '@theme/Tabs';
73+
import TabItem from '@theme/TabItem';
74+
75+
<Tabs queryString="hierarchy-level">
76+
<TabItem value="account" label="Account-Level Entity">
77+
78+
When you view an account entity:
79+
80+
- **Kind:** `hierarchy`
81+
- **Type:** `account`
82+
83+
<DocImage path={require('./static/acc-lvl-entity.png')} alt="Account Level Entity" title="Click to view full size image" />
84+
85+
**The Overview tab displays two tables:**
86+
87+
1. **Organizations belonging to this Account** - Lists all direct child organizations
88+
89+
2. **Entities belonging to this scope (account)** - Lists all entities at the account scope level
90+
91+
</TabItem>
92+
<TabItem value="organization" label="Organization-Level Entity">
93+
94+
When you view an organization entity:
95+
96+
- **Kind:** `hierarchy`
97+
- **Type:** `organization`
98+
99+
<DocImage path={require('./static/org-entity.png')} alt="Organization Level Entity" title="Click to view full size image" />
100+
101+
**The Overview tab displays three sections:**
102+
103+
1. **Projects belonging to this Organization** - Lists all direct child projects
104+
105+
2. **Entities belonging to this scope (organization)** - Lists all entities at the organization scope level
106+
107+
</TabItem>
108+
<TabItem value="project" label="Project-Level Entity">
109+
110+
When you view a project entity:
111+
112+
- **Kind:** `hierarchy`
113+
- **Type:** `project`
114+
115+
<DocImage path={require('./static/pro-level.png')} alt="Project Level Entity" title="Click to view full size image" />
116+
117+
**The Overview tab displays:**
118+
119+
1. **Entities belonging to this scope (project)** - Lists all entities at the project scope level
120+
121+
</TabItem>
122+
</Tabs>
123+
124+
## Customizing Hierarchy Entity Views
125+
126+
Beyond the default hierarchical relationships, you can customize the Overview tab of hierarchy entities to display additional metrics and insights using **Aggregation Rules** and **Layout Configuration**.
127+
128+
<DocImage path={require('./static/layout.png')} alt="Layout" title="Click to view full size image" />
129+
130+
#### What You Can Add
131+
132+
- **Stats Cards** - Display aggregated metrics from child entities (e.g., average test coverage, deployment frequency)
133+
- **Aggregation Tables** - Show breakdowns of metrics with individual values from child entities
134+
135+
#### How It Works
136+
137+
1. **Create Aggregation Rules** - Define how to roll up metrics from lower-level entities (e.g., from components to projects, from projects to organizations)
138+
2. **Configure Layouts** - Add stats cards and tables to display the aggregated metrics on hierarchy entities
139+
3. **View Results** - Navigate to hierarchy entities to see your customized metrics and insights
140+
141+
<DocImage path={require('./static/metric.png')} alt="Metric" title="Click to view full size image" />
142+
143+
For example, you can aggregate DORA metrics from service components to project entities, then roll up test coverage from projects to organizations, and display these as cards on the Overview tab.
144+
145+
## Next Steps
146+
147+
- Learn about [Aggregation Rules](/docs/internal-developer-portal/catalog/aggregation-rules) to roll up metrics across hierarchy levels
148+
- Explore [Layout Configuration](/docs/internal-developer-portal/layout-and-appearance/catalog) to customize hierarchy entity views
149+
- Understand [Catalog Ingestion](/docs/internal-developer-portal/catalog/integrate-tools/catalog-ingestion-api) to add custom properties to entities
150+
399 KB
Loading
221 KB
Loading
178 KB
Loading
274 KB
Loading
87.2 KB
Loading
267 KB
Loading
169 KB
Loading

0 commit comments

Comments
 (0)