Skip to content

Commit 5b6cf7e

Browse files
authored
fix catalog validation script (#29)
1 parent 4c08f4c commit 5b6cf7e

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Primary owner should be listed first in list of global owners, followed by any secondary owners
2-
* @ocofaigh @daniel-butler-irl
2+
* @jor2 @Aashiq-J

ibm_catalog.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"diagrams": [
5555
{
5656
"diagram": {
57-
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/tree/main/reference-architecture/deployable-architecture-monitoring-agent.svg",
57+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/refs/heads/main/reference-architecture/deployable-architecture-monitoring-agent.svg",
5858
"caption": "Monitoring Agent on a cluster",
5959
"type": "image/svg+xml"
6060
},
@@ -151,7 +151,17 @@
151151
"key": "tolerations"
152152
},
153153
{
154-
"key": "cloud_monitoring_instance_endpoint_type"
154+
"key": "cloud_monitoring_instance_endpoint_type",
155+
"options": [
156+
{
157+
"displayname": "public",
158+
"value": "public"
159+
},
160+
{
161+
"displayname": "private",
162+
"value": "private"
163+
}
164+
]
155165
},
156166
{
157167
"key": "metrics_filter"

tests/scripts/post-validation-deploy-base-ocp-and-monitoring-instances.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#! /bin/bash
22

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

87
set -e
@@ -12,7 +11,7 @@ TF_VARS_FILE="terraform.tfvars"
1211

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

tests/scripts/pre-validation-deploy-base-ocp-and-monitoring-instances.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#! /bin/bash
22

33
############################################################################################################
4-
## This script is used by the catalog pipeline to deploy the SLZ ROKS and Monitoring instances,
5-
## which are the prerequisites for the Monitoring Agent extension.
4+
## This script is used by the catalog pipeline to deploy the OCP and Monitoring instances,
5+
## which are the prerequisites for the Monitoring Agent DA.
66
############################################################################################################
77

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

29-
region_var_name="region"
3029
cluster_id_var_name="cluster_id"
3130
cluster_id_value=$(terraform output -state=terraform.tfstate -raw cluster_id)
3231
cluster_resource_group_id_var_name="cluster_resource_group_id"
3332
cluster_resource_group_id_value=$(terraform output -state=terraform.tfstate -raw cluster_resource_group_id)
34-
cloud_monitoring_instance_region_var_name="instance_region"
33+
cloud_monitoring_instance_region_var_name="cloud_monitoring_instance_region"
3534
access_key_var_name="access_key"
3635
access_key_value=$(terraform output -state=terraform.tfstate -raw access_key)
3736

38-
echo "Appending '${cluster_id_var_name}' and '${region_var_name}' input variable values to ${JSON_FILE}.."
37+
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}.."
3938

4039
cd "${cwd}"
41-
jq -r --arg region_var_name "${region_var_name}" \
42-
--arg region_var_value "${REGION}" \
43-
--arg cluster_id_var_name "${cluster_id_var_name}" \
40+
jq -r --arg cluster_id_var_name "${cluster_id_var_name}" \
4441
--arg cluster_id_value "${cluster_id_value}" \
4542
--arg cluster_resource_group_id_var_name "${cluster_resource_group_id_var_name}" \
4643
--arg cluster_resource_group_id_value "${cluster_resource_group_id_value}" \

0 commit comments

Comments
 (0)