diff --git a/README.md b/README.md index d77c446..47e6a21 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Experimental- MAS automation operator +# MAS automation operator **Defaults to latest v8.8 of MAS** @@ -37,71 +37,4 @@ Current list of MAS components supported with this operator install as well as r ### CHANGE LOG -v0.12.4 - v0.12.11 -- Implementents github workflow automation in module and bundle to automate build/push to quay - -v0.12.3 -- Removes Masauto API (functionality moved to Core api) - -v0.12.2 -- Separates DB for manage and monitor/iot - -v0.11.4 -- Simplifies the spec for manage add-on deployment - -v0.11.3 -- Updates operator catalog source sample - -v0.11.2 -- Updates CP4D sample CRs -- Updates bundle for deployment to quay.io - -v0.11.1 -- Multiple updates to prepare for release - -v0.10.2 -- Adds bundle for OLM and custom catalog deployment - -v0.9.4 -- Service account and rbac updates for multi namespaces - -v0.9.0 -- Adds Predict deployment - -v0.8.2 -- Adds Core api (masauto still there for the moment but will be removed) -- Updated CP4D playbook for suite config -- Updated sample CRs - -v0.8.1 -- Adds read of entitlement key from secret now in all playbooks -- updates samples to support entitlment key secret - -v0.8.0 -- Adds Health Predict & Utilities deployment - -v0.7.0 -- Adds CP4D deployment (foundation) -- Adds CP4D services: wsl, wml, spark, aiopenscale, wd - -v0.6.0 -- Adds AppConnect deployment -- can read secret for ibm-entitlement-key from operator secret OR can pass in CR supports both now - -v0.5.0 -- Adds Monitor deployment -- Sets reconcile period - -v0.4.0 -- Adds IoT deployment - -v0.3.0 -- Adds Manage and DB2 deployment -- start adding sample CR's in the config/samples directory - -v0.2.0 -- First working version with Core - -v0.1.0 -- Sets up initial operator scaffolding -- Adds initial core api +See the changelog.md in this repository diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..16e9daa --- /dev/null +++ b/changelog.md @@ -0,0 +1,73 @@ +### CHANGE LOG +v1.0.0 +- Updates destroy scrip +- Adds comments for requirements prior to running each CR + +v0.12.4 - v0.12.11 +- Implementents github workflow automation in module and bundle to automate build/push to quay + +v0.12.3 +- Removes Masauto API (functionality moved to Core api) + +v0.12.2 +- Separates DB for manage and monitor/iot + +v0.11.4 +- Simplifies the spec for manage add-on deployment + +v0.11.3 +- Updates operator catalog source sample + +v0.11.2 +- Updates CP4D sample CRs +- Updates bundle for deployment to quay.io + +v0.11.1 +- Multiple updates to prepare for release + +v0.10.2 +- Adds bundle for OLM and custom catalog deployment + +v0.9.4 +- Service account and rbac updates for multi namespaces + +v0.9.0 +- Adds Predict deployment + +v0.8.2 +- Adds Core api (masauto still there for the moment but will be removed) +- Updated CP4D playbook for suite config +- Updated sample CRs + +v0.8.1 +- Adds read of entitlement key from secret now in all playbooks +- updates samples to support entitlment key secret + +v0.8.0 +- Adds Health Predict & Utilities deployment + +v0.7.0 +- Adds CP4D deployment (foundation) +- Adds CP4D services: wsl, wml, spark, aiopenscale, wd + +v0.6.0 +- Adds AppConnect deployment +- can read secret for ibm-entitlement-key from operator secret OR can pass in CR supports both now + +v0.5.0 +- Adds Monitor deployment +- Sets reconcile period + +v0.4.0 +- Adds IoT deployment + +v0.3.0 +- Adds Manage and DB2 deployment +- start adding sample CR's in the config/samples directory + +v0.2.0 +- First working version with Core + +v0.1.0 +- Sets up initial operator scaffolding +- Adds initial core api \ No newline at end of file diff --git a/config/samples/sample_appcon_cr.yaml b/config/samples/sample_appcon_cr.yaml index 4cc44e9..3dbfc11 100644 --- a/config/samples/sample_appcon_cr.yaml +++ b/config/samples/sample_appcon_cr.yaml @@ -1,3 +1,8 @@ +# Adds AppConnect to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# apiVersion: masauto.ibm.com/v1alpha1 kind: AppCon metadata: diff --git a/config/samples/sample_cp4d_cr.yaml b/config/samples/sample_cp4d_cr.yaml index bc3d4ac..dcad54f 100644 --- a/config/samples/sample_cp4d_cr.yaml +++ b/config/samples/sample_cp4d_cr.yaml @@ -1,3 +1,10 @@ +# Adds CP4D to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# +# Note: Install Foundation first then other components +# apiVersion: masauto.ibm.com/v1alpha1 kind: CP4D metadata: diff --git a/config/samples/sample_cp4d_wsl_cr.yaml b/config/samples/sample_cp4d_wsl_cr.yaml index 74cc4b7..b7898ed 100644 --- a/config/samples/sample_cp4d_wsl_cr.yaml +++ b/config/samples/sample_cp4d_wsl_cr.yaml @@ -1,3 +1,8 @@ +# Adds CP4D to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# - CP4D Foundation is installed apiVersion: masauto.ibm.com/v1alpha1 kind: CP4D metadata: diff --git a/config/samples/sample_hpu_cr.yaml b/config/samples/sample_hpu_cr.yaml index c309e76..5df175f 100644 --- a/config/samples/sample_hpu_cr.yaml +++ b/config/samples/sample_hpu_cr.yaml @@ -1,3 +1,11 @@ +# Adds HP&U latest release to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# - Health is installed +# - CP4D/WSL +# - AppConnect +# apiVersion: masauto.ibm.com/v1alpha1 kind: HPU metadata: diff --git a/config/samples/sample_iot_cr.yaml b/config/samples/sample_iot_cr.yaml index 451ab8f..a665e43 100644 --- a/config/samples/sample_iot_cr.yaml +++ b/config/samples/sample_iot_cr.yaml @@ -1,3 +1,8 @@ +# Add IoT latest application to an existing MAS Core 8.8.x installation +# +# Dependencies: +# - Core is installed +# apiVersion: masauto.ibm.com/v1alpha1 kind: IoT metadata: diff --git a/config/samples/sample_manage_cr.yaml b/config/samples/sample_manage_cr.yaml index eb29a0a..284505e 100644 --- a/config/samples/sample_manage_cr.yaml +++ b/config/samples/sample_manage_cr.yaml @@ -1,3 +1,8 @@ +# Add Manage latest application to an existing MAS Core 8.8.x installation +# +# Dependencies: +# - Core +# apiVersion: masauto.ibm.com/v1alpha1 kind: Manage metadata: diff --git a/config/samples/sample_monitor_cr.yaml b/config/samples/sample_monitor_cr.yaml index 2d1e0ce..162af47 100644 --- a/config/samples/sample_monitor_cr.yaml +++ b/config/samples/sample_monitor_cr.yaml @@ -1,3 +1,11 @@ +# Adds Monitor latest release to an existing MAS Core 8.8.x + IoT 8.5.x installation +# +# Monitor will be configured to use the same db2 instance that IoT is using +# +# Dependencies: +# - Core is installed +# - IoT is installed +# apiVersion: masauto.ibm.com/v1alpha1 kind: Monitor metadata: diff --git a/config/samples/sample_predict_cr.yaml b/config/samples/sample_predict_cr.yaml index ca1dbd7..bfc8b48 100644 --- a/config/samples/sample_predict_cr.yaml +++ b/config/samples/sample_predict_cr.yaml @@ -1,3 +1,13 @@ +# Adds Predict latest release to an existing MAS v8.8.x installation +# +# Predict will be deployed and configured. Note this app has several dependencies +# +# Dependencies: +# - CP4D Foundation +# - CP4D Services: wsl, wml, spark, aiopenscale +# - Maximo Monitor +# - Maximo Health +# apiVersion: masauto.ibm.com/v1alpha1 kind: Predict metadata: diff --git a/mas-destroy-core.sh b/mas-destroy-core.sh index 569280a..70bc573 100755 --- a/mas-destroy-core.sh +++ b/mas-destroy-core.sh @@ -4,14 +4,21 @@ BASNAME="ibm-common-services" SLSNAME="$2" MONGONAME="$3" +#checks for params +if [ $# -ne 3 ] + then + echo "Usage: ./mas-destroy-core.sh " + exit 0 +fi + NAMESPACE="mas-${SUITENAME}-core" ## ## MAS-Core cleanup script to remove installed resources from gitops deployment ## -# remove argo apps - +#remove the CR from the MAS Automation operator +oc delete core masauto-core -n masauto-operator-system #remove ibm common services oc delete operandconfig common-service -n ibm-common-services @@ -35,8 +42,24 @@ oc delete MutatingWebhookConfiguration cert-manager-webhook ibm-common-service-w oc delete namespace services oc delete nss --all -# remove core -oc delete suite ${SUITENAME} -n ${NAMESPACE} +# remove core suite - it will most likely hang so remove finalizer +oc delete suite ${SUITENAME} -n ${NAMESPACE} >/dev/null 2>&1 & +resp=$(kubectl get suite ${SUITENAME} -n ${NAMESPACE} --no-headers 2>/dev/null | wc -l) + +if [[ "${resp}" != "0" ]]; then + echo "patching suite..." + kubectl patch suite/${SUITENAME} -p '{"metadata":{"finalizers":[]}}' --type=merge -n ${NAMESPACE} 2>/dev/null +fi + +# remove core workspace - assume default install using masdev as workspace name +oc delete workspace ${SUITENAME}-masdev -n ${NAMESPACE} >/dev/null 2>&1 & +resp=$(kubectl get workspace ${SUITENAME}-masdev -n ${NAMESPACE} --no-headers 2>/dev/null | wc -l) + +if [[ "${resp}" != "0" ]]; then + echo "patching workspace..." + kubectl patch workspace/${SUITENAME}-masdev -p '{"metadata":{"finalizers":[]}}' --type=merge -n ${NAMESPACE} 2>/dev/null +fi + oc delete csv ibm-mas.v8.8 -n ${NAMESPACE} # remove truststore and dependencies @@ -91,12 +114,12 @@ if [[ "${resp}" != "0" ]]; then kubectl patch operandbindinfo/ibm-uds-bindinfo -p '{"metadata":{"finalizers":[]}}' --type=merge -n ibm-common-services 2>/dev/null fi -oc delete operandrequest common-service -n ibm-common-services >/dev/null 2>&1 & -resp=$(kubectl get operandrequest/common-service -n ibm-common-services --no-headers 2>/dev/null | wc -l) +oc delete operandrequest common-service -n ${NAMESPACE} >/dev/null 2>&1 & +resp=$(kubectl get operandrequest/common-service -n ${NAMESPACE} --no-headers 2>/dev/null | wc -l) if [[ "${resp}" != "0" ]]; then echo "patching operandrequest common-service..." - kubectl patch operandrequest/common-service -p '{"metadata":{"finalizers":[]}}' --type=merge -n ibm-common-services 2>/dev/null + kubectl patch operandrequest/common-service -p '{"metadata":{"finalizers":[]}}' --type=merge -n ${NAMESPACE} 2>/dev/null fi oc delete operandrequest events-operator-request -n ibm-common-services >/dev/null 2>&1 & @@ -131,6 +154,14 @@ if [[ "${resp}" != "0" ]]; then kubectl patch operandregistry/common-service -p '{"metadata":{"finalizers":[]}}' --type=merge -n ibm-common-services 2>/dev/null fi +oc delete slscfg ${SUITENAME}-sls-system -n ${NAMESPACE} >/dev/null 2>&1 & +resp=$(kubectl get slscfg/${SUITENAME}-sls-system -n ${NAMESPACE} --no-headers 2>/dev/null | wc -l) + +if [[ "${resp}" != "0" ]]; then + echo "patching slscfg..." + kubectl patch slscfg/${SUITENAME}-sls-system -p '{"metadata":{"finalizers":[]}}' --type=merge -n ${NAMESPACE} 2>/dev/null +fi + # remove crd's oc get crd -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | grep ibm.com | while read crd; do oc delete "crd/$crd"; done oc get crd -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | grep cert-manager.io | while read crd; do oc delete "crd/$crd"; done diff --git a/samples/sample_appcon_cr.yaml b/samples/sample_appcon_cr.yaml index 4cc44e9..3dbfc11 100644 --- a/samples/sample_appcon_cr.yaml +++ b/samples/sample_appcon_cr.yaml @@ -1,3 +1,8 @@ +# Adds AppConnect to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# apiVersion: masauto.ibm.com/v1alpha1 kind: AppCon metadata: diff --git a/samples/sample_cp4d_ai_cr.yaml b/samples/sample_cp4d_ai_cr.yaml index db7e453..052deec 100644 --- a/samples/sample_cp4d_ai_cr.yaml +++ b/samples/sample_cp4d_ai_cr.yaml @@ -1,3 +1,8 @@ +# Adds CP4D to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# - CP4D Foundation is installed apiVersion: masauto.ibm.com/v1alpha1 kind: CP4D metadata: diff --git a/samples/sample_cp4d_cr.yaml b/samples/sample_cp4d_cr.yaml index 7754525..b83d3cb 100644 --- a/samples/sample_cp4d_cr.yaml +++ b/samples/sample_cp4d_cr.yaml @@ -1,3 +1,8 @@ +# Adds CP4D to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# apiVersion: masauto.ibm.com/v1alpha1 kind: CP4D metadata: diff --git a/samples/sample_cp4d_spark_cr.yaml b/samples/sample_cp4d_spark_cr.yaml index af1ee74..7bad19a 100644 --- a/samples/sample_cp4d_spark_cr.yaml +++ b/samples/sample_cp4d_spark_cr.yaml @@ -1,3 +1,8 @@ +# Adds CP4D to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# - CP4D Foundation is installed apiVersion: masauto.ibm.com/v1alpha1 kind: CP4D metadata: diff --git a/samples/sample_cp4d_wml_cr.yaml b/samples/sample_cp4d_wml_cr.yaml index e3b4a6c..1dfeb56 100644 --- a/samples/sample_cp4d_wml_cr.yaml +++ b/samples/sample_cp4d_wml_cr.yaml @@ -1,3 +1,8 @@ +# Adds CP4D to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# - CP4D Foundation is installed apiVersion: masauto.ibm.com/v1alpha1 kind: CP4D metadata: diff --git a/samples/sample_cp4d_wsl_cr.yaml b/samples/sample_cp4d_wsl_cr.yaml index 74cc4b7..b7898ed 100644 --- a/samples/sample_cp4d_wsl_cr.yaml +++ b/samples/sample_cp4d_wsl_cr.yaml @@ -1,3 +1,8 @@ +# Adds CP4D to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# - CP4D Foundation is installed apiVersion: masauto.ibm.com/v1alpha1 kind: CP4D metadata: diff --git a/samples/sample_hpu_cr.yaml b/samples/sample_hpu_cr.yaml index a691387..e69b1b8 100644 --- a/samples/sample_hpu_cr.yaml +++ b/samples/sample_hpu_cr.yaml @@ -1,3 +1,11 @@ +# Adds HP&U latest release to an existing MAS Core 8.8.x +# +# Dependencies: +# - Core is installed +# - Health is installed +# - CP4D/WSL +# - AppConnect +# apiVersion: masauto.ibm.com/v1alpha1 kind: HPU metadata: diff --git a/samples/sample_iot_cr.yaml b/samples/sample_iot_cr.yaml index 451ab8f..a665e43 100644 --- a/samples/sample_iot_cr.yaml +++ b/samples/sample_iot_cr.yaml @@ -1,3 +1,8 @@ +# Add IoT latest application to an existing MAS Core 8.8.x installation +# +# Dependencies: +# - Core is installed +# apiVersion: masauto.ibm.com/v1alpha1 kind: IoT metadata: diff --git a/samples/sample_manage_cr.yaml b/samples/sample_manage_cr.yaml index eb29a0a..284505e 100644 --- a/samples/sample_manage_cr.yaml +++ b/samples/sample_manage_cr.yaml @@ -1,3 +1,8 @@ +# Add Manage latest application to an existing MAS Core 8.8.x installation +# +# Dependencies: +# - Core +# apiVersion: masauto.ibm.com/v1alpha1 kind: Manage metadata: diff --git a/samples/sample_monitor_cr.yaml b/samples/sample_monitor_cr.yaml index 2d1e0ce..162af47 100644 --- a/samples/sample_monitor_cr.yaml +++ b/samples/sample_monitor_cr.yaml @@ -1,3 +1,11 @@ +# Adds Monitor latest release to an existing MAS Core 8.8.x + IoT 8.5.x installation +# +# Monitor will be configured to use the same db2 instance that IoT is using +# +# Dependencies: +# - Core is installed +# - IoT is installed +# apiVersion: masauto.ibm.com/v1alpha1 kind: Monitor metadata: diff --git a/samples/sample_predict_cr.yaml b/samples/sample_predict_cr.yaml index ca1dbd7..bfc8b48 100644 --- a/samples/sample_predict_cr.yaml +++ b/samples/sample_predict_cr.yaml @@ -1,3 +1,13 @@ +# Adds Predict latest release to an existing MAS v8.8.x installation +# +# Predict will be deployed and configured. Note this app has several dependencies +# +# Dependencies: +# - CP4D Foundation +# - CP4D Services: wsl, wml, spark, aiopenscale +# - Maximo Monitor +# - Maximo Health +# apiVersion: masauto.ibm.com/v1alpha1 kind: Predict metadata: