Skip to content

Commit

Permalink
Add a datacenter resource.
Browse files Browse the repository at this point in the history
The purpose of this is to allow for people running in a hybrid
environment.
  • Loading branch information
hdost committed Sep 17, 2024
1 parent 0005a84 commit 1ae444e
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .chloggen/adding-datacenter-convention.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: new_component

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: dc

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Allow users to categorize datacenter information.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1409]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
Many companies run in a Hybrid environment, and being able to see information when managing fleets
of servers is valuable as this allows for standardize monitoring of server level monitoring.

Check failure on line 25 in .chloggen/adding-datacenter-convention.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[empty-lines] too many blank lines (1 > 0)
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Currently, the following namespaces exist:
- [Code](code.md)
- [Container](container.md)
- [CPU](cpu.md)
- [Datacenter](datacenter.md)
- [Db](db.md)
- [Deployment](deployment.md)
- [Destination](destination.md)
Expand Down
24 changes: 24 additions & 0 deletions docs/attributes-registry/datacenter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# Datacenter

## Datacenter Attributes

Generic DataCenter infrastructure tagging.

| Attribute | Type | Description | Examples | Stability |
| ------------------ | ------ | ---------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------- |
| `dc.cage` | string | Name of the cage | `cage-1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dc.chassis` | string | Name of the chassis the server lives in. | `pod-4` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dc.device.type` | string | Type of device used. | `server`; `chassis`; `network`; `pdu`; `switch`; `patch-panel` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dc.name` | string | Name of datacenter. | `dc-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dc.pod` | string | Name of the pod | `pod-4` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dc.provider.name` | string | Name of the datacenter provider | `aws`; `azure`; `gcp`; `corp` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dc.provider.type` | string | Type of datacenter | `cloud`; `colocation`; `internal` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dc.rack` | string | Name of the rack. | `rack-7` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dc.site` | string | Name of the datacenter site | `site-1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `dc.suite` | string | Name of the datacenter suite | `suite-5` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
58 changes: 58 additions & 0 deletions model/datacenter/registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
groups:
- id: registry.datacenter
stability:
type: attribute_group
display_name: Datacenter Attributes
brief: >
Generic DataCenter infrastructure tagging.
attributes:
- id: dc.name
type: string
stability: experimental
brief: 'Name of datacenter.'
examples: ['dc-name']
- id: dc.provider.name
type: string
stability: experimental
brief: 'Name of the datacenter provider'
examples: ['aws','azure','gcp','corp']

Check failure on line 18 in model/datacenter/registry.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma

Check failure on line 18 in model/datacenter/registry.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma

Check failure on line 18 in model/datacenter/registry.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma
- id: dc.provider.type
type: string
stability: experimental
brief: 'Type of datacenter'
examples: ['cloud','colocation','internal']

Check failure on line 23 in model/datacenter/registry.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma

Check failure on line 23 in model/datacenter/registry.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma
- id: dc.device.type
type: string
stability: experimental
brief: 'Type of device used.'
examples: ['server','chassis','network','pdu', 'switch', 'patch-panel']

Check failure on line 28 in model/datacenter/registry.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma

Check failure on line 28 in model/datacenter/registry.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma

Check failure on line 28 in model/datacenter/registry.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma
- id: dc.suite
type: string
stability: experimental
brief: 'Name of the datacenter suite'
examples: ['suite-5']
- id: dc.site
type: string
stability: experimental
brief: 'Name of the datacenter site'
examples: ['site-1']
- id: dc.cage
type: string
stability: experimental
brief: 'Name of the cage'
examples: ['cage-1']
- id: dc.pod
type: string
stability: experimental
brief: 'Name of the pod'
examples: ['pod-4']
- id: dc.chassis
type: string
stability: experimental
brief: 'Name of the chassis the server lives in.'
examples: ['pod-4']
- id: dc.rack
type: string
stability: experimental
brief: 'Name of the rack.'
examples: ['rack-7']
15 changes: 15 additions & 0 deletions model/datacenter/resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
groups:
- id: datacenter
stability: experimental
type: resource
brief: >
Generic DataCenter infrastructure tagging.
attributes:
- ref: dc.name
- ref: dc.provider.name
- ref: dc.provider.type
- ref: dc.suite
- ref: dc.site
- ref: dc.cage
- ref: dc.pod
- ref: dc.rack

0 comments on commit 1ae444e

Please sign in to comment.