Skip to content

Commit

Permalink
Merge pull request #63 from cloud-native-toolkit/update-new-release-12-2
Browse files Browse the repository at this point in the history
Update new release 12.3.1 and multiple enhancements
  • Loading branch information
tcskill authored Dec 16, 2022
2 parents 3b1d53c + d884add commit 41769f7
Show file tree
Hide file tree
Showing 33 changed files with 386 additions and 170 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# MAS automation operator

**Defaults to latest v8.8 of MAS**
(currently using MAS Ansible v12.3.1)

**This will default to latest v8.8 of MAS**
(Full MAS 8.9 support expected with MAS v8.9.1 release GA)

This creates an operator that will kick off the ansible tasks when passed a CR for whatever MAS component you wish to be installed.
Sample CR's can be found in the `/config/samples` directory.
Expand All @@ -13,7 +16,7 @@ Current list of MAS components supported with this operator install as well as r
- IoT
- Monitor
- AppConnect
- CP4D (foundation and services: wsl, wml, spark, aiopenscale, wd)
- CP4D (* see note below * - foundation and services: wsl, wml, spark, aiopenscale, wd)
- Predict
- Health Predict & Utilities

Expand All @@ -27,14 +30,18 @@ Current list of MAS components supported with this operator install as well as r

`oc create secret generic "ibm-entitlement-key" -n masauto-operator-system --from-literal="username=cp" --from-literal="password=<your-ibm-entitlement-key-goes-here>" `

4. Deploy the operator
Note: your entitlement key can be found [here](https://myibm.ibm.com/products-services/containerlibrary)

3. Deploy the operator


### TO DESTROY INSTALL

`./mas-destroy-core.sh inst1 ibm-sls mongoce`


### CHANGE LOG
### CP4D IMPORTANT NOTE
BEFORE installing CP4D you currently must have a *global* pull secret defined on the cluster with your IBM Entitlement Key

See the changelog.md in this repository
### Predict Important Note
If Predict install fails with a configuration error message for the database or database not able to be connected to, then most likely you will need to increase the heap of your db2 MASIOT database. You can edit the following: CustomResourceDefination-> Db2Cluster->Instances->MASIOT in the yaml edit the pod resources limits section set cpu:8 and mem: 32Gi
6 changes: 3 additions & 3 deletions bundle/manifests/masauto-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ metadata:
operatorframework.io/suggested-namespace: masauto-operator-system
operators.operatorframework.io/builder: operator-sdk-v1.22.0-ocp
operators.operatorframework.io/project_layout: ansible.sdk.operatorframework.io/v1
name: masauto-operator.v1.0.3
name: masauto-operator.v2.0.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -295,7 +295,7 @@ spec:
env:
- name: ANSIBLE_GATHERING
value: explicit
image: quay.io/cloudnativetoolkit/masauto:v1.0.3
image: quay.io/cloudnativetoolkit/masauto:v2.0.0
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -348,4 +348,4 @@ spec:
provider:
name: IBM Ecosystem Engineering
url: https://modules.cloudnativetoolkit.dev/
version: 1.0.3
version: 2.0.0
73 changes: 0 additions & 73 deletions changelog.md

This file was deleted.

2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/cloudnativetoolkit/masauto
newTag: v1.0.3
newTag: v2.0.0
5 changes: 0 additions & 5 deletions config/samples/sample_appcon_cr.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Adds AppConnect to an existing MAS Core 8.8.x
#
# Dependencies:
# - Core is installed
#
apiVersion: masauto.ibm.com/v1alpha1
kind: AppCon
metadata:
Expand Down
6 changes: 3 additions & 3 deletions config/samples/sample_core_cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
mas_workspace_name: "MAS Development"
mongodb_storage_class: "ibmc-vpcblock-odf-10iops"
uds_contact:
email: "tskill@us.ibm.com"
first_name: "tom"
last_name: "skill"
email: "youremail@us.ibm.com"
first_name: "yourfirstname"
last_name: "yourlastname"
uds_storage_class: "ibmc-vpcblock-odf-10iops"
14 changes: 4 additions & 10 deletions config/samples/sample_cp4d_cr.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
# 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:
name: masauto-cp4d-foundation
name: masauto-cp4d-platform
namespace: masauto-operator-system
annotations:
ansible.operator-sdk/reconcile-period: "0s"
spec:
ibm_entitlement_secret: "ibm-entitlement-key" #secret where your ibm-entitlement-key is stored in operator namespace
cpd_primary_storage_class: "ocs-storagecluster-cephfs" #file
cpd_metadata_storage_class: "ibmc-vpcblock-odf-10iops" #block
cpd_product_version: "4.0.9"
install_cp4d_platform: "true" #(~1 1/2 hours)

mas_instance_id: "inst1"

install_watson_studio: "false" #(~3 hours)
mas_instance_id: "inst1"

install_watson_machine_learning: "false" #(~2 1/2 hours)
install_analytics_engine: "false" #(~30 minutes)
install_watson_openscale: "false" #(~1 hour)
Expand Down
6 changes: 1 addition & 5 deletions config/samples/sample_cp4d_wsl_cr.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# 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:
Expand All @@ -14,6 +9,7 @@ spec:
ibm_entitlement_secret: "ibm-entitlement-key" #secret where your ibm-entitlement-key is stored in operator namespace
cpd_primary_storage_class: "ocs-storagecluster-cephfs" #file
cpd_metadata_storage_class: "ibmc-vpcblock-odf-10iops" #block
cpd_product_version: "4.0.9"
install_cp4d_platform: "false" #(~1 1/2 hours)

install_watson_studio: "true" #(~3 hours)
Expand Down
19 changes: 0 additions & 19 deletions config/samples/sample_hpu_cr.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# 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:
Expand All @@ -18,14 +10,3 @@ spec:
mas_instance_id: "inst1"
mas_workspace_id: "masdev"
mas_app_channel: "8.4.x"

## this cr assumes you have been using the defaults of this automation
## and in the masconfig dir you have a wsl project yaml and project id
## file already created. If so nothing else is needed. If you did NOT take
## the defaults used in this automation then you will need to define the following
## variables as well:
##
## cpd_ws_project_name: "" ## value found in cp4d ui projects location
## cpd_ws_project_id: "" ## value found in cp4d url, open the ws project, id is number after the "project" in the url


8 changes: 3 additions & 5 deletions config/samples/sample_iot_cr.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# 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:
Expand All @@ -20,3 +15,6 @@ spec:
db2_meta_storage_class: "ocs-storagecluster-cephfs"
db2_data_storage_class: "ibmc-vpcblock-odf-10iops"
kafka_storage_class: "ibmc-vpcblock-odf-10iops"
grafana_instance_storage_class: "ocs-storagecluster-cephfs"
prometheus_alertmgr_storage_class: "ocs-storagecluster-cephfs"
prometheus_storage_class: "ocs-storagecluster-cephfs"
5 changes: 0 additions & 5 deletions config/samples/sample_manage_cr.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Add Manage latest application to an existing MAS Core 8.8.x installation
#
# Dependencies:
# - Core
#
apiVersion: masauto.ibm.com/v1alpha1
kind: Manage
metadata:
Expand Down
8 changes: 0 additions & 8 deletions config/samples/sample_monitor_cr.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# 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:
Expand Down
12 changes: 2 additions & 10 deletions config/samples/sample_predict_cr.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# 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:
Expand All @@ -20,3 +10,5 @@ spec:
mas_instance_id: "inst1"
mas_workspace_id: "masdev"
mas_app_channel: "8.6.x"
cpd_product_version: "4.0"
cpd_url: "<https:// ... insert your cp4d_url>"
8 changes: 8 additions & 0 deletions mas-destroy-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ 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)

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
fi

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)

Expand Down
30 changes: 27 additions & 3 deletions playbooks/appcon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,31 @@
# Entitlement key can be passed by either the key or a secret name
ibm_entitlement_secret: "{{ ibm_entitlement_secret }}"

# Set AppCon specifics for MAS install
appconnect_channel: "{{ lookup('env', 'appconnect_channel') | default('v4.2', true) }}"
appconnect_dashboard_name: "{{ lookup('env', 'appconnect_dashboard_name') | default('dashboard-12040r2', true) }}"
appconnect_license_id: "{{ lookup('env', 'appconnect_license_id') | default('L-APEH-C9NCK6', true) }}"
appconnect_namespace: "{{ lookup('env', 'appconnect_namespace') | default('ibm-app-connect', true) }}"

pre_tasks:
# Check if AppConnect is already installed first.
- name: "Check for AppConnect already installed"
kubernetes.core.k8s_info:
api_version: appconnect.ibm.com/v1beta1
kind: Dashboard
name: "{{ appconnect_dashboard_name }}"
namespace: "{{ appconnect_namespace }}"
register: op_app_ws_cr_result

# End the play if it's in Ready state.
- name: "Check if all components are deployed and Ready"
when: (op_app_ws_cr_result.resources is defined) and
(op_app_ws_cr_result.resources | length == 1) and
(op_app_ws_cr_result.resources[0].status is defined) and
(op_app_ws_cr_result.resources[0].status.phase is defined) and
(op_app_ws_cr_result.resources[0].status.phase == 'Ready')
meta: end_play

# Lookup entitlement key via secret if it's declared and the ibm_entitlement_key isn't
- name: "Lookup IBM Entitlement Key credentials"
when: (ibm_entitlement_secret is defined and ibm_entitlement_secret != "")
Expand Down Expand Up @@ -54,8 +78,8 @@
vars:
appconnect_entitlement_key: "{{ ibm_entitlement_key }}"
# For AppConnect - these defaults are for a MAS v8.8 install and should be used for a v8.8 install core
appconnect_channel: "v4.2"
appconnect_dashboard_name: "dashboard-12040r2"
appconnect_license_id: "L-APEH-C9NCK6"
appconnect_channel: "{{ appconnect_channel }}"
appconnect_dashboard_name: "{{ appconnect_dashboard_name }}"
appconnect_license_id: "{{ appconnect_license_id }}"
appconnect_storage_class: "{{ appconnect_storage_class }}" #file storage class

Loading

0 comments on commit 41769f7

Please sign in to comment.