Skip to content

Commit 5a4fad2

Browse files
feat: added an agents flavor DA (#4)
1 parent 546f684 commit 5a4fad2

24 files changed

+731
-4
lines changed

.catalog-onboard-pipeline.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ offerings:
1212
scc:
1313
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
1414
region: us-south
15+
- name: agents
16+
mark_ready: true
17+
install_type: extension
18+
pre_validation: "tests/scripts/pre-validation-deploy-slz-roks-and-obs-instances.sh"
19+
post_validation: "tests/scripts/post-validation-destroy-slz-roks-and-obs-instances.sh"

.github/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ repository:
2525
description: "A deployable architecture solution to deploy Observability instances and agents."
2626

2727
# Use a comma-separated list of topics to set on the repo (ensure not to use any caps in the topic string).
28-
topics: core-team, terraform, ibm-cloud, observability, supported, deployable-architecture
28+
topics: core-team, terraform, ibm-cloud, observability, supported, deployable-architecture, observability-agents

ibm_catalog.json

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"log analysis",
2222
"cloud monitoring",
2323
"ATracker",
24-
"Activity Tracker"
24+
"Activity Tracker",
25+
"observability agents"
2526
],
2627
"short_description": "Configures IBM Cloud Observability resources",
2728
"long_description": "Solutions which support configuring IBM Cloud Observability resources for logging, monitoring and activity tracking.",
@@ -92,7 +93,66 @@
9293
}
9394
]
9495
}
95-
}
96+
},
97+
{
98+
"label": "Agents",
99+
"name": "agents",
100+
"install_type": "extension",
101+
"working_directory": "solutions/agents",
102+
"dependencies": [
103+
{
104+
"flavors": [
105+
"standard"
106+
],
107+
"id": "95fccffc-ae3b-42df-b6d9-80be5914d852",
108+
"name": "deploy-arch-ibm-slz-ocp",
109+
"version": ">=v3.0.0"
110+
},
111+
{
112+
"flavors": [
113+
"quickstart"
114+
],
115+
"id": "95fccffc-ae3b-42df-b6d9-80be5914d852",
116+
"name": "deploy-arch-ibm-slz-ocp",
117+
"version": ">=v5.20.0"
118+
},
119+
{
120+
"flavors": [
121+
"instances"
122+
],
123+
"id": "a3137d28-79e0-479d-8a24-758ebd5a0eab",
124+
"name": "deploy-arch-ibm-observability",
125+
"version": ">=v1.0.0"
126+
}
127+
],
128+
"architecture": {
129+
"descriptions": "This architecture supports deployment of Log Analysis and Cloud Monitoring Agents on an existing OpenShift Cluster on Secure Landing Zone.",
130+
"features": [
131+
{
132+
"title": "Works with the Secure Landing Zone.",
133+
"description": "Works with the OpenShift cluster of Secure Landing Zone."
134+
},
135+
{
136+
"title": "Deploys Log Analysis agent on an existing cluster on Secure Landing Zone.",
137+
"description": "Deploys Log Analysis agent on an existing OpenShift cluster on Secure Landing Zone."
138+
},
139+
{
140+
"title": "Deploys Cloud Monitoring agent on an existing cluster on Secure Landing Zone.",
141+
"description": "Deploys Cloud Monitoring agent on an existing OpenShift cluster on Secure Landing Zone."
142+
}
143+
],
144+
"diagrams": [
145+
{
146+
"diagram": {
147+
"caption": "Observability Agents on an OpenShift cluster",
148+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-observability-da/main/reference-architecture/deployable-architecture-observability-agents.svg",
149+
"type": "image/svg+xml"
150+
},
151+
"description": "Deployment of Observability agents on an OpenShift cluster of Secure Landing Zone."
152+
}
153+
]
154+
}
155+
}
96156
]
97157
}
98158
]

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+
# Deploy observability agents on a RedHat OpenShift Cluster
2+
3+
This architecture deploys the following observability agents on a RedHat OpenShift Cluster.
4+
5+
* Log analysis agent
6+
* Cloud monitoring agent
7+
8+
## Before you begin
9+
10+
* You must have RedHat OpenShift Cluster deployed.
11+
12+
* You must have deployed observability instances (log analysis and cloud monitoring) for which specific agents are required.
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.

solutions/agents/main.tf

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
##############################################################################
2+
# Observability Agents
3+
##############################################################################
4+
5+
data "ibm_container_cluster_config" "cluster_config" {
6+
cluster_name_id = var.cluster_id
7+
resource_group_id = var.cluster_resource_group_id
8+
config_dir = "${path.module}/kubeconfig"
9+
endpoint_type = var.cluster_config_endpoint_type != "default" ? var.cluster_config_endpoint_type : null
10+
}
11+
12+
module "observability_agents" {
13+
source = "terraform-ibm-modules/observability-agents/ibm"
14+
version = "1.20.0"
15+
cluster_id = var.cluster_id
16+
cluster_resource_group_id = var.cluster_resource_group_id
17+
cluster_config_endpoint_type = var.cluster_config_endpoint_type
18+
# Log Analysis Agent
19+
log_analysis_enabled = var.log_analysis_enabled
20+
log_analysis_agent_name = var.log_analysis_agent_name
21+
log_analysis_agent_namespace = var.log_analysis_agent_namespace
22+
log_analysis_instance_region = var.log_analysis_instance_region
23+
log_analysis_ingestion_key = var.log_analysis_ingestion_key
24+
log_analysis_secret_name = var.log_analysis_secret_name
25+
log_analysis_agent_tolerations = var.log_analysis_agent_tolerations
26+
log_analysis_agent_tags = var.log_analysis_agent_tags
27+
log_analysis_endpoint_type = var.log_analysis_endpoint_type
28+
log_analysis_add_cluster_name = var.log_analysis_add_cluster_name
29+
# Log Analysis agent custom settings to setup Kubernetes metadata logs filtering by setting
30+
# LOGDNA_K8S_METADATA_LINE_INCLUSION and LOGDNA_K8S_METADATA_LINE_EXCLUSION in the agent daemonset definition
31+
# Ref https://github.com/logdna/logdna-agent-v2/blob/3.8/docs/KUBERNETES.md#configuration-for-kubernetes-metadata-filtering
32+
log_analysis_agent_custom_line_exclusion = var.log_analysis_agent_custom_line_inclusion
33+
log_analysis_agent_custom_line_inclusion = var.log_analysis_agent_custom_line_exclusion
34+
# Cloud Monitoring (Sysdig) Agent
35+
cloud_monitoring_enabled = var.cloud_monitoring_enabled
36+
cloud_monitoring_agent_name = var.cloud_monitoring_agent_name
37+
cloud_monitoring_agent_namespace = var.cloud_monitoring_agent_namespace
38+
cloud_monitoring_endpoint_type = var.cloud_monitoring_endpoint_type
39+
cloud_monitoring_access_key = var.cloud_monitoring_access_key
40+
cloud_monitoring_secret_name = var.cloud_monitoring_secret_name
41+
cloud_monitoring_metrics_filter = var.cloud_monitoring_metrics_filter
42+
cloud_monitoring_agent_tags = var.cloud_monitoring_agent_tags
43+
cloud_monitoring_instance_region = var.cloud_monitoring_instance_region
44+
cloud_monitoring_agent_tolerations = var.cloud_monitoring_agent_tolerations
45+
cloud_monitoring_add_cluster_name = var.cloud_monitoring_add_cluster_name
46+
}

solutions/agents/outputs.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
##############################################################################
2+
# Outputs
3+
##############################################################################
4+
5+
6+
##############################################################################

0 commit comments

Comments
 (0)