@cryptotaxi247 / netdata-1 / commits / 4774907fe

Add schema for deployment integrations and centralize integrations schemas. (#15509)

* Relocate collector schemas to integrations dir. All the integrations schemas will be stored here. * Add schema for deployment integrations. Also splits a couple of shared parts to a separate schema file, and adds a basic deploy.yaml file with example deployments. * Expanded platform_info key description in schema. * Add docker info to distros.yml.

Austin S. Hemmelgarn committed Jul 25, 2023 at 07:20 UTC 4774907feb4528264a607164879ed2431f1a94bb
6 files changed +212 -35
.github/data/distros.yml
+10
@@ -237,3 +237,13 @@ include:
237 packages:
238 <<: *ubuntu_packages
239 repo_distro: ubuntu/focal
240 +no_include: # Info for platforms not covered in CI
241 + - distro: docker
242 + version: latest
243 + packages:
244 + arches:
245 + - linux/i386
246 + - linux/amd64
247 + - linux/arm/v7
248 + - linux/arm64
249 + - linux/ppc64le
integrations/deploy.yaml new
+48
@@ -0,0 +1,48 @@
1 +- &linux
2 + id: deploy-linux-generic
3 + meta: &linux_meta
4 + name: Linux
5 + link: ''
6 + categories:
7 + - deploy.operating-systems
8 + icon_filename: ''
9 + keywords:
10 + - linux
11 + description: 'Run the following command on your node to install and claim Netdata:"r'
12 + methods:
13 + - method: wget
14 + commands:
15 + - channel: nightly
16 + command: >
17 + wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh
18 + --nightly-channel --claim-token {% claim_token %} --claim-url {% claim_url %}
19 + - channel: stable
20 + command: >
21 + wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh
22 + --stable-channel --claim-token {% claim_token %} --claim-url {% claim_url %}
23 + - method: curl
24 + commands:
25 + - channel: nightly
26 + command: >
27 + curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh
28 + --nightly-channel --claim-token {% claim_token %} --claim-url {% claim_url %}
29 + - channel: stable
30 + command: >
31 + curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh
32 + --stable-channel --claim-token {% claim_token %} --claim-url {% claim_url %}
33 + additional_info: &ref_containers >
34 + Did you know you can also deploy Netdata on your OS using Kubernetes or Docker?
35 + related_resources: {}
36 + platform_info:
37 + group: ''
38 + distro: ''
39 +- <<: *linux
40 + id: deploy-ubuntu
41 + meta:
42 + <<: *linux_meta
43 + name: Ubuntu
44 + link: https://ubuntu.com/
45 + icon: ''
46 + platform_info:
47 + group: 'include'
48 + distro: 'ubuntu'
integrations/schemas/collection-multi-module.json renamed
integrations/schemas/collection-single-module.json renamed
+2 -35
@@ -15,43 +15,10 @@
15 "description": "Module name (e.g. apache, /proc/stat, httpcheck). It usually has the same name as the module configuration file (external plugin) or the section name in netdata.conf (internal plugin)."
16 },
17 "monitored_instance": {
18 - "type": "object",
19 - "description": "Information about the monitored instance (metrics source).",
20 - "properties": {
21 - "name": {
22 - "description": "Metrics source name (e.g. VerneMQ, Network interfaces, Files and directories). Use official spelling for applications.",
23 - "type": "string"
24 - },
25 - "link": {
26 - "description": "Link to the monitored instance official website if any.",
27 - "type": "string"
28 - },
29 - "categories": {
30 - "type": "array",
31 - "description": "Category IDs that this integration falls into. IDs can be found in integrations/categories.yaml",
32 - "items": {
33 - "type": "string",
34 - "description": "String defining integration category"
35 - }
36 - },
37 - "icon_filename": {
38 - "type": "string",
39 - "description": "The filename of the integration's icon, as sourced from https://github.com/netdata/website/tree/master/themes/tailwind/static/img."
40 - }
41 - },
42 - "required": [
43 - "name",
44 - "link",
45 - "categories",
46 - "icon_filename"
47 - ]
18 + "$ref": "./shared.json#/$defs/instance"
19 },
20 "keywords": {
50 - "type": "array",
51 - "description": "An array of terms related to the integration.",
52 - "items": {
53 - "type": "string"
54 - }
21 + "$ref": "./shared.json#/$defs/keywords"
22 },
23 "related_resources": {
24 "type": "object",
integrations/schemas/deploy.json new
+107
@@ -0,0 +1,107 @@
1 +{
2 + "$schema": "http://json-schema.org/draft-07/schema#",
3 + "type": "array",
4 + "title": "Netdata deployment information meta.",
5 + "items": {
6 + "type": "object",
7 + "description": "Individual entries for deployment information.",
8 + "properties" :{
9 + "id": {
10 + "type": "string",
11 + "description": "A unique ID for this integration."
12 + },
13 + "meta": {
14 + "$ref": "./shared.json#/$defs/instance"
15 + },
16 + "keywords": {
17 + "$ref": "./shared.json#/$defs/keywords"
18 + },
19 + "description": {
20 + "type": "string",
21 + "description": "Describes basic information about how to deploy on this platform."
22 + },
23 + "methods": {
24 + "type": "array",
25 + "description": "Describes the various ways to deploy on this platform.",
26 + "items": {
27 + "type": "object",
28 + "properties": {
29 + "method": {
30 + "type": "string",
31 + "description": "The name of the installation method."
32 + },
33 + "commands": {
34 + "type": "array",
35 + "items": {
36 + "type": "object",
37 + "properties": {
38 + "channel": {
39 + "type": "string",
40 + "description": "The release channel that this command is used for.",
41 + "enum": [
42 + "nightly",
43 + "stable"
44 + ]
45 + },
46 + "command": {
47 + "type": "string",
48 + "description": "The command to run for installing using this method."
49 + }
50 + },
51 + "required": [
52 + "channel",
53 + "command"
54 + ]
55 + }
56 + },
57 + "required": [
58 + "method",
59 + "commands"
60 + ]
61 + }
62 + }
63 + },
64 + "additional_info": {
65 + "type": "string",
66 + "description": "Any additional information about this platform."
67 + },
68 + "related_resources": {
69 + "type": "object",
70 + "description": "TBD"
71 + },
72 + "platform_info": {
73 + "type": "object",
74 + "description": "References what platform this deployment info is for. In the parsed output, this will be replaced with a markdown string covering basic support information for this platform.",
75 + "properties": {
76 + "group": {
77 + "type": "string",
78 + "description": "Identifies the group that the platform is in. 'include' is used for platforms that are in auto-generated CI. 'no_include' is used for platforms that are not in auto-generated CI. An empty string indicates no associated platform information.",
79 + "enum": [
80 + "include",
81 + "no_include",
82 + ""
83 + ]
84 + },
85 + "distro": {
86 + "type": "string",
87 + "description": "Identifies the platform within the group, based on the value of the 'distro' key."
88 + }
89 + },
90 + "required": [
91 + "group",
92 + "distro"
93 + ]
94 + }
95 + },
96 + "required": [
97 + "id",
98 + "meta",
99 + "keywords",
100 + "description",
101 + "methods",
102 + "additional_info",
103 + "related_resources",
104 + "platform_info"
105 + ]
106 + }
107 +}
integrations/schemas/shared.json new
+45
@@ -0,0 +1,45 @@
1 +{
2 + "$schema": "http://json-schema.org/draft-07/schema#",
3 + "title": "Shared definitions used for all integrations schemas.",
4 + "$defs": {
5 + "instance": {
6 + "type": "object",
7 + "description": "Information about the integration instance.",
8 + "properties": {
9 + "name": {
10 + "description": "Integration display name. Use official spelling for applications.",
11 + "type": "string"
12 + },
13 + "link": {
14 + "description": "Link to the instance official website if any.",
15 + "type": "string"
16 + },
17 + "categories": {
18 + "type": "array",
19 + "description": "Category IDs that this integration falls into. IDs can be found in integrations/categories.yaml",
20 + "items": {
21 + "type": "string",
22 + "description": "String defining integration category"
23 + }
24 + },
25 + "icon_filename": {
26 + "type": "string",
27 + "description": "The filename of the integration's icon, as sourced from https://github.com/netdata/website/tree/master/themes/tailwind/static/img."
28 + }
29 + },
30 + "required": [
31 + "name",
32 + "link",
33 + "categories",
34 + "icon_filename"
35 + ]
36 + },
37 + "keywords": {
38 + "type": "array",
39 + "description": "An array of terms related to the integration.",
40 + "items": {
41 + "type": "string"
42 + }
43 + }
44 + }
45 +}