Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Primary owner should be listed first in list of global owners, followed by any secondary owners
* @ocofaigh @daniel-butler-irl
* @jor2 @Aashiq-J
12 changes: 11 additions & 1 deletion ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"diagrams": [
{
"diagram": {
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/tree/main/reference-architecture/deployable-architecture-monitoring-agent.svg",
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/refs/heads/main/reference-architecture/deployable-architecture-monitoring-agent.svg",
"caption": "Monitoring Agent on a cluster",
"type": "image/svg+xml"
},
Expand Down Expand Up @@ -152,6 +152,16 @@
},
{
"key": "cloud_monitoring_instance_endpoint_type"
"options": [
{
"displayname": "public",
"value": "public"
},
{
"displayname": "private",
"value": "private"
}
]
},
{
"key": "metrics_filter"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#! /bin/bash

########################################################################################################################
## This script is used by the catalog pipeline to destroy the SLZ OCP Cluster, which was provisioned as a ##
## prerequisite for the WAS extension that is published to the catalog ##
## This script is used by the catalog pipeline to destroy prerequisite resource required for catalog validation ##
########################################################################################################################

set -e
Expand All @@ -12,7 +11,7 @@ TF_VARS_FILE="terraform.tfvars"

(
cd ${TERRAFORM_SOURCE_DIR}
echo "Destroying prerequisite SLZ OCP Cluster and Monitoring instances .."
echo "Destroying prerequisite OCP Cluster and Monitoring instance .."
terraform destroy -input=false -auto-approve -var-file=${TF_VARS_FILE} || exit 1
rm -f "${TF_VARS_FILE}"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#! /bin/bash

############################################################################################################
## This script is used by the catalog pipeline to deploy the SLZ ROKS and Monitoring instances,
## which are the prerequisites for the Monitoring Agent extension.
## This script is used by the catalog pipeline to deploy the OCP and Monitoring instances,
## which are the prerequisites for the Monitoring Agent DA.
############################################################################################################

set -e
Expand All @@ -16,31 +16,28 @@ TF_VARS_FILE="terraform.tfvars"
(
cwd=$(pwd)
cd ${TERRAFORM_SOURCE_DIR}
echo "Provisioning prerequisite SLZ ROKS CLUSTER and Monitoring Instances .."
echo "Provisioning prerequisite OCP cluster and Monitoring Instance .."
terraform init || exit 1
# $VALIDATION_APIKEY is available in the catalog runtime
{
echo "ibmcloud_api_key=\"${VALIDATION_APIKEY}\""
echo "region=\"${REGION}\""
echo "prefix=\"slz-$(openssl rand -hex 2)\""
echo "prefix=\"ocp-$(openssl rand -hex 2)\""
} >> ${TF_VARS_FILE}
terraform apply -input=false -auto-approve -var-file=${TF_VARS_FILE} || exit 1

region_var_name="region"
cluster_id_var_name="cluster_id"
cluster_id_value=$(terraform output -state=terraform.tfstate -raw cluster_id)
cluster_resource_group_id_var_name="cluster_resource_group_id"
cluster_resource_group_id_value=$(terraform output -state=terraform.tfstate -raw cluster_resource_group_id)
cloud_monitoring_instance_region_var_name="instance_region"
cloud_monitoring_instance_region_var_name="cloud_monitoring_instance_region"
access_key_var_name="access_key"
access_key_value=$(terraform output -state=terraform.tfstate -raw access_key)

echo "Appending '${cluster_id_var_name}' and '${region_var_name}' input variable values to ${JSON_FILE}.."
echo "Appending '${cluster_id_var_name}', '${cluster_resource_group_id_var_name}', '${cloud_monitoring_instance_region_var_name}' and '${access_key_var_name}' input variable values to ${JSON_FILE}.."

cd "${cwd}"
jq -r --arg region_var_name "${region_var_name}" \
--arg region_var_value "${REGION}" \
--arg cluster_id_var_name "${cluster_id_var_name}" \
jq -r --arg cluster_id_var_name "${cluster_id_var_name}" \
--arg cluster_id_value "${cluster_id_value}" \
--arg cluster_resource_group_id_var_name "${cluster_resource_group_id_var_name}" \
--arg cluster_resource_group_id_value "${cluster_resource_group_id_value}" \
Expand Down