From ff455ce3219eb218fd3318cbc28bd7b40ea3dab3 Mon Sep 17 00:00:00 2001 From: Andrew Ballantyne Date: Thu, 27 Feb 2025 15:24:11 -0500 Subject: [PATCH] Remove Anaconda app --- .../testManifestLinks.yaml | 3 +- .../apps/anaconda-ce/anaconda-ce-app.yaml | 109 ---------------- ...ce-create-jupyter-notebook-quickstart.yaml | 84 ------------- .../apps/anaconda-ce/anaconda-ce-docs.yaml | 119 ------------------ .../apps/anaconda-ce/kustomization.yaml | 6 - .../rhoai/shared/apps/kustomization.yaml | 1 - .../base/anaconda-ce-validator-cron.yaml | 113 ----------------- .../rhoai/shared/base/kustomization.yaml | 1 - 8 files changed, 1 insertion(+), 435 deletions(-) delete mode 100644 manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-app.yaml delete mode 100644 manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-create-jupyter-notebook-quickstart.yaml delete mode 100644 manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-docs.yaml delete mode 100644 manifests/rhoai/shared/apps/anaconda-ce/kustomization.yaml delete mode 100644 manifests/rhoai/shared/base/anaconda-ce-validator-cron.yaml diff --git a/frontend/src/__tests__/cypress/cypress/fixtures/e2e/dashboardNavigation/testManifestLinks.yaml b/frontend/src/__tests__/cypress/cypress/fixtures/e2e/dashboardNavigation/testManifestLinks.yaml index 573e1691e2..ed11bbac21 100644 --- a/frontend/src/__tests__/cypress/cypress/fixtures/e2e/dashboardNavigation/testManifestLinks.yaml +++ b/frontend/src/__tests__/cypress/cypress/fixtures/e2e/dashboardNavigation/testManifestLinks.yaml @@ -10,6 +10,5 @@ excludedSubstrings: - localhost - console-openshift-console.apps.test-cluster.example.com/ - console-openshift-console.apps.test-cluster.example.com - - repo.anaconda.cloud/repo/t/$ - figma.com/figma/ns - - scikit-learn.org/stable/getting_started.html \ No newline at end of file + - scikit-learn.org/stable/getting_started.html diff --git a/manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-app.yaml b/manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-app.yaml deleted file mode 100644 index 075fe47100..0000000000 --- a/manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-app.yaml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: dashboard.opendatahub.io/v1 -kind: OdhApplication -metadata: - name: anaconda-ce - annotations: - opendatahub.io/categories: 'Package management,Notebook environments' -spec: - displayName: Anaconda Professional - provider: Anaconda - description: |- - Anaconda Professional is a popular open source package distribution and management experience that is optimized for commercial use. - kfdefApplications: [] - route: '' - img: >- - - - - - - - - - - - - - - - - - - - - - - - - - category: Partner managed - support: third party support - docsLink: https://docs.anaconda.com/ - quickStart: 'create-jupyter-notebook-anaconda' - getStartedLink: https://anaconda.cloud/register?utm_source=redhat-rhods-summit - enable: - title: Connect Anaconda to Jupyter - actionLabel: Connect - description: '' - variables: - Anaconda_ce_key: password - variableDisplayText: - Anaconda_ce_key: Anaconda CE Key - variableHelpText: - Anaconda_ce_key: This key is given to you by Anaconda - validationJob: anaconda-ce-periodic-validator - validationSecret: anaconda-ce-access - validationConfigMap: anaconda-ce-validation-result - - getStartedMarkDown: >- - # Anaconda Professional - - The world's most popular open-source package distribution and management experience, optimized for commercial use and compliance with our Terms of Service. - - ## Key features - - * More than 7500 Anaconda-built data science/machine learning packages - - * Access to all Anaconda packages curated for security and compatibility - - * With a site license, organizations can use mirroring software to create copies of the commercial package repository - - * Guaranteed up-time to support commercial usage - - * Compliant for commercial use according to the Anaconda Terms of Service - - - For more information visit [https://www.anaconda.com/products/professional](https://www.anaconda.com/products/professional) - - ## Subscribe - - 1. Go to [https://anaconda.cloud/register](https://anaconda.cloud/register?utm_source=redhat-rhods-summit) - - 2. Create an account - - 3. Create a profile - - 4. Purchase a Professional subscription - - 5. Receive an Anaconda Professional token and instructions for install and configuration via email. - - - You will need the token provided in the email when launching the Anaconda Jupyter image. diff --git a/manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-create-jupyter-notebook-quickstart.yaml b/manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-create-jupyter-notebook-quickstart.yaml deleted file mode 100644 index d5fa016b4a..0000000000 --- a/manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-create-jupyter-notebook-quickstart.yaml +++ /dev/null @@ -1,84 +0,0 @@ -apiVersion: console.openshift.io/v1 -kind: OdhQuickStart -metadata: - name: create-jupyter-notebook-anaconda - annotations: - opendatahub.io/categories: 'Package management,Notebook environments' -spec: - displayName: Creating an Anaconda-enabled Jupyter notebook - appName: anaconda-ce - durationMinutes: 5 - icon: 'images/anaconda-ce.svg' - description: Create an Anaconda-enabled Jupyter notebook and access Anaconda packages that are curated for security and compatibility. - introduction: |- - ### This quick start shows you how to create an Anaconda-enabled Jupyter notebook. - Red Hat® OpenShift® AI lets you run Jupyter notebooks on our Red Hat® OpenShift Dedicated environment. - - With Anaconda Professional you can access and use Anaconda packages that are curated for security and compatibility. - - This quick start will get you working in a notebook in just a few minutes. - tasks: - - title: Launch Jupyter - description: |- - ### To find the Jupyter Launch action: - 1. Click **Applications** → **Enabled**. - 2. Find the Jupyter card. - 3. Click **Launch** on the Jupyter card to access the Jupyter **Start a notebook server** page. - - A new browser tab will open displaying the **Start a notebook server** page. - review: - instructions: |- - #### To verify you have launched Jupyter: - Is a new **Jupyter** browser tab visible with the **Start a notebook server** page open? - failedTaskHelp: This task is not verified yet. Try the task again. - summary: - success: You have launched Jupyter. - failed: Try the steps again. - - title: Configure and start an environment - description: |- - ### Configure and start an environment: - 1. Select the Anaconda notebook image from the dropdown menu. This notebook uses Anaconda for all its packages, including Python. - 2. Select a container size; small, medium or large based on your computation needs. - 3. Click the **Start** button. - - The page will reload and indicate that the system is starting up. - review: - instructions: |- - #### To verify that you have launched the Jupyter notebook: - Do you see a message in the page that says **The server is starting up**? - failedTaskHelp: This task is not verified yet. Try the task again. - summary: - success: Your server has started and the JupyterLab interface will load shortly. When the page displays a **Stop** option, proceed to the next step. - failed: Try the steps again. - - title: Create your first notebook - description: |- - ### To create a notebook, follow these steps: - 1. In the JupyterLab interface, click **File** → **New** → **Notebook**. - 2. In the **Select Kernel** dialog, select **Python 3** and click **Select**. - - You have now launched a Jupyter notebook and can begin writing Python. - review: - instructions: |- - #### Verify that your Jupyter notebook launched with a Python 3 kernel: - Is Python 3 displaying in the upper right notification bar of your notebook? - failedTaskHelp: - This task is not verified yet. Try the task again. - summary: - success: You have a running Jupyter notebook. - failed: Try the steps again. - - title: Ensure you are subscribed to use Anaconda Professional packages. - description: |- - ### To verify that you are subscribed to Anaconda Professional in the notebook, follow these steps: - 1. In a notebook cell, type and run `!conda token set $ANACONDA_TOKEN` (replacing $ANACONDA_TOKEN with your own Anaconda Professional token.) - 1. Run `!conda info` in a notebook cell. - review: - instructions: |- - #### Verify that your Anaconda package manager points to the right repositories - Do the repositories in `conda info` point to `repo.anaconda.cloud` instead of `repo.anaconda.com`? - failedTaskHelp: - This task is not verified yet. Try the task again. - summary: - success: You have successfully subscribed to Anaconda Professional. - failed: Try the steps again. - conclusion: You are now able to install Anaconda Professional packages within your Jupyter notebook using the command `conda install $PACKAGE`. If you want to learn how to deploy a model, take the next quick start. - nextQuickStart: [deploy-python-model] diff --git a/manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-docs.yaml b/manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-docs.yaml deleted file mode 100644 index de626d1d05..0000000000 --- a/manifests/rhoai/shared/apps/anaconda-ce/anaconda-ce-docs.yaml +++ /dev/null @@ -1,119 +0,0 @@ -apiVersion: dashboard.opendatahub.io/v1 -kind: OdhDocument -metadata: - name: anaconda-background - annotations: - opendatahub.io/categories: 'Package management,Notebook environments' -spec: - appName: anaconda-ce - type: tutorial - displayName: Exploring Anaconda for data science - description: |- - Learn about Anaconda, a freemium open source distribution of the Python and R programming languages. - url: https://learning.anaconda.cloud - durationMinutes: 5 ---- -apiVersion: dashboard.opendatahub.io/v1 -kind: OdhDocument -metadata: - name: python-accelerate-numba-tutorial - annotations: - opendatahub.io/categories: 'Model optimization,Model development' -spec: - appName: anaconda-ce - type: tutorial - displayName: Accelerating scientific workloads in Python with Numba - description: |- - Watch a video about how to make your Python code run faster. - url: https://www.youtube.com/watch?v=6oXedk2tGfk - durationMinutes: 42 ---- -apiVersion: dashboard.opendatahub.io/v1 -kind: OdhDocument -metadata: - name: python-effective-pandas-tutorial - annotations: - opendatahub.io/categories: 'Model development,Data visualization,Data analysis' -spec: - appName: anaconda-ce - type: tutorial - displayName: Using Pandas for data analysis in Python - description: |- - Learn how to use pandas, a data analysis library for the Python programming language. - url: https://github.com/TomAugspurger/effective-pandas - durationMinutes: 90 ---- -apiVersion: dashboard.opendatahub.io/v1 -kind: OdhDocument -metadata: - name: python-gpu-numba-tutorial - annotations: - opendatahub.io/categories: 'Model optimization,Model development' -spec: - appName: anaconda-ce - type: tutorial - displayName: GPU Computing in Python with Numba - description: |- - Learn how to create GPU accelerated functions using Numba. - url: https://github.com/ContinuumIO/gtc2018-numba - durationMinutes: 90 ---- -apiVersion: dashboard.opendatahub.io/v1 -kind: OdhDocument -metadata: - name: python-interactive-visualization-tutorial - annotations: - opendatahub.io/categories: 'Data visualization,Model development' -spec: - appName: anaconda-ce - type: tutorial - displayName: Building interactive visualizations and dashboards in Python - description: |- - Explore a variety of data across multiple notebooks and learn how to deploy full dashboards and applications. - url: https://holoviz.org/tutorial/index.html - durationMinutes: 210 ---- -apiVersion: dashboard.opendatahub.io/v1 -kind: OdhDocument -metadata: - name: python-scalable-computing-dask-tutorial - annotations: - opendatahub.io/categories: 'Data analysis,Model optimization' -spec: - appName: anaconda-ce - displayName: Using Dask for parallel data analysis - description: |- - Analyze medium-sized datasets in parallel locally using Dask, a parallel computing library that scales the existing Python ecosystem. - url: https://tutorial.dask.org/ - type: tutorial - durationMinutes: 230 ---- -apiVersion: dashboard.opendatahub.io/v1 -kind: OdhDocument -metadata: - name: python-scikit-learn-tutorial - annotations: - opendatahub.io/categories: 'Model development,Getting started' -spec: - appName: anaconda-ce - type: how-to - displayName: Building machine learning models with scikit-learn - description: |- - Learn how to build machine learning models with scikit-learn for supervised learning, unsupervised learning, and classification problems. - url: https://scikit-learn.org/stable/getting_started.html - durationMinutes: 15 ---- -apiVersion: dashboard.opendatahub.io/v1 -kind: OdhDocument -metadata: - name: python-visualization-tutorial - annotations: - opendatahub.io/categories: 'Data visualization,Getting started' -spec: - appName: anaconda-ce - type: tutorial - displayName: Choosing Python tools for data visualization - description: |- - Use the PyViz.org website to help you decide on the best open source Python data visualization tools for you. - url: https://pyviz.org - durationMinutes: 30 diff --git a/manifests/rhoai/shared/apps/anaconda-ce/kustomization.yaml b/manifests/rhoai/shared/apps/anaconda-ce/kustomization.yaml deleted file mode 100644 index ea8f8062a9..0000000000 --- a/manifests/rhoai/shared/apps/anaconda-ce/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- anaconda-ce-app.yaml -- anaconda-ce-create-jupyter-notebook-quickstart.yaml -- anaconda-ce-docs.yaml diff --git a/manifests/rhoai/shared/apps/kustomization.yaml b/manifests/rhoai/shared/apps/kustomization.yaml index 7411e522ac..e1a7c8a1b0 100644 --- a/manifests/rhoai/shared/apps/kustomization.yaml +++ b/manifests/rhoai/shared/apps/kustomization.yaml @@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ./aikit - - ./anaconda-ce - ./elastic - ./openvino - ./pachyderm diff --git a/manifests/rhoai/shared/base/anaconda-ce-validator-cron.yaml b/manifests/rhoai/shared/base/anaconda-ce-validator-cron.yaml deleted file mode 100644 index 7386e3a00d..0000000000 --- a/manifests/rhoai/shared/base/anaconda-ce-validator-cron.yaml +++ /dev/null @@ -1,113 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - name: anaconda-ce-periodic-validator - labels: - opendatahub.io/modified: "false" -spec: - schedule: "0 0 * * *" - concurrencyPolicy: "Replace" - startingDeadlineSeconds: 200 - suspend: true - successfulJobsHistoryLimit: 3 - failedJobsHistoryLimit: 1 - jobTemplate: - spec: - template: - metadata: - labels: - parent: "anaconda-ce-periodic-validator" - spec: - serviceAccount: "rhods-dashboard" - containers: - - name: anaconda-ce-validator - image: registry.redhat.io/openshift4/ose-cli@sha256:75bf9b911b6481dcf29f7942240d1555adaa607eec7fc61bedb7f624f87c36d4 - command: - - /bin/sh - - -c - - > - #!/bin/sh - - IMAGESTREAM_NAME='s2i-minimal-notebook-anaconda' - CONFIGMAP_NAME='anaconda-ce-validation-result' - BUILDCONFIG_NAME='s2i-minimal-notebook-anaconda' - ANACONDA_VERSION='v0.2.2-anaconda' - - function generate_imagestream() { - echo '{"apiVersion":"image.openshift.io/v1","kind":"ImageStream","metadata":{"annotations":{"opendatahub.io/notebook-image-order":"10","opendatahub.io/notebook-image-desc":"Notebook with Anaconda CE tools instead of pip.","opendatahub.io/notebook-image-name":"Anaconda Commercial Edition","opendatahub.io/notebook-image-url":"https://github.com/red-hat-data-services/notebooks"},"labels":{"component.opendatahub.io/name":"jupyterhub","opendatahub.io/modified":"false","opendatahub.io/notebook-image":"true"},"name":"s2i-minimal-notebook-anaconda"},"spec":{"lookupPolicy":{"local":true},"tags":[{"name":"2023.1","annotations":{"opendatahub.io/default-image":"true","opendatahub.io/notebook-python-dependencies":"[{\"name\":\"JupyterLab\",\"version\": \"3.6\"}, {\"name\": \"Notebook\",\"version\": \"6.5\"}]","opendatahub.io/notebook-software":"[{\"name\":\"Python\",\"version\":\"v3.8\"}]","opendatahub.io/workbench-image-recommended":"true","openshift.io/imported-from":"quay.io/modh/odh-anaconda-notebook"},"from":{"kind":"DockerImage","name":"quay.io/modh/odh-anaconda-notebook@sha256:acfa4bc06bbd0b4640844c5403272d6138070f391264dba238441c5dc64de505"},"generation":2,"importPolicy":{"importMode":"Legacy"},"referencePolicy":{"type":"Local"}}]}}' - } - - function create_imagestream() { - generate_imagestream | oc apply -f- - } - - function delete_imagestream() { - generate_imagestream | oc delete -f- - } - - function get_variable() { - cat "/etc/secret-volume/${1}" - } - - function verify_configmap_exists() { - if ! oc get configmap "${CONFIGMAP_NAME}" &>/dev/null; then - echo "Result ConfigMap doesn't exist, creating" - oc create configmap "${CONFIGMAP_NAME}" --from-literal validation_result="false" - fi - } - - function write_configmap_value() { - oc patch configmap "${CONFIGMAP_NAME}" -p '"data": { "validation_result": "'${1}'" }' - } - - function write_last_valid_time() { - oc patch configmap "${CONFIGMAP_NAME}" -p '"data": { "last_valid_time": "'$(date -Is)'" }' - } - - function success() { - echo "Validation succeeded, enabling image" - create_imagestream - verify_configmap_exists - write_configmap_value true - write_last_valid_time - } - - function failure() { - echo "Validation failed, disabling image" - verify_configmap_exists - write_configmap_value false - } - - CURL_RESULT=$(curl -w 'RESP_CODE:%{response_code}' -IHEAD "https://repo.anaconda.cloud/repo/t/$(get_variable Anaconda_ce_key)/main/noarch/repodata.json" 2>/dev/null) - CURL_CODE=$(echo "${CURL_RESULT}" | grep -o 'RESP_CODE:[1-5][0-9][0-9]'| cut -d':' -f2) - - echo "Validation result: ${CURL_CODE}" - - if [ "${CURL_CODE}" == 200 ]; then - success - elif [ "${CURL_CODE}" == 403 ]; then - failure - else - echo "Return code ${CURL_CODE} from validation check, possibly upstream error. Exiting." - echo "Result from curl:" - echo "${CURL_RESULT}" - fi - - exit 0 - - volumeMounts: - - name: secret-volume - mountPath: /etc/secret-volume - readOnly: true - resources: - limits: - cpu: 100m - memory: 256Mi - requests: - cpu: 100m - memory: 256Mi - volumes: - - name: secret-volume - secret: - secretName: anaconda-ce-access - restartPolicy: Never diff --git a/manifests/rhoai/shared/base/kustomization.yaml b/manifests/rhoai/shared/base/kustomization.yaml index 73dbb3a979..1b963ad3f4 100644 --- a/manifests/rhoai/shared/base/kustomization.yaml +++ b/manifests/rhoai/shared/base/kustomization.yaml @@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../../core-bases/base - - anaconda-ce-validator-cron.yaml patchesJson6902: - path: service-account.yaml target: