Table of Contents generated with DocToc
crossplane-provider-cp4waiops
is a Crossplane Provider, which helps preparing dependencies and installing cp4waiops, the goal is to automate installing procedure, by observing each steps status in target OCP cluster. If not yet applied, it then helps executing and abservinig the current step until completion .
- A Kubernetes cluster https://kubernetes.io/
- Install crossplane https://crossplane.io in above Kubernetes cluster
- A target OpenShift cluster for Cloud Pak for Wastson AIOps
git clone https://github.com/cloud-pak-gitops/crossplane-provider-cp4waiops.git
cd crossplane-provider-cp4waiops
Using the kubeconfig in this repo as examplea:
kubectl create secret generic openshift-cluster-kubeconfig --from-file=credentials=./examples/provider/kubeconfig -n crossplane-system
Note: You need to replace the sample kubeconfig with your target kubeconfig
kubectl create secret generic image-pull-secret --from-literal=cp.icr.io=cp:<entitlement-key> -n crossplane-system
Note: refer to CP4WAIOPS-KC to replace the entitlement-key
kubectl apply -f package/crds/ -R
kubectl apply -f cluster/deploy -R
and verify the pod crossplane-provider-cloudpak is running
kubectl get po -n crossplane-system
The output would be as following:
$ kubectl get po -n crossplane-system
NAME READY UP-TO-DATE AVAILABLE AGE
crossplane 1/1 1 1 21d
crossplane-provider-cloudpak 1/1 1 1 17h
crossplane-rbac-manager 1/1 1 1 21d
The providerConfig will tell the provider which OpenShift will be connected and deploy the Cloud Pak for Waston AIOps.
cat << EOF | oc apply -f -
apiVersion: cloudpak.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
name: openshift-cluster-provider-config
spec:
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: openshift-cluster-kubeconfig
key: credentials
EOF
The storageclass is not handled in this repo yet, since there're multiple ways for different infrastrctures.
If using ROKS, you may create Portworx following official doc
Coming soon:
We have tried to prepare OCS(local-disk) successfully , will separate it as an individual CR for user to consume , before that you still need to prepare storage yourself .
We need to create the CP4WAIOPS CR to install the Cloud Pak for Watson AIOps to target OpenShit Cluster.
cat << EOF | oc apply -f -
apiVersion: cloudpak.crossplane.io/v1alpha1
kind: Cp4waiops
metadata:
name: cp4waiops
spec:
forProvider:
catalogsource:
image: icr.io/cpopen/aiops-orchestrator-catalog:3.1-latest
channel: v3.1
installParams:
imagePullSecret: ibm-entitlement-key
namespace: cp4waiops
license:
accept: true
pakModules:
- name: aiManager
enabled: true
- name: aiopsFoundation
enabled: true
- name: applicationManager
enabled: true
config:
- name: noi-operator
spec:
noi:
persistence:
storageClassDB2: rook-cephfs
size: small
storageClass: rook-cephfs
storageClassLargeBlock: rook-cephfs
providerConfigRef:
name: openshift-cluster-provider-config
EOF
Note: You may want to modify the values in yaml to customize your installation.