Skip to content

Commit

Permalink
Merge pull request #313 from IBM/removing-od
Browse files Browse the repository at this point in the history
Removing tracing round 1
  • Loading branch information
DanRoseus authored Apr 24, 2023
2 parents 92eef1a + 5cf3350 commit ded3436
Show file tree
Hide file tree
Showing 17 changed files with 13 additions and 392 deletions.
5 changes: 1 addition & 4 deletions DrivewayDentDeletion/Operators/cicd-apply-dev-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,14 @@ OCApplyYAML "$NAMESPACE" "$YAML"
divider

# create the pipeline to run tasks to build and deploy to dev
TRACING=""
# TRACING="-t -z $NAMESPACE"
echo -e "$INFO [INFO] Create the pipeline in '$NAMESPACE' namespace"
YAML=$(cat $CURRENT_DIR/pipeline-dev.yaml |
sed "s#{{NAMESPACE}}#$NAMESPACE#g;" |
sed "s#{{FORKED_REPO}}#$REPO#g;" |
sed "s#{{BRANCH}}#$BRANCH#g;" |
sed "s#{{HA_ENABLED}}#$HA_ENABLED#g;" |
sed "s#{{DEFAULT_FILE_STORAGE}}#$DEFAULT_FILE_STORAGE#g;" |
sed "s#{{DEFAULT_BLOCK_STORAGE}}#$DEFAULT_BLOCK_STORAGE#g;" |
sed "s#{{TRACING}}#$TRACING#g;")
sed "s#{{DEFAULT_BLOCK_STORAGE}}#$DEFAULT_BLOCK_STORAGE#g;")
OCApplyYAML "$NAMESPACE" "$YAML"

divider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,14 @@ OCApplyYAML "$NAMESPACE" "$YAML"
divider

# create the pipeline to run tasks to build and deploy to test using apic
TRACING=""
# TRACING="-t -z $NAMESPACE"
echo -e "$INFO [INFO] Create the pipeline in '$NAMESPACE' namespace"
YAML=$(cat $CURRENT_DIR/pipeline-apic.yaml |
sed "s#{{NAMESPACE}}#$NAMESPACE#g;" |
sed "s#{{FORKED_REPO}}#$REPO#g;" |
sed "s#{{BRANCH}}#$BRANCH#g;" |
sed "s#{{HA_ENABLED}}#$HA_ENABLED#g;" |
sed "s#{{DEFAULT_FILE_STORAGE}}#$DEFAULT_FILE_STORAGE#g;" |
sed "s#{{DEFAULT_BLOCK_STORAGE}}#$DEFAULT_BLOCK_STORAGE#g;" |
sed "s#{{TRACING}}#$TRACING#g;")
sed "s#{{DEFAULT_BLOCK_STORAGE}}#$DEFAULT_BLOCK_STORAGE#g;")
OCApplyYAML "$NAMESPACE" "$YAML"

divider
Expand Down
5 changes: 1 addition & 4 deletions DrivewayDentDeletion/Operators/cicd-apply-test-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,14 @@ OCApplyYAML "$NAMESPACE" "$YAML"
divider

# create the pipeline to run tasks to build and deploy to test
TRACING=""
# TRACING="-t -z $NAMESPACE"
echo -e "$INFO [INFO] Create the pipeline in '$NAMESPACE' namespace"
YAML=$(cat $CURRENT_DIR/pipeline-test.yaml |
sed "s#{{NAMESPACE}}#$NAMESPACE#g;" |
sed "s#{{FORKED_REPO}}#$REPO#g;" |
sed "s#{{BRANCH}}#$BRANCH#g;" |
sed "s#{{HA_ENABLED}}#$HA_ENABLED#g;" |
sed "s#{{DEFAULT_FILE_STORAGE}}#$DEFAULT_FILE_STORAGE#g;" |
sed "s#{{DEFAULT_BLOCK_STORAGE}}#$DEFAULT_BLOCK_STORAGE#g;" |
sed "s#{{TRACING}}#$TRACING#g;")
sed "s#{{DEFAULT_BLOCK_STORAGE}}#$DEFAULT_BLOCK_STORAGE#g;")
OCApplyYAML "$NAMESPACE" "$YAML"

divider
Expand Down
2 changes: 1 addition & 1 deletion products/bash/1-click-pre-validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ divider
export check=0

# CPU/Memory requirements when demoPreparation is true
demo_products="ACE, ACE Designer, APIC, Event Streams, Tracing, PostgreSQL and Asset Repository"
demo_products="ACE, ACE Designer, APIC, Event Streams, PostgreSQL and Asset Repository"
cpu_req=77.95
mem_req_gi=154.5
total_cpu=0.0
Expand Down
14 changes: 0 additions & 14 deletions products/bash/create-catalog-sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,6 @@ spec:
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: ibm-integration-operations-dashboard-catalog
namespace: openshift-marketplace
spec:
displayName: "OD Operators 2.6.6"
image: icr.io/cpopen/ibm-integration-operations-dashboard-catalog@sha256:adca1ed1a029ec648c665e9e839da3a7d20e533809706b72e7e676c665d2d7b3
publisher: IBM
sourceType: grpc
updateStrategy:
registryPoll:
interval: 45m
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: ibm-integration-platform-navigator-catalog
namespace: openshift-marketplace
Expand Down
18 changes: 0 additions & 18 deletions products/bash/deploy-og-sub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -308,21 +308,3 @@ OCApplyYAML "$namespace" "$YAML"

echo "INFO: Wait for all subscriptions to succeed"
wait_for_all_subscriptions "${namespace}"

YAML=$(cat <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: ibm-integration-operations-dashboard-ibm-integration-operations-dashboard-catalog-openshift-marketplace
spec:
installPlanApproval: Automatic
name: ibm-integration-operations-dashboard
source: ibm-integration-operations-dashboard-catalog
sourceNamespace: openshift-marketplace
EOF
)
echo "namespace=$namespace"
OCApplyYAML "$namespace" "$YAML"

echo "INFO: Wait for all subscriptions to succeed"
wait_for_all_subscriptions "${namespace}"
6 changes: 0 additions & 6 deletions products/bash/example-demos/full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ spec:
assetRepo: true
eventStreams: true
mq: false
tracing: true

# Allow additional addon applications to be enabled independently. Enabling a
# demo will automatically enable required addons.
Expand Down Expand Up @@ -112,9 +111,4 @@ status:
installed: true
readyToUse: true
namespace: cp4i
- name: tracing-demo
type: tracing
installed: true
readyToUse: true
namespace: cp4i
version: 2022.2.1
5 changes: 0 additions & 5 deletions products/bash/example-demos/status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,4 @@ status:
installed: true
readyToUse: true
namespace: cp4i
- name: tracing-demo
type: tracing
installed: true
readyToUse: true
namespace: cp4i
version: 2022.2.1
7 changes: 1 addition & 6 deletions products/bash/find-catalog-sources/find-catalog-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SCRIPT_DIR=$(dirname $0)
${CLOUDCTL} version

CASE_REPO_PATH=https://github.com/IBM/cloud-pak/raw/master/repo/case
CASE_NAMES="ibm-cp-common-services ibm-apiconnect ibm-appconnect ibm-aspera-hsts-operator ibm-cloud-databases-redis ibm-datapower-operator ibm-eventstreams ibm-integration-asset-repository ibm-integration-operations-dashboard ibm-integration-platform-navigator ibm-mq"
CASE_NAMES="ibm-cp-common-services ibm-apiconnect ibm-appconnect ibm-aspera-hsts-operator ibm-cloud-databases-redis ibm-datapower-operator ibm-eventstreams ibm-integration-asset-repository ibm-integration-platform-navigator ibm-mq"

SCRATCH=$(mktemp -d)
mkdir -p $SCRATCH
Expand Down Expand Up @@ -81,11 +81,6 @@ FIXED_DATA_JSON='
"catalogName": "ar-operators",
"displayNamePrefix": "AR Operators"
},
"ibm-integration-operations-dashboard-catalog": {
"envVarPrefix": "OPERATIONS_DASHBOARD",
"catalogName": "od-operators",
"displayNamePrefix": "OD Operators"
},
"ibm-integration-platform-navigator-catalog": {
"envVarPrefix": "NAVIGATOR",
"catalogName": "pn-operators",
Expand Down
16 changes: 0 additions & 16 deletions products/bash/get-alm-exaples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,3 @@ echo "############################"
echo "# Versions for release-mq.sh"
echo "############################"
echo $mq_versions

SUBSCRIPTION_NAME="ibm-integration-operations-dashboard-ibm-integration-operations-dashboard-catalog-openshift-marketplace"
echo "SUBSCRIPTION_NAME=${SUBSCRIPTION_NAME}"
csv=$(oc get subscription -n ${NAMESPACE} ${SUBSCRIPTION_NAME} -o json | jq -r .status.currentCSV)
echo "csv=${csv}"
od_examples=$(oc get csv $csv -n ${NAMESPACE} -o jsonpath='{.metadata.annotations.alm-examples}' | jq '[.[] | select(.kind=="OperationsDashboard")]')
od_versions=$(oc get csv $csv -n ${NAMESPACE} -o json | jq '.spec.customresourcedefinitions.owned[] | select(.kind=="OperationsDashboard") | .specDescriptors[] | select(.path=="version") | ."x-descriptors"')
echo ""
echo "#################################"
echo "# Examples for release-tracing.sh"
echo "#################################"
echo $od_examples | yq r -P -
echo "#################################"
echo "# Versions for release-tracing.sh"
echo "#################################"
echo $od_versions | yq r -P -
6 changes: 0 additions & 6 deletions products/bash/license-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ DEFAULT_APIC="L-GVEN-GFUPVE"
DEFAULT_AR="L-RJON-CD3JKX"
DEFAULT_DEMO="L-RJON-CJR3Q4"
DEFAULT_MQ="L-RJON-CJR2RX"
DEFAULT_TRACING="CP4I"

function usage() {
echo "Usage: source $0; getAceLicense \$NAMESPACE"
Expand Down Expand Up @@ -61,8 +60,3 @@ function getMQLicense() {
MQ_LICENSE=$(oc -n $1 get configmap $LICENSES_CM -ojsonpath='{.data.mq}' 2>/dev/null)
[[ $? -eq 0 && ! -z $MQ_LICENSE ]] && echo $MQ_LICENSE || echo $DEFAULT_MQ
}

function getTracingLicense() {
TRACING_LICENSE=$(oc -n $1 get configmap $LICENSES_CM -ojsonpath='{.data.tracing}' 2>/dev/null)
[[ $? -eq 0 && ! -z $TRACING_LICENSE ]] && echo $TRACING_LICENSE || echo $DEFAULT_TRACING
}
33 changes: 1 addition & 32 deletions products/bash/release-ace-integration-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ source $CURRENT_DIR/utils.sh
namespace="cp4i"
is_image_name=""
is_release_name="ace-is"
tracing_enabled="false"
tracing_namespace=""
POLICY_PROJECT_TYPE="policyproject-ddd-dev"
ace_replicas="2"
license_use="CloudPakForIntegrationNonProduction"
Expand Down Expand Up @@ -97,13 +95,6 @@ echo "[DEBUG] ACE license: $(getACELicense $namespace)"

echo "Current directory: $CURRENT_DIR"

if [ "$tracing_enabled" == "true" ]; then
if [ -z "$tracing_namespace" ]; then tracing_namespace=${namespace}; fi
else
# assigning value to tracing_namespace b/c empty values causes CR to throw an error
tracing_namespace=${namespace}
fi

if [[ -z "${ace_policy_names// /}" ]]; then
ace_policy_names="[keystore-ddd, $POLICY_PROJECT_TYPE, serverconf-ddd, setdbparms-ddd, application.kdb, application.sth, application.jks]"
fi
Expand All @@ -123,8 +114,6 @@ if [[ -z "$imageTag" ]]; then
exit 1
fi

echo "[INFO] tracing is set to $tracing_enabled"

echo -e "INFO: Going ahead to apply the CR for '$is_release_name'"

divider
Expand Down Expand Up @@ -162,26 +151,10 @@ spec:
endpointType: https
useCommonServices: true
version: '12.0.7.0-r1'
tracing:
enabled: ${tracing_enabled}
namespace: ${tracing_namespace}
EOF
)
OCApplyYAML "$namespace" "$YAML"

timer=0
echo "[INFO] tracing is set to $tracing_enabled"
if [ "$tracing_enabled" == "true" ]; then
while ! oc get secrets icp4i-od-store-cred -n ${namespace}; do
echo "Waiting for the secret icp4i-od-store-cred to get created"
if [ $timer -gt 30 ]; then
echo "Secret icp4i-od-store-cred didn't get created in ${namespace}, going to create the secret next "
break
timer=$((timer + 1))
fi
sleep 10
done
fi
# -------------------------------------- INSTALL JQ ---------------------------------------------------------------------

divider
Expand Down Expand Up @@ -240,11 +213,7 @@ while [ "$numberOfMatchesForImageTag" -ne "$numberOfReplicas" ]; do

numberOfMatchesForImageTag=0

if [ "${tracing_enabled}" == "true" ]; then
allCorrespondingPods=$(oc get pods -n $namespace | grep $is_release_name | grep 3/3 | grep Running | awk '{print $1}')
else
allCorrespondingPods=$(oc get pods -n $namespace | grep $is_release_name | grep 1/1 | grep Running | awk '{print $1}')
fi
allCorrespondingPods=$(oc get pods -n $namespace | grep $is_release_name | grep 1/1 | grep Running | awk '{print $1}')

echo -e "[INFO] Total pods for ACE Integration Server:\n$allCorrespondingPods"

Expand Down
4 changes: 0 additions & 4 deletions products/bash/release-apic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ CURRENT_DIR=$(dirname $0)
source $CURRENT_DIR/utils.sh
namespace="cp4i"
release_name="ademo"
tracing="false"
production="false"

while getopts "n:r:tp" opt; do
Expand Down Expand Up @@ -93,9 +92,6 @@ metadata:
app.kubernetes.io/name: apiconnect-production
spec:
gateway:
openTracing:
enabled: ${tracing}
odTracingNamespace: ${namespace}
replicaCount: 1
license:
accept: true
Expand Down
34 changes: 3 additions & 31 deletions products/bash/release-mq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# -r : <release_name> (string), Defaults to "mq-demo"
# -i : <image_name> (string)
# -q : <qm_name> (string), Defaults to "QUICKSTART"
# -z : <tracing_namespace> (string), Defaults to "namespace"
# -t : <tracing_enabled> (boolean), optional flag to enable tracing, Defaults to false
# -z : <tracing_namespace> (string), Defaults to "namespace" - Out of support
# -t : <tracing_enabled> (boolean), optional flag to enable tracing, Defaults to false - Out of support
# -a : <HA_ENABLED>, default to false
# -b : <block-storage-class> (string), Default to "ibmc-block-gold"
#
Expand All @@ -34,8 +34,6 @@ source $CURRENT_DIR/utils.sh
namespace="cp4i"
release_name="mq-demo"
qm_name="QUICKSTART"
tracing_namespace=""
tracing_enabled="false"
HA_ENABLED="false"
block_storage="ibmc-block-gold"

Expand Down Expand Up @@ -87,22 +85,6 @@ echo "[DEBUG] MQ license: $(getMQLicense $namespace)"
echo "Current directory: $CURRENT_DIR"
echo "Namespace: $namespace"

# when called from install.sh
if [ "$tracing_enabled" == "true" ]; then
if [ -z "$tracing_namespace" ]; then tracing_namespace=${namespace}; fi
else
# assigning value to tracing_namespace b/c empty values causes CR to throw an error
tracing_namespace=${namespace}
fi

echo "[INFO] tracing is set to $tracing_enabled"

if [[ "$release_name" =~ "ddd" ]]; then
numberOfContainers=3
elif [[ "$release_name" =~ "eei" ]]; then
numberOfContainers=1
fi

# -------------------------------------- INSTALL JQ ---------------------------------------------------------------------

divider
Expand Down Expand Up @@ -189,9 +171,6 @@ ${qmStorageAvailability}
version: 9.3.1.0-r3
web:
enabled: true
tracing:
enabled: ${tracing_enabled}
namespace: ${tracing_namespace}
EOF
)
OCApplyYAML "$namespace" "$YAML"
Expand Down Expand Up @@ -307,9 +286,6 @@ ${qmStorageAvailability}
version: 9.3.1.0-r3
web:
enabled: true
tracing:
enabled: ${tracing_enabled}
namespace: ${tracing_namespace}
EOF
)
OCApplyYAML "$namespace" "$YAML"
Expand All @@ -336,11 +312,7 @@ EOF

numberOfMatchesForImageTag=0

if [ "${tracing_enabled}" == "true" ]; then
allCorrespondingPods=$(oc get pods -n $namespace | grep $release_name | grep 3/3 | grep Running | awk '{print $1}')
else
allCorrespondingPods=$(oc get pods -n $namespace | grep $release_name | grep 1/1 | grep Running | awk '{print $1}')
fi
allCorrespondingPods=$(oc get pods -n $namespace | grep $release_name | grep 1/1 | grep Running | awk '{print $1}')

echo "[INFO] Total pods for mq $allCorrespondingPods"

Expand Down
Loading

0 comments on commit ded3436

Please sign in to comment.