Skip to content

Commit 9fb2e72

Browse files
Add Agent DA
1 parent af5d553 commit 9fb2e72

File tree

11 files changed

+770
-0
lines changed

11 files changed

+770
-0
lines changed

ibm_catalog.json

Lines changed: 353 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,353 @@
1+
{
2+
"products": [
3+
{
4+
"label": "Testing - Cloud automation for Observability Agents",
5+
"name": "testing-deploy-arch-ibm-observability-agents",
6+
"product_kind": "solution",
7+
"tags": [
8+
"ibm_created",
9+
"logging_monitoring"
10+
],
11+
"short_description": "Configures IBM Cloud Observability resources",
12+
"long_description": "Solutions that support configuring IBM Cloud Observability agents for logging, monitoring, and activity tracking.",
13+
"offering_docs_url": "https://github.com/terraform-ibm-modules/terraform-ibm-observability-agents/blob/main/README.md",
14+
"offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-observability-da/main/images/observability-icon.svg",
15+
"flavors": [
16+
{
17+
"label": "Agents",
18+
"name": "agents",
19+
"working_directory": "solutions/agents",
20+
"licenses": [
21+
{
22+
"id": "LICENSE",
23+
"name": "LICENSE",
24+
"type": "text/plain",
25+
"description": "LICENSE"
26+
}
27+
],
28+
"compliance": {},
29+
"iam_permissions": [
30+
{
31+
"service_name": "containers-kubernetes",
32+
"role_crns": [
33+
"crn:v1:bluemix:public:iam::::serviceRole:Manager",
34+
"crn:v1:bluemix:public:iam::::role:Viewer"
35+
]
36+
}
37+
],
38+
"architecture": {
39+
"features": [
40+
{
41+
"title": "Works with any openshift or k8s cluster",
42+
"description": "Works with the Red Hat OpenShift cluster."
43+
},
44+
{
45+
"title": "Deploys the IBM Cloud Monitoring agent on an existing cluster.",
46+
"description": "Deploys the IBM Cloud Monitoring agent on an existing Red Hat OpenShift cluster."
47+
},
48+
{
49+
"title": "Deploys the IBM Logs agent on an existing cluster.",
50+
"description": "Deploys the IBM Logs agent on an existing Red Hat OpenShift cluster."
51+
}
52+
],
53+
"diagrams": [
54+
{
55+
"diagram": {
56+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-agents/main/reference-architecture/deployable-architecture-observability-agents.svg",
57+
"caption": "Observability agents on a Red Hat OpenShift cluster",
58+
"type": "image/svg+xml"
59+
},
60+
"description": "Observability agents deployed on a Red Hat OpenShift cluster on a secure landing zone."
61+
}
62+
]
63+
},
64+
"dependencies": [
65+
{
66+
"name": "testing-deploy-arch-ibm-observability",
67+
"id": "daf2cf91-2384-4205-b7f4-621299a4896d",
68+
"version": ">=1.0.7",
69+
"flavors": [
70+
"instances"
71+
],
72+
"catalog_id": "f64499c8-eb50-4985-bf91-29f9e605a433",
73+
"optional": true,
74+
"input_mapping": [
75+
{
76+
"dependency_input": "log_analysis_provision",
77+
"version_input": "log_analysis_enabled"
78+
},
79+
{
80+
"dependency_output": "log_analysis_ingestion_key",
81+
"version_input": "log_analysis_ingestion_key"
82+
},
83+
{
84+
"dependency_input": "cloud_monitoring_provision",
85+
"version_input": "cloud_monitoring_enabled"
86+
},
87+
{
88+
"dependency_output": "cloud_monitoring_access_key",
89+
"version_input": "cloud_monitoring_access_key"
90+
},
91+
{
92+
"dependency_input": "region",
93+
"version_input": "cloud_monitoring_instance_region"
94+
}
95+
]
96+
},
97+
{
98+
"name": "deploy-arch-ibm-slz-ocp",
99+
"id": "95fccffc-ae3b-42df-b6d9-80be5914d852-global",
100+
"version": ">=v6.2.1",
101+
"flavors": [
102+
"standard"
103+
],
104+
"catalog_id": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc",
105+
"optional": false,
106+
"input_mapping": []
107+
}
108+
],
109+
"dependency_version_2": true,
110+
"configuration": [
111+
{
112+
"key": "cloud_monitoring_access_key",
113+
"type": "password",
114+
"required": true
115+
},
116+
{
117+
"key": "cloud_monitoring_add_cluster_name",
118+
"type": "boolean",
119+
"required": false
120+
},
121+
{
122+
"key": "cloud_monitoring_agent_name",
123+
"type": "string",
124+
"required": false
125+
},
126+
{
127+
"key": "cloud_monitoring_agent_namespace",
128+
"type": "string",
129+
"required": false
130+
},
131+
{
132+
"key": "cloud_monitoring_agent_tags",
133+
"type": "array",
134+
"required": false
135+
},
136+
{
137+
"key": "cloud_monitoring_agent_tolerations",
138+
"type": "array",
139+
"required": false
140+
},
141+
{
142+
"key": "cloud_monitoring_enabled",
143+
"type": "boolean",
144+
"required": true
145+
},
146+
{
147+
"key": "cloud_monitoring_endpoint_type",
148+
"type": "string",
149+
"required": false
150+
},
151+
{
152+
"key": "cloud_monitoring_instance_region",
153+
"type": "string",
154+
"display_name": "Region",
155+
"required": true,
156+
"custom_config": {
157+
"type": "vpc_region",
158+
"grouping": "deployment",
159+
"original_grouping": "deployment",
160+
"config_constraints": {
161+
"generationType": "2"
162+
}
163+
}
164+
},
165+
{
166+
"key": "cloud_monitoring_metrics_filter",
167+
"type": "array",
168+
"required": false
169+
},
170+
{
171+
"key": "cloud_monitoring_secret_name",
172+
"type": "string",
173+
"required": false
174+
},
175+
{
176+
"key": "cluster_config_endpoint_type",
177+
"type": "string",
178+
"required": false
179+
},
180+
{
181+
"key": "cluster_id",
182+
"type": "string",
183+
"required": true,
184+
"custom_config": {
185+
"type": "cluster_var",
186+
"grouping": "deployment",
187+
"original_grouping": "deployment"
188+
}
189+
},
190+
{
191+
"key": "cluster_resource_group_id",
192+
"type": "string",
193+
"required": true,
194+
"custom_config": {
195+
"type": "resource_group",
196+
"grouping": "deployment",
197+
"original_grouping": "deployment",
198+
"config_constraints": {
199+
"identifier": "rg_id"
200+
}
201+
}
202+
},
203+
{
204+
"key": "ibmcloud_api_key",
205+
"type": "password",
206+
"required": true
207+
},
208+
{
209+
"key": "prefix",
210+
"type": "string",
211+
"default_value": "__NULL__",
212+
"description": "The prefix for resources created by this solution.",
213+
"required": false
214+
},
215+
{
216+
"key": "cloud_logs_ingress_endpoint",
217+
"type": "string",
218+
"default_value": "__NULL__",
219+
"description": "The host for IBM Cloud Logs ingestion. Ensure you use the ingress endpoint. See https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-endpoints_ingress. It is required if `logs_agent_enabled` is set to true.",
220+
"required": false
221+
},
222+
{
223+
"key": "cloud_logs_ingress_port",
224+
"type": "number",
225+
"default_value": 3443,
226+
"description": "The target port for the IBM Cloud Logs ingestion endpoint. The port must be 443 if you connect by using a VPE gateway, or port 3443 when you connect by using CSEs.",
227+
"required": false
228+
},
229+
{
230+
"key": "is_vpc_cluster",
231+
"type": "boolean",
232+
"default_value": true,
233+
"description": "Specify true if the target cluster for the DA is a VPC cluster, false if it is classic cluster.",
234+
"required": false
235+
},
236+
{
237+
"key": "logs_agent_additional_log_source_paths",
238+
"type": "array",
239+
"default_value": "[]",
240+
"description": "The list of additional log sources. By default, the Logs agent collects logs from a single source at `/var/log/containers/logger-agent-ds-*.log`.",
241+
"required": false
242+
},
243+
{
244+
"key": "logs_agent_additional_metadata",
245+
"type": "array",
246+
"default_value": "[]",
247+
"description": "The list of additional metadata fields to add to the routed logs.",
248+
"required": false
249+
},
250+
{
251+
"key": "logs_agent_enable_scc",
252+
"type": "boolean",
253+
"default_value": true,
254+
"description": "Whether to enable creation of Security Context Constraints in Openshift. When installing on an OpenShift cluster, this setting is mandatory to configure permissions for pods within your cluster.",
255+
"required": false
256+
},
257+
{
258+
"key": "logs_agent_enabled",
259+
"type": "boolean",
260+
"default_value": true,
261+
"description": "Whether to deploy the Logs agent.",
262+
"required": true
263+
},
264+
{
265+
"key": "logs_agent_exclude_log_source_paths",
266+
"type": "array",
267+
"default_value": "[]",
268+
"description": "The list of log sources to exclude. Specify the paths that the Logs agent ignores.",
269+
"required": false
270+
},
271+
{
272+
"key": "logs_agent_iam_api_key",
273+
"type": "password",
274+
"description": "The IBM Cloud API key for the Logs agent to authenticate and communicate with the IBM Cloud Logs. It is required if `logs_agent_iam_mode` is set to `IAMAPIKey`.",
275+
"required": true
276+
},
277+
{
278+
"key": "logs_agent_iam_environment",
279+
"type": "string",
280+
"default_value": "PrivateProduction",
281+
"description": "IAM authentication Environment: `Production` or `PrivateProduction` or `Staging` or `PrivateStaging`.",
282+
"required": false
283+
},
284+
{
285+
"key": "logs_agent_iam_mode",
286+
"type": "string",
287+
"default_value": "TrustedProfile",
288+
"description": "IAM authentication mode: `TrustedProfile` or `IAMAPIKey`.",
289+
"required": false
290+
},
291+
{
292+
"key": "logs_agent_log_source_namespaces",
293+
"type": "array",
294+
"default_value": "[]",
295+
"description": "The list of namespaces from which logs should be forwarded by agent. When specified logs from only these namespaces will be sent by the agent.",
296+
"required": false
297+
},
298+
{
299+
"key": "logs_agent_name",
300+
"type": "string",
301+
"default_value": "logs-agent",
302+
"description": "The name of the Logs agent. The name is used in all Kubernetes and Helm resources in the cluster.",
303+
"required": false
304+
},
305+
{
306+
"key": "logs_agent_namespace",
307+
"type": "string",
308+
"default_value": "ibm-observe",
309+
"description": "The namespace where the Logs agent is deployed. The default value is `ibm-observe`.",
310+
"required": false
311+
},
312+
{
313+
"key": "logs_agent_selected_log_source_paths",
314+
"type": "array",
315+
"default_value": "[]",
316+
"description": "The list of specific log sources paths. Logs will only be collected from the specified log source paths.",
317+
"required": false
318+
},
319+
{
320+
"key": "logs_agent_tolerations",
321+
"type": "array",
322+
"default_value": "[{\n operator = \"Exists\"\n }]",
323+
"description": "List of tolerations to apply to Logs agent.",
324+
"required": false
325+
},
326+
{
327+
"key": "logs_agent_trusted_profile",
328+
"type": "string",
329+
"default_value": "__NULL__",
330+
"description": "The IBM Cloud trusted profile ID. Used only when `logs_agent_iam_mode` is set to `TrustedProfile`. The trusted profile must have an IBM Cloud Logs `Sender` role.",
331+
"required": false
332+
},
333+
{
334+
"key": "wait_till",
335+
"type": "string",
336+
"default_value": "Normal",
337+
"description": "To avoid long wait times when you run your Terraform code, you can specify the stage when you want Terraform to mark the cluster resource creation as completed. Depending on what stage you choose, the cluster creation might not be fully completed and continues to run in the background. However, your Terraform code can continue to run without waiting for the cluster to be fully created. Supported args are `MasterNodeReady`, `OneWorkerNodeReady`, `IngressReady` and `Normal`",
338+
"required": false
339+
},
340+
{
341+
"key": "wait_till_timeout",
342+
"type": "number",
343+
"default_value": 90,
344+
"description": "Timeout for wait_till in minutes.",
345+
"required": false
346+
}
347+
],
348+
"install_type": "extension"
349+
}
350+
]
351+
}
352+
]
353+
}

reference-architecture/deployable-architecture-observability-agents.svg

Lines changed: 4 additions & 0 deletions
Loading

solutions/agents/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Deploying observability agents on a Red Hat OpenShift cluster
2+
3+
This architecture deploys the following observability agents on a Red Hat OpenShift cluster:
4+
5+
* Cloud Monitoring agent
6+
* Cloud Logs agent
7+
8+
## Before you begin
9+
10+
* Make sure that the Red Hat OpenShift Cluster is deployed.
11+
12+
* Make sure that the observability instances (Cloud Logs and Cloud Monitoring) for which specific agents are required are deployed.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ibmcloud_api_key": $VALIDATION_APIKEY
3+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore everything
2+
*
3+
4+
# But not these files...
5+
!.gitignore
6+
!README.md
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This directory must exist in source control so the `ibm_container_cluster_config` data lookup can use it to place the
2+
config.yml used to connect to a kubernetes cluster.

0 commit comments

Comments
 (0)