Skip to content

Helpful SRE Information on CodeFlare Stack

James Busche edited this page Aug 10, 2023 · 28 revisions

Table of Contents

Replacing Images in MCAD operator or InstaScale operators

Method to replace existing MCAD or InstaScale images. (NOTE: Even though this replaces the images, that doesn't mean the newer or older images work or are tested with the installed CodeFlare stack...)

kubectl edit mcads mcad

or

kubectl edit instascales instascale

and under spec: add something like this for MCAD:

spec:
  controllerImage: quay.io/project-codeflare/mcad-controller:main-v1.30.0

or for InstaScale:

spec:
  controllerImage: quay.io/project-codeflare/instascale-controller:v0.0.4

Changing resources for MCAD operator or InstaScale operator - NOTE, ODH 2.0.0+ only!

Edit the CR for either mcads or instascale like this:

kubectl edit mcads mcad

or

kubectl edit instascales instascale

And then add this under the spec section:

  controllerResources:
    limits:
      cpu: "1"
      memory: 1G
    requests:
      cpu: "1"
      memory: 1G

CodeFlare Cleanup steps

To completely clean up all the CodeFlare components after an install, follow these steps:

  1. No appwrappers should be left running:

    kubectl get appwrappers -A

    If any are left, you'd want to delete them

  2. Remove the notebook and notebook pvc:

    kubectl delete notebook jupyter-nb-kube-3aadmin -n opendatahub
    kubectl delete pvc jupyterhub-nb-kube-3aadmin-pvc -n opendatahub
  3. Remove the codeflare-stack kfdef

    kubectl delete kfdef codeflare-stack -n opendatahub
  4. Remove the CodeFlare Operator csv and subscription:

    kubectl delete sub codeflare-operator -n openshift-operators
    kubectl delete csv codeflare-operator.v0.0.6 -n openshift-operators
  5. Remove the CodeFlare CRDs

    kubectl delete crd instascales.codeflare.codeflare.dev mcads.codeflare.codeflare.dev schedulingspecs.mcad.ibm.com queuejobs.mcad.ibm.com

Installation of CodeFlare with ODH 2.0.0

  1. Install the "Fast" channel of the ODH operator (gets 2.0.0)

  2. Install GA CodeFlare operator (gets v0.0.6)

  3. Apply the following dsc:

kubectl apply -f - <<EOF
apiVersion: datasciencecluster.opendatahub.io/v1alpha1
kind: DataScienceCluster
metadata:
  name: default
spec:
  components:
    dashboard:
      enabled: true
    datasciencepipelines:
      enabled: false
    distributedWorkloads:
      enabled: true
    kserve:
      enabled: false
    modelmeshserving:
      enabled: false
    workbenches:
      enabled: true
EOF
  1. find the route for the dashboard oc get route -n opendatahub

  2. Open up the dashboard, Click on: Data Science Projects --> Launch Jupyter --> Codeflare Notebook --> Start Server

  3. In a Terminal, clone the codeflare-sdk git clone https://github.com/project-codeflare/codeflare-sdk.git

All the same from this point... (edited)