From f6e409f2c663163b3d559795c34ff13785144ab4 Mon Sep 17 00:00:00 2001 From: KAROL CZARNECKI Date: Thu, 9 Apr 2026 11:34:15 +0100 Subject: [PATCH 01/11] [patch] GitOps - add rhoai support to CLI --- .../mascli/functions/gitops_deprovision_rhoai | 306 +++++++++++++ image/cli/mascli/functions/gitops_rhoai | 415 ++++++++++++++++++ image/cli/mascli/mas | 16 + .../instance/ibm-mas-rhoai-install.yaml.j2 | 40 ++ tekton/generate-tekton-tasks.yml | 3 +- .../gitops/gitops-aiservice-pipeline.yml.j2 | 99 +++++ tekton/src/tasks/gitops/gitops-rhoai.yml.j2 | 131 ++++++ 7 files changed, 1009 insertions(+), 1 deletion(-) create mode 100644 image/cli/mascli/functions/gitops_deprovision_rhoai create mode 100755 image/cli/mascli/functions/gitops_rhoai create mode 100644 image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 create mode 100644 tekton/src/tasks/gitops/gitops-rhoai.yml.j2 diff --git a/image/cli/mascli/functions/gitops_deprovision_rhoai b/image/cli/mascli/functions/gitops_deprovision_rhoai new file mode 100644 index 00000000000..dc75d727ee4 --- /dev/null +++ b/image/cli/mascli/functions/gitops_deprovision_rhoai @@ -0,0 +1,306 @@ +#!/usr/bin/env bash + +function gitops_deprovision_rhoai_help() { + [[ -n "$1" ]] && echo_warning "$1" + reset_colors + cat << EOM + + +Usage: + mas gitops_deprovision_rhoai [options] +Where ${COLOR_YELLOW}specified${TEXT_RESET} each option may also be defined by setting the appropriate environment variable. +When no options are specified on the command line, interactive-mode will be enabled by default. + +GitOps Configuration: + -d, --dir ${COLOR_YELLOW}GITOPS_WORKING_DIR${TEXT_RESET} Directory for GitOps repository + -a, --account-id ${COLOR_YELLOW}ACCOUNT_ID${TEXT_RESET} Account name that the cluster belongs to + -c, --cluster-id ${COLOR_YELLOW}CLUSTER_ID${TEXT_RESET} Cluster ID + + -i, --aiservice-instance-id ${COLOR_YELLOW}AISERVICE_INSTANCE_ID${TEXT_RESET} AI Service instance ID + --sm-aws-secret-region ${TEXT_RESET}SM_AWS_REGION${TEXT_RESET} AWS Region + --sm-aws-access-key ${TEXT_RESET}SM_AWS_ACCESS_KEY${TEXT_RESET} AWS Access key ID + --sm-aws-secret-key ${TEXT_RESET}SM_AWS_SECRET_ACCESS_KEY${TEXT_RESET} AWS Secreat Access key ID + + +Secrets Manager: + --secrets-path ${COLOR_YELLOW}SECRETS_PATH${TEXT_RESET} Secrets Manager path + --secrets-key-seperator ${COLOR_YELLOW}SECRETS_KEY_SEPERATOR${TEXT_RESET} Secrets Manager key seperator string + +Target Cluster (Optional): + --cluster-url ${COLOR_YELLOW}CLUSTER_URL${TEXT_RESET} Set to target a remote Kubernetes cluster (defaults to 'https://kubernetes.default.svc') + + +Automatic GitHub Push (Optional): + -P, --github-push ${COLOR_YELLOW}GITHUB_PUSH${TEXT_RESET} Enable automatic push to GitHub + -H, --github-host ${COLOR_YELLOW}GITHUB_HOST${TEXT_RESET} GitHub Hostname for your GitOps repository + -O, --github-org ${COLOR_YELLOW}GITHUB_ORG${TEXT_RESET} Github org for your GitOps repository + -R, --github-repo ${COLOR_YELLOW}GITHUB_REPO${TEXT_RESET} Github repo for your GitOps repository + -S, --github-ssh ${COLOR_YELLOW}GIT_SSH${TEXT_RESET} Git ssh key path + -B, --git-branch ${COLOR_YELLOW}GIT_BRANCH${TEXT_RESET} Git branch to commit to of your GitOps repository + -M, --git-commit-msg ${COLOR_YELLOW}GIT_COMMIT_MSG${TEXT_RESET} Git commit message to use when committing to of your GitOps repository + +Other Commands: + -h, --help Show this help message +EOM + [[ -n "$1" ]] && exit 1 || exit 0 +} + +function gitops_deprovision_rhoai_noninteractive() { + GITOPS_WORKING_DIR=$PWD/working-dir + SECRETS_KEY_SEPERATOR="/" + GIT_COMMIT_MSG="gitops-deprovision-rhoai commit" + export REGION_ID=${REGION_ID:-${SM_AWS_REGION}} + export CLUSTER_URL=${CLUSTER_URL:-"https://kubernetes.default.svc"} + + while [[ $# -gt 0 ]] + do + key="$1" + shift + case $key in + # GitOps Configuration + -d|--dir) + export GITOPS_WORKING_DIR=$1 && shift + ;; + -a|--account-id) + export ACCOUNT_ID=$1 && shift + ;; + -c|--cluster-id) + export CLUSTER_ID=$1 && shift + ;; + + # Target Cluster (Optional) + --cluster-url) + export CLUSTER_URL=$1 && shift + ;; + --secrets-key-seperator) + export SECRETS_KEY_SEPERATOR=$1 && shift + ;; + # AWS Secrets Manager Configuration + --sm-aws-secret-region) + export SM_AWS_REGION=$1 + export REGION_ID=$1 + shift + ;; + --sm-aws-access-key) + export SM_AWS_ACCESS_KEY_ID=$1 && shift + ;; + --sm-aws-secret-key) + export SM_AWS_SECRET_ACCESS_KEY=$1 && shift + ;; + --secrets-path) + export SECRETS_PATH=$1 && shift + ;; + --aiservice-instance-id) + export AISERVICE_INSTANCE_ID=$1 && shift + ;; + # Automatic GitHub Push + -P|--github-push) + export GITHUB_PUSH=true + ;; + -H|--github-host) + export GITHUB_HOST=$1 && shift + ;; + -O|--github-org) + export GITHUB_ORG=$1 && shift + ;; + -R|--github-repo) + export GITHUB_REPO=$1 && shift + ;; + -S|--github-ssh) + export GIT_SSH=$1 && shift + ;; + -B|--git-branch) + export GIT_BRANCH=$1 && shift + ;; + -M|--git-commit-msg) + export GIT_COMMIT_MSG=$1 && shift + ;; + + # Other Commands + -h|--help) + gitops_deprovision_rhoai_help + ;; + *) + # unknown option + echo -e "${COLOR_RED}Usage Error: Unsupported option \"${key}\"${COLOR_RESET}\n" + gitops_deprovision_rhoai_help "Usage Error: Unsupported option \"${key}\" " + exit 1 + ;; + esac + done + + + [[ -z "$GITOPS_WORKING_DIR" ]] && gitops_deprovision_rhoai_help "GITOPS_WORKING_DIR is not set" + [[ -z "$ACCOUNT_ID" ]] && gitops_deprovision_rhoai_help "ACCOUNT_ID is not set" + [[ -z "$CLUSTER_ID" ]] && gitops_deprovision_rhoai_help "CLUSTER_ID is not set" + [[ -z "$REGION_ID" && -z "$SM_AWS_REGION" ]] && gitops_deprovision_rhoai_help "REGION_ID or SM_AWS_REGION is not set" + [[ -z "$CLUSTER_URL" ]] && gitops_deprovision_rhoai_help "CLUSTER_URL is not set" + + + if [[ "$GITHUB_PUSH" == "true" ]]; then + [[ -z "$GITHUB_HOST" ]] && gitops_deprovision_rhoai_help "GITHUB_HOST is not set" + [[ -z "$GITHUB_ORG" ]] && gitops_deprovision_rhoai_help "GITHUB_ORG is not set" + [[ -z "$GITHUB_REPO" ]] && gitops_deprovision_rhoai_help "GITHUB_REPO is not set" + [[ -z "$GIT_BRANCH" ]] && gitops_deprovision_rhoai_help "GIT_BRANCH is not set" + fi + + [[ -z "$AISERVICE_INSTANCE_ID" ]] && gitops_deprovision_rhoai_help "AISERVICE_INSTANCE_ID is not set. Please specify the AI Service instance ID using --aiservice_instance_id." +} + +function gitops_deprovision_rhoai() { + # Take the first parameter off (it will be create-gitops) + shift + if [[ $# -gt 0 ]]; then + gitops_deprovision_rhoai_noninteractive "$@" + else + echo "Not supported yet" + exit 1 + gitops_deprovision_rhoai_interactive + fi + + # catch errors + set -o pipefail + trap 'echo "[ERROR] Error occurred at $BASH_SOURCE, line $LINENO, exited with $?"; exit 1' ERR + + mkdir -p ${GITOPS_WORKING_DIR} + GITOPS_CLUSTER_DIR=${GITOPS_WORKING_DIR}/${GITHUB_REPO}/${ACCOUNT_ID}/${CLUSTER_ID}/${AISERVICE_INSTANCE_ID} + + + + echo + reset_colors + echo_h2 "Review Settings" + + echo "${TEXT_DIM}" + echo_h2 "Target" + echo_reset_dim "Account ID ..................... ${COLOR_MAGENTA}${ACCOUNT_ID}" + echo_reset_dim "Region ID ...................... ${COLOR_MAGENTA}${REGION_ID}" + echo_reset_dim "Cluster ID ..................... ${COLOR_MAGENTA}${CLUSTER_ID}" + echo_reset_dim "Cluster URL .................... ${COLOR_MAGENTA}${CLUSTER_URL}" + + echo_reset_dim "Cluster Config Directory ....... ${COLOR_MAGENTA}${GITOPS_CLUSTER_DIR}" + reset_colors + + echo "${TEXT_DIM}" + echo_h2 "AWS Secrets Manager" " " + echo_reset_dim "Region ......................... ${COLOR_MAGENTA}${SM_AWS_REGION}" + echo_reset_dim "Secret Key ..................... ${COLOR_MAGENTA}${SM_AWS_ACCESS_KEY_ID:0:4}" + echo_reset_dim "Access Key ..................... ${COLOR_MAGENTA}${SM_AWS_SECRET_ACCESS_KEY:0:4}" + echo_reset_dim "Secrets Path ................... ${COLOR_MAGENTA}${SECRETS_PATH}" + reset_colors + + echo "${TEXT_DIM}" + if [[ "$GITHUB_PUSH" == "true" ]]; then + echo_h2 "GitOps Target" " " + echo_reset_dim "Automatic Push ........................ ${COLOR_GREEN}Enabled" + echo_reset_dim "Working Directory ..................... ${COLOR_MAGENTA}${GITOPS_WORKING_DIR}" + echo_reset_dim "Host .................................. ${COLOR_MAGENTA}${GITHUB_HOST}" + echo_reset_dim "Organization .......................... ${COLOR_MAGENTA}${GITHUB_ORG}" + echo_reset_dim "Repository ............................ ${COLOR_MAGENTA}${GITHUB_REPO}" + echo_reset_dim "Branch ................................ ${COLOR_MAGENTA}${GIT_BRANCH}" + else + echo_h2 "GitOps Target" " " + echo_reset_dim "Automatic Push ........................ ${COLOR_RED}Disabled" + echo_reset_dim "Working Directory ..................... ${COLOR_MAGENTA}${GITOPS_WORKING_DIR}" + fi + reset_colors + + # echo all the variables of gitops envs + echo_reset_dim "AI Service Instance ID ................. ${COLOR_MAGENTA}${AISERVICE_INSTANCE_ID}" + + #secrets path in aws + + export SECRET_NAME_STORAGE_AUTH=${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}s3 + export SECRET_KEY_IMAGE_PULL_SECRET_B64=${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}ibm_entitlement + + + echo -e "login aws" + + AVP_TYPE=aws + sm_login + + + export OCP_SECRET_NAME=${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}ocp_login + export OAUTH_ADMIN_USERNAME=$(sm_get_secret_value "$OCP_SECRET_NAME" "OAUTH_ADMIN_USERNAME") + export OAUTH_ADMIN_PWD=$(sm_get_secret_value "$OCP_SECRET_NAME" "OAUTH_ADMIN_PWD") + export OCP_DISABLE_TLS_VERIFY=$(sm_get_secret_value "$OCP_SECRET_NAME" "OCP_DISABLE_TLS_VERIFY") + echo "TLS verification is : $OCP_DISABLE_TLS_VERIFY" + + + echo "${TEXT_DIM}" + echo_h2 "Deleting rhoai related secrets" + + deleting secreats from aws + echo -e "Deleting secreat $SECRET_NAME_STORAGE_AUTH" + sm_delete_secret $SECRET_NAME_STORAGE_AUTH + echo -e "Deleting image pull secreat $SECRET_KEY_IMAGE_PULL_SECRET_B64" + sm_delete_secret $SECRET_KEY_IMAGE_PULL_SECRET_B64 + + + if [ -z $GIT_SSH ]; then + export GIT_SSH="false" + fi + + #Clone github target repo + # --------------------------------------------------------------------------- + if [ "$GITHUB_PUSH" == "true" ]; then + echo + echo_h2 "Cloning GitHub repo $GITHUB_ORG $GITHUB_REPO" + clone_target_git_repo $GITHUB_HOST $GITHUB_ORG $GITHUB_REPO $GIT_BRANCH $GITOPS_WORKING_DIR $GIT_SSH + fi + + + echo "Deleting: ${GITOPS_CLUSTER_DIR}/ibm-mas-rhoai-install.yaml" + rm -rf ${GITOPS_CLUSTER_DIR}/ibm-mas-rhoai-install.yaml + + if [ "$GITHUB_PUSH" == "true" ]; then + echo + echo_h2 "Commit and push changes to GitHub repo $GITHUB_ORG $GITHUB_REPO" + save_to_target_git_repo $GITHUB_HOST $GITHUB_ORG $GITHUB_REPO $GIT_BRANCH "${GITOPS_WORKING_DIR}/${GITHUB_REPO}" "${GIT_COMMIT_MSG}" + cd /tmp || { echo "Failed to cd to /tmp"; exit 1; } + remove_git_repo_clone $GITOPS_WORKING_DIR/$GITHUB_REPO + + echo "Sleeping for 15 minutes to allow ArgoCD to sync and apply changes..." + sleep 900 + fi + + + echo "PWD before login: $(pwd)" + oc login $CLUSTER_URL -u $OAUTH_ADMIN_USERNAME -p $OAUTH_ADMIN_PWD --insecure-skip-tls-verify=$OCP_DISABLE_TLS_VERIFY + + echo "Successfully logged in to OpenShift." + + namespace="openshift-operators" + subs_to_check=("authorino-operator" "servicemeshoperator") + + echo "Checking for Subscriptions in namespace '$namespace'..." + + subscriptions_exist=false + + # Initial check + for sub in "${subs_to_check[@]}"; do + if oc get subscription "$sub" -n "$namespace" &>/dev/null; then + echo "Subscription '$sub' is still present." + subscriptions_exist=true + else + echo "Subscription '$sub' is not present." + fi + done + + # If any subscription is present, wait 5 minutes + if [ "$subscriptions_exist" = true ]; then + echo "subscription is present. Waiting 5 minutes before proceeding..." + sleep 300 # 5 minutes + fi + + + if [ "$subscriptions_exist" = false ]; then + echo "All subscriptions deleted. Proceeding to delete CSVs..." + oc delete $(oc get csv -n "$namespace" -o name | grep -E 'authorino-operator|servicemeshoperator') -n "$namespace" --wait=true --timeout=5m 2>/dev/null + echo "CSV cleanup completed." + else + echo "Subscriptions still present after waiting. Skipping CSV deletion." + fi + + + } diff --git a/image/cli/mascli/functions/gitops_rhoai b/image/cli/mascli/functions/gitops_rhoai new file mode 100755 index 00000000000..831af07afc6 --- /dev/null +++ b/image/cli/mascli/functions/gitops_rhoai @@ -0,0 +1,415 @@ +#!/usr/bin/env bash + +function gitops_rhoai_help() { + [[ -n "$1" ]] && echo_warning "$1" + reset_colors + cat << EOM +Usage: + mas gitops_rhoai [options] + +Where ${COLOR_YELLOW}specified${TEXT_RESET} each option may also be defined by setting the appropriate environment variable. +When no options are specified on the command line, interactive-mode will be enabled by default. + +GitOps Configuration: + -d, --dir ${COLOR_YELLOW}GITOPS_WORKING_DIR${TEXT_RESET} Directory for GitOps repository + -a, --account-id ${COLOR_YELLOW}ACCOUNT_ID${TEXT_RESET} Account name that the cluster belongs to + -r, --region-id ${COLOR_YELLOW}CLUSTER_ID${TEXT_RESET} Region ID + -c, --cluster-id ${COLOR_YELLOW}CLUSTER_ID${TEXT_RESET} Cluster ID + -m, --aiservice-instance-id ${COLOR_YELLOW}AISERVICE_INSTANCE_ID${TEXT_RESET} AI Service Instance ID + +Secrets Manager: + --secrets-path ${COLOR_YELLOW}SECRETS_PATH${TEXT_RESET} Secrets Manager path + --secrets-key-seperator ${COLOR_YELLOW}SECRETS_KEY_SEPERATOR${TEXT_RESET} Secrets Manager key seperator string + +ibm aiservice(required): + --aiservice-namespace ${TEXT_RESET}AISERVICE_NAMESPACE${TEXT_RESET} + --aiservice-instance-id ${TEXT_RESET}AISERVICE_INSTANCE_ID${TEXT_RESET} + +RHOAI Configuration: + --rhoai-channel + --rhoai-catalog-source + --rhoai-operator-version + --rhoai-namespace + --pull-secret-name + --openshiftai-name + --openshiftai-operator-group + --rhoai-install-plan + --openshiftai-channel + --openshiftai-source + --openshiftai-source-namespace + --aiservice-rhoai-model-deployment-type +Pipeline Configuration: + --rhoai-pipeline-name + --rhoai-pipeline-namespace + --rhoai-pipeline-operator-name + --rhoai-pipeline-source + --rhoai-pipeline-source-namespace + --rhoai-pipeline-channel + --rhoai-pipeline-installplan + --pipeline-catalog-source + +Service Mesh: + --service-mesh-namespace + --service-mesh-channel + --service-mesh-catalog-source + --service-mesh-source-namespace + +Serverless: + --serverless-namespace + --serverless-channel + --serverless-operator-name + --serverless-operator-source + --serverless-operator-source-namespace + +Authorino: + --authorino-catalog-source + +Storage: + --storage-provider + --storage-accesskey + --storage-secretkey + --storage-host + --storage-port + --storage-ssl + --storage-region + --pipelines-bucket + --primary-storage-class + +Database: + --db-host + --db-port + --db-user + --db-database + --db-secret-name + --db-secret-value + +Automatic GitHub Push: + -P, --github-push ${COLOR_YELLOW}GITHUB_PUSH${TEXT_RESET} Enable automatic push to GitHub + -H, --github-host ${COLOR_YELLOW}GITHUB_HOST${TEXT_RESET} GitHub Hostname for your GitOps repository + -O, --github-org ${COLOR_YELLOW}GITHUB_ORG${TEXT_RESET} Github org for your GitOps repository + -R, --github-repo ${COLOR_YELLOW}GITHUB_REPO${TEXT_RESET} Github repo for your GitOps repository + -B, --git-branch ${COLOR_YELLOW}GIT_BRANCH${TEXT_RESET} Git branch to commit to of your GitOps repository + -M, --git-commit-msg ${COLOR_YELLOW}GIT_COMMIT_MSG${TEXT_RESET} Git commit message to use when committing to of your GitOps repository + -S , --github-ssh ${COLOR_YELLOW}GIT_SSH${TEXT_RESET} Git ssh key path + +Other Commands: + -h, --help Show this help message +EOM + [[ -n "$1" ]] && exit 1 || exit 0 +} + + +function gitops_rhoai_noninteractive() { + GITOPS_WORKING_DIR=$PWD/working-dir + SECRETS_KEY_SEPERATOR="/" + GIT_COMMIT_MSG="gitops-rhoai commit" + + + + export OPENSHIFT_NAMESPACE="${OPENSHIFT_NAMESPACE:-"openshift-operators"}" + export RHOAI_PIPELINE_CHANNEL="${RHOAI_PIPELINE_CHANNEL:-"latest"}" + export RHOAI_PIPELINE_INSTALLPLAN="${RHOAI_PIPELINE_INSTALLPLAN:-"manual"}" + export PIPELINE_CATALOG_SOURCE="${PIPELINE_CATALOG_SOURCE:-"redhat-operators"}" + export SERVICE_MESH_NAMESPACE="${SERVICE_MESH_NAMESPACE:-"openshift-operators"}" + export SERVICE_MESH_CHANNEL="${SERVICE_MESH_CHANNEL:-"stable"}" + export SERVICE_MESH_CATALOG_SOURCE="${SERVICE_MESH_CATALOG_SOURCE:-"redhat-operators"}" + export SERVICE_MESH_SOURCENAMESPACE="${SERVICE_MESH_SOURCENAMESPACE:-"openshift-marketplace"}" + export OPERATOR_NAME="${OPERATOR_NAME:-"openshift-pipelines-operator-rh"}" + export SERVERLESS_CHANNEL="${SERVERLESS_CHANNEL:-"stable"}" + export AUTHORINO_CATALOG_SOURCE="${AUTHORINO_CATALOG_SOURCE:-"community-operators"}" + export RHOAI_CHANNEL="${RHOAI_CHANNEL:-"stable"}" + export RHOAI_CATALOG_SOURCE="${RHOAI_CATALOG_SOURCE:-"redhat-operators"}" + export RHOAI_OPERATOR_VERSION="${RHOAI_OPERATOR_VERSION:-"rhods-operator.2.25.3"}" + export RHOAI_NAMESPACE="${RHOAI_NAMESPACE:-"redhat-ods-operator"}" + + export AISERVICE_NAMESPACE="${AISERVICE_NAMESPACE:-"${AISERVICE_INSTANCE_ID}-aiservice"}" + + export SERVERLESS_NAMESPACE="${SERVERLESS_NAMESPACE:-"openshift-serverless"}" + export SERVERLESS_OPERATOR_NAME="${SERVERLESS_OPERATOR_NAME:-"serverless-operator"}" + export SERVERLESS_OPERATOR_SOURCE="${SERVERLESS_OPERATOR_SOURCE:-"redhat-operators"}" + export SERVERLESS_OPERATOR_SOURCE_NAMESPACE="${SERVERLESS_OPERATOR_SOURCE_NAMESPACE:-"openshift-marketplace"}" + + export OPENSHIFTAI_OPERATORGROUP_NAME="${OPENSHIFTAI_OPERATORGROUP_NAME:-"operatorgroup"}" + export OPENSHIFTAI_NAME="${OPENSHIFTAI_NAME:-"rhods-operator"}" + export OPENSHIFTAI_NAMESPACE="${OPENSHIFTAI_NAMESPACE:-"redhat-ods-operator"}" + export RHOAI_INSTALL_PLAN="${RHOAI_INSTALL_PLAN:-"Automatic"}" + export OPENSHIFTAI_CHANNEL="${OPENSHIFTAI_CHANNEL:-"stable"}" + export OPENSHIFTAI_SOURCE="${OPENSHIFTAI_SOURCE:-"redhat-operators"}" + export OPENSHIFTAI_SOURCE_NAMESPACE="${OPENSHIFTAI_SOURCE_NAMESPACE:-"openshift-marketplace"}" + export AISERVICE_STORAGE_PROVIDER="${AISERVICE_STORAGE_PROVIDER:-"aws"}" + export AISERVICE_STORAGE_SSL="${AISERVICE_STORAGE_SSL:-"true"}" + export AISERVICE_STORAGE_REGION="${AISERVICE_STORAGE_REGION:-""}" + export PRIMARY_STORAGE_CLASS="${PRIMARY_STORAGE_CLASS:-"nfs-client"}" + export AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE="${AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE:-"serverless"}" + + + while [[ $# -gt 0 ]]; do + key="$1"; shift + case $key in + -d|--dir) export GITOPS_WORKING_DIR="$1"; shift ;; + -a|--account-id) export ACCOUNT_ID="$1"; shift ;; + -c|--cluster-id) export CLUSTER_ID="$1"; shift ;; + -m|--aiservice-instance-id) export AISERVICE_INSTANCE_ID="$1"; shift ;; + + # AWS Secrets Manager Configuration + --sm-aws-secret-region) + export SM_AWS_REGION=$1 + export REGION_ID=$1 + shift + ;; + --sm-aws-access-key) + export SM_AWS_ACCESS_KEY_ID=$1 && shift + ;; + --sm-aws-secret-key) + export SM_AWS_SECRET_ACCESS_KEY=$1 && shift + ;; + --secrets-path) + export SECRETS_PATH=$1 && shift + ;; + + # Automatic GitHub Push + -P|--github-push) + export GITHUB_PUSH=true + ;; + -H|--github-host) + export GITHUB_HOST=$1 && shift + ;; + -O|--github-org) + export GITHUB_ORG=$1 && shift + ;; + -R|--github-repo) + export GITHUB_REPO=$1 && shift + ;; + -S|--github-ssh) + export GIT_SSH=$1 && shift + ;; + -B|--git-branch) + export GIT_BRANCH=$1 && shift + ;; + -M|--git-commit-msg) + export GIT_COMMIT_MSG=$1 && shift + ;; + + + --rhoai-channel) + export RHOAI_CHANNEL=$1 && shift + ;; + --rhoai-catalog-source) + export RHOAI_CATALOG_SOURCE=$1 && shift + ;; + --rhoai-operator-version) + export RHOAI_OPERATOR_VERSION=$1 && shift + ;; + --rhoai-namespace) + export RHOAI_NAMESPACE=$1 && shift + ;; + --openshift-namespace) + export OPENSHIFT_NAMESPACE=$1 && shift + ;; + --pull-secret-name) + export PULL_SECRET_NAME=$1 && shift + ;; + + --openshiftai-name) + export OPENSHIFTAI_NAME=$1 && shift + ;; + --openshiftai-operator-group) + export OPENSHIFTAI_OPERATORGROUP_NAME=$1 && shift + ;; + --rhoai-install-plan) + export RHOAI_INSTALL_PLAN=$1 && shift + ;; + --openshiftai-channel) + export OPENSHIFTAI_CHANNEL=$1 && shift + ;; + --openshiftai-source) + export OPENSHIFTAI_SOURCE=$1 && shift + ;; + --openshiftai-namespace) + export OPENSHIFTAI_NAMESPACE=$1 && shift + ;; + --openshiftai-source-namespace) + export OPENSHIFTAI_SOURCE_NAMESPACE=$1 && shift + ;; + --rhoai-pipeline-channel) + export RHOAI_PIPELINE_CHANNEL=$1 && shift + ;; + --rhoai-pipeline-installplan) + export RHOAI_PIPELINE_INSTALLPLAN=$1 && shift + ;; + --pipeline-catalog-source) + export PIPELINE_CATALOG_SOURCE=$1 && shift + ;; + + --service-mesh-namespace) + export SERVICE_MESH_NAMESPACE=$1 && shift + ;; + --service-mesh-channel) + export SERVICE_MESH_CHANNEL=$1 && shift + ;; + --service-mesh-catalog-source) + export SERVICE_MESH_CATALOG_SOURCE=$1 && shift + ;; + --service-mesh-source-namespace) + export SERVICE_MESH_SOURCE_NAMESPACE=$1 && shift + ;; + + --serverless-namespace) + export SERVERLESS_NAMESPACE=$1 && shift + ;; + --serverless-channel) + export SERVERLESS_CHANNEL=$1 && shift + ;; + --serverless-operator-name) + export SERVERLESS_OPERATOR_NAME=$1 && shift + ;; + --serverless-operator-source) + export SERVERLESS_OPERATOR_SOURCE=$1 && shift + ;; + --serverless-operator-source-namespace) + export SERVERLESS_OPERATOR_SOURCE_NAMESPACE=$1 && shift + ;; + + --authorino-catalog-source) + export AUTHORINO_CATALOG_SOURCE=$1 && shift + ;; + + --aiservice-namespace) + export AISERVICE_NAMESPACE=$1 && shift + ;; + + --storage-provider) + export AISERVICE_STORAGE_PROVIDER=$1 && shift + ;; + --storage-ssl) + export AISERVICE_STORAGE_SSL=$1 && shift + ;; + --storage-region) + export AISERVICE_STORAGE_REGION=$1 && shift + ;; + --aiservice-rhoai-model-deployment-type) + export AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE=$1 && shift + ;; + --primary-storage-class) + export PRIMARY_STORAGE_CLASS=$1 && shift + ;; + + --operator-name) + export OPERATOR_NAME=$1 && shift + ;; + + # GitHub + -P|--github-push) export GITHUB_PUSH=true ;; + -H|--github-host) export GITHUB_HOST="$1"; shift ;; + -O|--github-org) export GITHUB_ORG="$1"; shift ;; + -R|--github-repo) export GITHUB_REPO="$1"; shift ;; + -B|--git-branch) export GIT_BRANCH="$1"; shift ;; + -M|--git-commit-msg) export GIT_COMMIT_MSG="$1"; shift ;; + -S|--github-ssh) export GIT_SSH="$1"; shift ;; + + -h|--help) gitops_rhoai_help ;; + *) gitops_rhoai_help "Unknown option $key" ;; + esac + done + + [[ -z "$GITOPS_WORKING_DIR" ]] && gitops_rhoai_help "Missing GITOPS_WORKING_DIR" + [[ -z "$ACCOUNT_ID" ]] && gitops_rhoai_help "Missing ACCOUNT_ID" + [[ -z "$CLUSTER_ID" ]] && gitops_rhoai_help "Missing CLUSTER_ID" + [[ -z "$AISERVICE_INSTANCE_ID" ]] && gitops_rhoai_help "Missing AISERVICE_INSTANCE_ID" + [[ -z "$OPENSHIFTAI_SOURCE" ]] && gitops_rhoai_help "Missing OPENSHIFTAI_SOURCE" + [[ -z "$AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE" ]] && gitops_rhoai_help "Missing AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE" + + if [[ "$GITHUB_PUSH" == "true" ]]; then + [[ -z "$GITHUB_HOST" ]] && gitops_rhoai_help "GITHUB_HOST is not set" + [[ -z "$GITHUB_ORG" ]] && gitops_rhoai_help "GITHUB_ORG is not set" + [[ -z "$GITHUB_REPO" ]] && gitops_rhoai_help "GITHUB_REPO is not set" + [[ -z "$GIT_BRANCH" ]] && gitops_rhoai_help "GIT_BRANCH is not set" + fi + +} + +function gitops_rhoai() { + # Remove the subcommand (e.g., "create-gitops") + shift + if [[ $# -gt 0 ]]; then + gitops_rhoai_noninteractive "$@" + else + echo "Interactive mode not implemented." + exit 1 + fi + + # Error trap + set -o pipefail + trap 'echo "[ERROR] Error occurred at $BASH_SOURCE, line $LINENO, exited with $?"; exit 1' ERR + + # Prepare directories + rm -rf "$GITOPS_WORKING_DIR" + mkdir -p "${GITOPS_WORKING_DIR}" + GITOPS_CLUSTER_DIR=${GITOPS_WORKING_DIR}/${GITHUB_REPO}/${ACCOUNT_ID}/${CLUSTER_ID}/${AISERVICE_INSTANCE_ID} + + + echo + echo_h2 "Review Settings" + echo "${TEXT_DIM}" + echo_h2 "Target" + echo_reset_dim "Account ID ............................ ${COLOR_MAGENTA}${ACCOUNT_ID}" + echo_reset_dim "Cluster ID ............................ ${COLOR_MAGENTA}${CLUSTER_ID}" + echo_reset_dim "AI Service Instance ID ................ ${COLOR_MAGENTA}${AISERVICE_INSTANCE_ID}" + echo_reset_dim "OpenDataHub Source ................... ${COLOR_MAGENTA}${OPENSHIFTAI_SOURCE}" + echo_reset_dim "AiService Model Deployment Type ...... ${COLOR_MAGENTA}${AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE}" + echo_reset_dim "Secrets Path .......................... ${COLOR_MAGENTA}${SECRETS_PATH}" + reset_colors + + CURRENT_DIR=$PWD + + AVP_TYPE=aws + sm_login + + # Set up secret key and fetch secret + export SECRET_ACCOUNT_PATH="${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}" + export RHOAI_SECRET="${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}storage" + export SECRET_KEY_IMAGE_PULL_SECRET_B64="${SECRET_ACCOUNT_PATH}ibm_entitlement#image_pull_secret_b64" + + if [ -z $GIT_SSH ]; then + export GIT_SSH=false + fi + + sm_verify_secret_exists ${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}ibm_entitlement "image_pull_secret_b64" + + echo_h2 "RHOAI Secret Summary" + echo_reset_dim "AI Service Namespace ................... ${COLOR_MAGENTA}${AISERVICE_NAMESPACE}" + echo_reset_dim "STORAGE_HOST ............................. ${COLOR_MAGENTA}${STORAGE_HOST}" + echo_reset_dim "STORAGE_BUCKET ........................... ${COLOR_MAGENTA}${STORAGE_BUCKET}" + + echo_reset_dim "AISERVICE_STORAGE_SSL ................. ${COLOR_MAGENTA}${AISERVICE_STORAGE_SSL}" + reset_colors + + + # Clone github target repo + # --------------------------------------------------------------------------- + if [ "$GITHUB_PUSH" == "true" ]; then + echo "GITOPS_WORKING_DIR ${GITOPS_WORKING_DIR}" + echo "GITOPS_CLUSTER_DIR ${GITOPS_CLUSTER_DIR}" + echo_h2 "Cloning GitHub repo $GITHUB_ORG $GITHUB_REPO" + clone_target_git_repo $GITHUB_HOST $GITHUB_ORG $GITHUB_REPO $GIT_BRANCH $GITOPS_WORKING_DIR $GIT_SSH + fi + + mkdir -p ${GITOPS_CLUSTER_DIR} + # Render YAML + echo_h2 "Generating OpenDataHub GitOps YAML" + echo "${GITOPS_CLUSTER_DIR}" + echo "Output: ${GITOPS_CLUSTER_DIR}/ibm-mas-rhoai-install.yaml" + + jinjanate_commmon $CLI_DIR/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 ${GITOPS_CLUSTER_DIR}/ibm-mas-rhoai-install.yaml + TAGS="[{\"Key\": \"source\", \"Value\": \"gitops_rhoai\"}, {\"Key\": \"account\", \"Value\": \"${ACCOUNT_ID}\"}, {\"Key\": \"cluster\", \"Value\": \"${CLUSTER_ID}\"}]" + + # GitHub push + if [[ "$GITHUB_PUSH" == "true" ]]; then + echo_h2 "Pushing changes to GitHub" + echo "Github push" "$GITHUB_HOST" "$GITHUB_ORG" "$GITHUB_REPO" "$GIT_BRANCH" "Working: " "${GITOPS_WORKING_DIR}/${GITHUB_REPO}" " Commit :" "$GIT_COMMIT_MSG" + save_to_target_git_repo "$GITHUB_HOST" "$GITHUB_ORG" "$GITHUB_REPO" "$GIT_BRANCH" "${GITOPS_WORKING_DIR}/${GITHUB_REPO}" "$GIT_COMMIT_MSG" + remove_git_repo_clone "${GITOPS_WORKING_DIR}/${GITHUB_REPO}" + fi + + echo_h2 "RHOAI GitOps completed." +} diff --git a/image/cli/mascli/mas b/image/cli/mascli/mas index a8d60e9aaaa..d63e1b1470c 100755 --- a/image/cli/mascli/mas +++ b/image/cli/mascli/mas @@ -99,6 +99,8 @@ mkdir -p $CONFIG_DIR . $CLI_DIR/functions/gitops_deprovision_db2u . $CLI_DIR/functions/gitops_deprovision_odh . $CLI_DIR/functions/gitops_odh +. $CLI_DIR/functions/gitops_deprovision_rhoai +. $CLI_DIR/functions/gitops_rhoai . $CLI_DIR/functions/gitops_aiservice . $CLI_DIR/functions/gitops_aiservice_tenant . $CLI_DIR/functions/gitops_deprovision_aiservice_tenant @@ -610,6 +612,13 @@ case $1 in reset_colors gitops_odh "$@" ;; + gitops-rhoai) + echo "${TEXT_UNDERLINE}IBM Maximo Application Suite GitOps Manager (v${VERSION})${TEXT_RESET}" + echo "Powered by ${COLOR_CYAN}${TEXT_UNDERLINE}https://github.com/ibm-mas/gitops/${TEXT_RESET}" + echo + reset_colors + gitops_rhoai "$@" + ;; gitops-db2u-database) echo "${TEXT_UNDERLINE}IBM Maximo Application Suite GitOps Manager (v${VERSION})${TEXT_RESET}" echo "Powered by ${COLOR_CYAN}${TEXT_UNDERLINE}https://github.com/ibm-mas/gitops/${TEXT_RESET}" @@ -679,6 +688,13 @@ case $1 in reset_colors gitops_deprovision_odh "$@" ;; + gitops-deprovision-rhoai) + echo "${TEXT_UNDERLINE}IBM Maximo Application Suite GitOps Manager (v${VERSION})${TEXT_RESET}" + echo "Powered by ${COLOR_CYAN}${TEXT_UNDERLINE}https://github.com/ibm-mas/gitops/${TEXT_RESET}" + echo + reset_colors + gitops_deprovision_rhoai "$@" + ;; gitops-aiservice) echo "${TEXT_UNDERLINE}IBM Maximo Application Suite AIService Manager (v${VERSION})${TEXT_RESET}" diff --git a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 new file mode 100644 index 00000000000..dca5032730e --- /dev/null +++ b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 @@ -0,0 +1,40 @@ +--- +merge-key: "{{ ACCOUNT_ID }}/{{ CLUSTER_ID }}/{{ AISERVICE_INSTANCE_ID }}" + +ibm_rhoai: + openshift_namespace: {{ OPENSHIFT_NAMESPACE }} + rhoai_pipeline_channel: {{ RHOAI_PIPELINE_CHANNEL }} + rhoai_pipeline_installplan: {{ RHOAI_PIPELINE_INSTALLPLAN }} + pipeline_catalog_source: {{ PIPELINE_CATALOG_SOURCE }} + service_mesh_namespace: {{ SERVICE_MESH_NAMESPACE }} + service_mesh_channel: {{ SERVICE_MESH_CHANNEL }} + service_mesh_catalog_source: {{ SERVICE_MESH_CATALOG_SOURCE }} + service_mesh_sourceNamespace: {{ SERVICE_MESH_SOURCENAMESPACE }} + operatorName: {{ OPERATOR_NAME }} + serverless_channel: {{ SERVERLESS_CHANNEL }} + authorino_catalog_source: {{ AUTHORINO_CATALOG_SOURCE }} + rhoai_channel: {{ RHOAI_CHANNEL }} + rhoai_catalog_source: {{ RHOAI_CATALOG_SOURCE }} + rhoai_operator_version: {{ RHOAI_OPERATOR_VERSION }} + rhoai_namespace: {{ RHOAI_NAMESPACE }} + + aiservice_namespace: {{ AISERVICE_NAMESPACE }} + pull_secret_name: "" + + # Serverless Operator + serverless_namespace: {{ SERVERLESS_NAMESPACE }} + serverless_operator_name: {{ SERVERLESS_OPERATOR_NAME }} + serverless_operator_source: {{ SERVERLESS_OPERATOR_SOURCE }} + serverless_operator_sourceNamespace: {{ SERVERLESS_OPERATOR_SOURCE_NAMESPACE }} + + # OpenDataHub Operator + openshiftai_OperatorGroup_name: {{ OPENSHIFTAI_OPERATORGROUP_NAME }} + openshiftai_name: {{ OPENSHIFTAI_NAME }} + openshiftai_namespace: {{ OPENSHIFTAI_NAMESPACE }} + openshiftai_installPlanApproval: {{ RHOAI_INSTALL_PLAN }} + openshiftai_channel: {{ OPENSHIFTAI_CHANNEL }} + openshiftai_source: {{ OPENSHIFTAI_SOURCE }} + openshiftai_sourceNamespace: {{ OPENSHIFTAI_SOURCE_NAMESPACE }} + aiservice_rhoai_model_deployment_type: "{{ AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE }}" + primary_storage_class: {{ PRIMARY_STORAGE_CLASS }} + diff --git a/tekton/generate-tekton-tasks.yml b/tekton/generate-tekton-tasks.yml index 3518e1ce5e8..e7018ebd00c 100644 --- a/tekton/generate-tekton-tasks.yml +++ b/tekton/generate-tekton-tasks.yml @@ -261,6 +261,8 @@ - gitops-suite - gitops-odh - gitops-deprovision-odh + - gitops-rhoai + - gitops-deprovision-rhoai - gitops-aiservice - gitops-aiservice-tenant - gitops-deprovision-aiservice-tenant @@ -275,4 +277,3 @@ - gitops-iac-provision-msk - gitops-rds-db2-database - gitops-iac-provision-rdsdb2 - diff --git a/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 index 549604b8949..c9fc5a83ffa 100644 --- a/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 @@ -26,6 +26,8 @@ spec: type: string - name: github_host type: string + - name: ai_platform + type: string # aiservice-specific - name: aiservice_namespace @@ -97,6 +99,42 @@ spec: - name: aiservice_s3_secret type: string + # RHOAI-specific + - name: rhoai_channel + type: string + - name: rhoai_subscription_install_plan + type: string + - name: openshiftai_name + type: string + - name: openshiftai_operator_group + type: string + - name: openshiftai_namespace + type: string + - name: rhoai_operator_version + type: string + - name: environment_type + type: string + - name: aiservice_s3_endpoint_url + type: string + - name: aiservice_storage_region + type: string + - name: aiservice_s3_bucket_prefix + type: string + - name: openshiftai_source + type: string + - name: aiservice_odh_model_deployment_type + type: string + - name: dro_token_secret + type: string + - name: dro_cacert_secret + type: string + - name: aiservice_s3_templates_bucket + type: string + - name: aiservice_s3_tenants_bucket + type: string + - name: aiservice_s3_secret + type: string + workspaces: - name: configs @@ -105,6 +143,10 @@ spec: # 2.gitops-odh # ------------------------------------------------------------------------- - name: gitops-odh + when: + - input: "$(params.ai_platform)" + operator: in + values: ["odh"] taskRef: name: gitops-odh workspaces: @@ -154,6 +196,62 @@ spec: - name: aiservice_odh_model_deployment_type value: $(params.aiservice_odh_model_deployment_type) + # 2.gitops-rhoai + # ------------------------------------------------------------------------- + - name: gitops-rhoai + when: + - input: "$(params.ai_platform)" + operator: in + values: ["rhoai"] + taskRef: + name: gitops-rhoai + workspaces: + - name: configs + workspace: configs + params: + - name: cluster_name + value: $(params.cluster_name) + - name: account + value: $(params.account) + - name: aiservice_instance_id + value: $(params.aiservice_instance_id) + - name: cluster_url + value: $(params.cluster_url) + - name: git_branch + value: $(params.git_branch) + - name: github_org + value: $(params.github_org) + - name: github_repo + value: $(params.github_repo) + - name: github_host + value: $(params.github_host) + - name: secrets_path + value: $(params.secrets_path) + - name: avp_aws_secret_region + value: $(params.avp_aws_secret_region) + - name: aiservice_namespace + value: $(params.aiservice_namespace) + - name: rhoai_channel + value: $(params.rhoai_channel) + - name: rhoai_subscription_install_plan + value: $(params.rhoai_subscription_install_plan) + - name: openshiftai_name + value: $(params.openshiftai_name) + - name: openshiftai_operator_group + value: $(params.openshiftai_operator_group) + - name: openshiftai_namespace + value: $(params.openshiftai_namespace) + - name: rhoai_operator_version + value: $(params.rhoai_operator_version) + - name: aiservice_storage_ssl + value: $(params.aiservice_storage_ssl) + - name: aiservice_storage_region + value: $(params.aiservice_storage_region) + - name: openshiftai_source + value: $(params.openshiftai_source) + - name: aiservice_rhoai_model_deployment_type + value: $(params.aiservice_rhoai_model_deployment_type) + # 3.gitops-aiservice # ------------------------------------------------------------------------- @@ -162,6 +260,7 @@ spec: name: gitops-aiservice runAfter: - gitops-odh + - gitops-rhoai workspaces: - name: configs workspace: configs diff --git a/tekton/src/tasks/gitops/gitops-rhoai.yml.j2 b/tekton/src/tasks/gitops/gitops-rhoai.yml.j2 new file mode 100644 index 00000000000..27b91bb8044 --- /dev/null +++ b/tekton/src/tasks/gitops/gitops-rhoai.yml.j2 @@ -0,0 +1,131 @@ +apiVersion: tekton.dev/v1beta1 +kind: Task +metadata: + name: gitops-rhoai +spec: + params: + - name: cluster_name + type: string + - name: account + type: string + - name: aiservice_instance_id + type: string + - name: cluster_url + type: string + default: "" + - name: git_branch + type: string + - name: github_org + type: string + - name: github_repo + type: string + - name: github_host + type: string + - name: secrets_path + type: string + - name: aiservice_namespace + type: string + - name: avp_aws_secret_region + type: string + - name: rhoai_channel + type: string + - name: rhoai_subscription_install_plan + type: string + default: "Automatic" + - name: openshiftai_name + type: string + - name: openshiftai_operator_group + type: string + - name: openshiftai_namespace + type: string + - name: rhoai_operator_version + type: string + - name: aiservice_storage_ssl + type: string + default: "true" + - name: aiservice_storage_region + type: string + - name: openshiftai_source + type: string + - name: aiservice_rhoai_model_deployment_type + type: string + + stepTemplate: + name: gitops-rhoai + env: + - name: CLUSTER_NAME + value: $(params.cluster_name) + - name: ACCOUNT + value: $(params.account) + - name: AISERVICE_INSTANCE_ID + value: $(params.aiservice_instance_id) + - name: CLUSTER_URL + value: $(params.cluster_url) + - name: GITHUB_REPO + value: $(params.github_repo) + - name: SECRET_PATH + value: $(params.secrets_path) + - name: GIT_BRANCH + value: $(params.git_branch) + - name: GITHUB_ORG + value: $(params.github_org) + - name: GITHUB_HOST + value: $(params.github_host) + - name: GITHUB_REPO + value: $(params.github_repo) + - name: SM_AWS_REGION + value: $(params.avp_aws_secret_region) + - name: AISERVICE_NAMESPACE + value: $(params.aiservice_namespace) + - name: RHOAI_CHANNEL + value: $(params.rhoai_channel) + - name: RHOAI_INSTALL_PLAN + value: $(params.rhoai_subscription_install_plan) + - name: RHOAI_NAME + value: $(params.openshiftai_name) + - name: RHOAI_OPERATOR_GROUP + value: $(params.openshiftai_operator_group) + - name: RHOAI_NAMESPACE + value: $(params.openshiftai_namespace) + - name: RHOAI_OPERATOR_VERSION + value: $(params.rhoai_operator_version) + - name: AISERVICE_STORAGE_SSL + value: $(params.aiservice_storage_ssl) + - name: AISERVICE_STORAGE_REGION + value: $(params.aiservice_storage_region) + - name: OPENDATAHUB_SOURCE + value: $(params.openshiftai_source) + - name: AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE + value: $(params.aiservice_rhoai_model_deployment_type) + envFrom: + - configMapRef: + name: environment-properties + optional: true + - secretRef: + name: secure-properties + steps: + - args: + - |- + git config --global user.name "MAS Automation" + git config --global user.email "you@example.com" + git config --global user.password $GITHUB_PAT + mkdir -p /tmp/init-rhoai + mas gitops-rhoai -a $ACCOUNT -c $CLUSTER_NAME \ + --secrets-path $SECRET_PATH \ + --dir /tmp/init-rhoai \ + --github-push \ + --github-host $GITHUB_HOST \ + --github-org $GITHUB_ORG \ + --github-repo $GITHUB_REPO \ + --git-branch $GIT_BRANCH + + + exit $? + command: + - /bin/sh + - -c + name: gitops-rhoai + imagePullPolicy: IfNotPresent + image: quay.io/ibmmas/cli:latest + workspaces: + - name: configs From 82fbeae821b4815385a7ca6a2cd7f88a11909403 Mon Sep 17 00:00:00 2001 From: KAROL CZARNECKI Date: Thu, 9 Apr 2026 11:42:27 +0100 Subject: [PATCH 02/11] [patch] fix issue: Could not find or access 'src/tasks/gitops/gitops-deprovision-rhoai.yml.j2 --- ...tops-deprovision-aiservice-pipeline.yml.j2 | 35 +++++++- .../gitops/gitops-deprovision-rhoai.yml.j2 | 85 +++++++++++++++++++ 2 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 tekton/src/tasks/gitops/gitops-deprovision-rhoai.yml.j2 diff --git a/tekton/src/pipelines/gitops/gitops-deprovision-aiservice-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-deprovision-aiservice-pipeline.yml.j2 index 51901edc90d..4852697adb3 100644 --- a/tekton/src/pipelines/gitops/gitops-deprovision-aiservice-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-deprovision-aiservice-pipeline.yml.j2 @@ -99,4 +99,37 @@ spec: - name: aiservice_instance_id value: $(params.aiservice_instance_id) - \ No newline at end of file + #3.gitops-deprovision-rhoai + # ------------------------------------------------------------------------- + - name: run-gitops-deprovision-rhoai + runAfter: + - run-gitops-deprovision-aiservice + taskRef: + kind: Task + name: gitops-deprovision-rhoai + workspaces: + - name: configs + workspace: configs + params: + - name: cluster_name + value: $(params.cluster_name) + - name: account + value: $(params.account) + - name: cluster_id + value: $(params.cluster_id) + - name: cluster_url + value: $(params.cluster_url) + - name: secrets_path + value: $(params.secrets_path) + - name: avp_aws_secret_region + value: $(params.avp_aws_secret_region) + - name: git_branch + value: $(params.git_branch) + - name: github_org + value: $(params.github_org) + - name: github_repo + value: $(params.github_repo) + - name: github_host + value: $(params.github_host) + - name: aiservice_instance_id + value: $(params.aiservice_instance_id) diff --git a/tekton/src/tasks/gitops/gitops-deprovision-rhoai.yml.j2 b/tekton/src/tasks/gitops/gitops-deprovision-rhoai.yml.j2 new file mode 100644 index 00000000000..11e7c527412 --- /dev/null +++ b/tekton/src/tasks/gitops/gitops-deprovision-rhoai.yml.j2 @@ -0,0 +1,85 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Task +metadata: + name: gitops-deprovision-rhoai +spec: + params: + - name: cluster_name + type: string + - name: account + type: string + - name: cluster_id + type: string + - name: cluster_url + type: string + default: "" + - name: secrets_path + type: string + - name: avp_aws_secret_region + type: string + - name: git_branch + type: string + - name: github_org + type: string + - name: github_repo + type: string + - name: github_host + type: string + - name: aiservice_instance_id + type: string + stepTemplate: + name: gitops-deprovision-rhoai + env: + - name: CLUSTER_NAME + value: $(params.cluster_name) + - name: ACCOUNT + value: $(params.account) + - name: CLUSTER_URL + value: $(params.cluster_url) + - name: SECRET_PATH + value: $(params.secrets_path) + - name: SM_AWS_REGION + value: $(params.avp_aws_secret_region) + - name: GIT_BRANCH + value: $(params.git_branch) + - name: GITHUB_ORG + value: $(params.github_org) + - name: GITHUB_HOST + value: $(params.github_host) + - name: GITHUB_REPO + value: $(params.github_repo) + - name: AISERVICE_INSTANCE_ID + value: $(params.aiservice_instance_id) + envFrom: + - configMapRef: + name: environment-properties + optional: true + - secretRef: + name: secure-properties + steps: + - args: + - |- + git config --global user.name "MAS Automation" + git config --global user.email "you@example.com" + git config --global user.password $GITHUB_PAT + + mkdir -p /tmp/deprovision-rhoai + mas gitops-deprovision-rhoai -a $ACCOUNT -c $CLUSTER_NAME \ + --dir /tmp/deprovision-rhoai \ + --secrets-path $SECRET_PATH \ + --github-push \ + --github-host $GITHUB_HOST \ + --github-org $GITHUB_ORG \ + --github-repo $GITHUB_REPO \ + --git-branch $GIT_BRANCH \ + + exit $? + command: + - /bin/sh + - -c + name: gitops-deprovision-rhoai + imagePullPolicy: IfNotPresent + image: quay.io/ibmmas/cli:latest + workspaces: + - name: configs From 4d4fb47268dd50a377527af214324003066db482 Mon Sep 17 00:00:00 2001 From: KAROL CZARNECKI Date: Thu, 9 Apr 2026 11:51:11 +0100 Subject: [PATCH 03/11] [patch] rerun detect-secrets script for new created function --- .secrets.baseline | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.secrets.baseline b/.secrets.baseline index cd794d1aa1a..039022be3ea 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-04-08T13:11:27Z", + "generated_at": "2026-04-09T10:48:50Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -339,6 +339,16 @@ "verified_result": null } ], + "image/cli/mascli/functions/gitops_deprovision_rhoai": [ + { + "hashed_secret": "b2817467154949a61f8e9ad31d1eeaf03221cbfa", + "is_secret": false, + "is_verified": false, + "line_number": 188, + "type": "Secret Keyword", + "verified_result": null + } + ], "image/cli/mascli/functions/gitops_dro": [ { "hashed_secret": "b2817467154949a61f8e9ad31d1eeaf03221cbfa", From 8b0b70064d77597ecdc40d4534c2e2262cdab8a0 Mon Sep 17 00:00:00 2001 From: KAROL CZARNECKI Date: Wed, 15 Apr 2026 11:48:21 +0100 Subject: [PATCH 04/11] [patch] added ai_platform variable to force install rhoai --- .../cluster/instance/ibm-mas-rhoai-install.yaml.j2 | 1 + tekton/src/tasks/gitops/gitops-rhoai.yml.j2 | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 index dca5032730e..179ab2ed0eb 100644 --- a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 +++ b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 @@ -2,6 +2,7 @@ merge-key: "{{ ACCOUNT_ID }}/{{ CLUSTER_ID }}/{{ AISERVICE_INSTANCE_ID }}" ibm_rhoai: + ai_platform: {{ AI_PLATFORM }} openshift_namespace: {{ OPENSHIFT_NAMESPACE }} rhoai_pipeline_channel: {{ RHOAI_PIPELINE_CHANNEL }} rhoai_pipeline_installplan: {{ RHOAI_PIPELINE_INSTALLPLAN }} diff --git a/tekton/src/tasks/gitops/gitops-rhoai.yml.j2 b/tekton/src/tasks/gitops/gitops-rhoai.yml.j2 index 27b91bb8044..36ce3027100 100644 --- a/tekton/src/tasks/gitops/gitops-rhoai.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-rhoai.yml.j2 @@ -49,6 +49,8 @@ spec: type: string - name: aiservice_rhoai_model_deployment_type type: string + - name: ai_platform + type: string stepTemplate: name: gitops-rhoai @@ -97,6 +99,8 @@ spec: value: $(params.openshiftai_source) - name: AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE value: $(params.aiservice_rhoai_model_deployment_type) + - name: AI_PLATFORM + value: $(params.ai_platform) envFrom: - configMapRef: name: environment-properties From a9f21def8989493868cc719da7e135f6fdbf2bf9 Mon Sep 17 00:00:00 2001 From: KAROL CZARNECKI Date: Wed, 15 Apr 2026 11:59:43 +0100 Subject: [PATCH 05/11] [patch] update typo in rhoai variable --- tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 index c9fc5a83ffa..37bd5b55e1a 100644 --- a/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 @@ -122,7 +122,7 @@ spec: type: string - name: openshiftai_source type: string - - name: aiservice_odh_model_deployment_type + - name: aiservice_rhoai_model_deployment_type type: string - name: dro_token_secret type: string From ebf16d89d695bbbfa5c33074c9dcf4155f8e0e48 Mon Sep 17 00:00:00 2001 From: KAROL CZARNECKI Date: Wed, 15 Apr 2026 12:13:49 +0100 Subject: [PATCH 06/11] [patch] removed duplicated values in gitops pipeline --- .../gitops/gitops-aiservice-pipeline.yml.j2 | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 index 37bd5b55e1a..7b398224546 100644 --- a/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 @@ -112,28 +112,28 @@ spec: type: string - name: rhoai_operator_version type: string - - name: environment_type - type: string - - name: aiservice_s3_endpoint_url - type: string - - name: aiservice_storage_region - type: string - - name: aiservice_s3_bucket_prefix - type: string + # - name: environment_type + # type: string + # - name: aiservice_s3_endpoint_url + # type: string + # - name: aiservice_storage_region + # type: string + # - name: aiservice_s3_bucket_prefix + # type: string - name: openshiftai_source type: string - name: aiservice_rhoai_model_deployment_type type: string - - name: dro_token_secret - type: string - - name: dro_cacert_secret - type: string - - name: aiservice_s3_templates_bucket - type: string - - name: aiservice_s3_tenants_bucket - type: string - - name: aiservice_s3_secret - type: string + # - name: dro_token_secret + # type: string + # - name: dro_cacert_secret + # type: string + # - name: aiservice_s3_templates_bucket + # type: string + # - name: aiservice_s3_tenants_bucket + # type: string + # - name: aiservice_s3_secret + # type: string workspaces: - name: configs From 9c99ebe3c883ab9831ef7bda3012c2e02948c06a Mon Sep 17 00:00:00 2001 From: KAROL CZARNECKI Date: Wed, 15 Apr 2026 12:31:18 +0100 Subject: [PATCH 07/11] [patch] remove commented code --- .../gitops/gitops-aiservice-pipeline.yml.j2 | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 index 7b398224546..4965cd1290b 100644 --- a/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2 @@ -112,28 +112,10 @@ spec: type: string - name: rhoai_operator_version type: string - # - name: environment_type - # type: string - # - name: aiservice_s3_endpoint_url - # type: string - # - name: aiservice_storage_region - # type: string - # - name: aiservice_s3_bucket_prefix - # type: string - name: openshiftai_source type: string - name: aiservice_rhoai_model_deployment_type type: string - # - name: dro_token_secret - # type: string - # - name: dro_cacert_secret - # type: string - # - name: aiservice_s3_templates_bucket - # type: string - # - name: aiservice_s3_tenants_bucket - # type: string - # - name: aiservice_s3_secret - # type: string workspaces: - name: configs From cfde9201d7d18af04f778e57af4511922d72b654 Mon Sep 17 00:00:00 2001 From: KAROL CZARNECKI Date: Mon, 11 May 2026 12:00:10 +0100 Subject: [PATCH 08/11] [patch] added gitops-rhoai and gitops-deprovision-rhoai to gitops functions --- image/cli/mascli/functions/gitops | 2 ++ 1 file changed, 2 insertions(+) diff --git a/image/cli/mascli/functions/gitops b/image/cli/mascli/functions/gitops index e90393fa5e2..0b2f5994bd9 100644 --- a/image/cli/mascli/functions/gitops +++ b/image/cli/mascli/functions/gitops @@ -34,6 +34,7 @@ function gitops() { echo " ${COLOR_YELLOW}mas gitops-efs-csi-driver${TEXT_RESET} Deploy AWS EFS CSI driver" echo " ${COLOR_YELLOW}mas gitops-dro${TEXT_RESET} Deploy IBM Data Reporter Operator" echo " ${COLOR_YELLOW}mas gitops-odh${TEXT_RESET} Deploy Open Data Hub for AI/ML workloads" + echo " ${COLOR_YELLOW}mas gitops-rhoai${TEXT_RESET} Deploy Red Hat Openshift AI for AI/ML workloads" echo " ${COLOR_YELLOW}mas gitops-nvidia-gpu${TEXT_RESET} Configure NVIDIA GPU operator for AI workloads" echo "" echo "${COLOR_CYAN}GitOps MAS Core:${TEXT_RESET}" @@ -68,6 +69,7 @@ function gitops() { echo " ${COLOR_YELLOW}mas gitops-deprovision-cp4d-service${TEXT_RESET} Remove Cloud Pak for Data services" echo " ${COLOR_YELLOW}mas gitops-deprovision-efs${TEXT_RESET} Remove AWS EFS configuration" echo " ${COLOR_YELLOW}mas gitops-deprovision-odh${TEXT_RESET} Remove Open Data Hub" + echo " ${COLOR_YELLOW}mas gitops-deprovision-rhoai${TEXT_RESET} Remove Red Hat Openshift AI" echo " ${COLOR_YELLOW}mas gitops-deprovision-aiservice${TEXT_RESET} Remove Maximo AI Service" echo " ${COLOR_YELLOW}mas gitops-deprovision-aiservice-tenant${TEXT_RESET} Remove AI Service tenant" echo " ${COLOR_YELLOW}mas gitops-deprovision-cluster${TEXT_RESET} Remove cluster-level GitOps resources" From feec425c452c3aee3979354451e60224a18bb17f Mon Sep 17 00:00:00 2001 From: Divyesh Khokhar Date: Thu, 14 May 2026 13:31:01 +0530 Subject: [PATCH 09/11] [patch] Update RHOAI CLI template field names to match ArgoCD templates --- .../instance/ibm-mas-rhoai-install.yaml.j2 | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 index 179ab2ed0eb..2ffcd1b1ae2 100644 --- a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 +++ b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 @@ -2,7 +2,6 @@ merge-key: "{{ ACCOUNT_ID }}/{{ CLUSTER_ID }}/{{ AISERVICE_INSTANCE_ID }}" ibm_rhoai: - ai_platform: {{ AI_PLATFORM }} openshift_namespace: {{ OPENSHIFT_NAMESPACE }} rhoai_pipeline_channel: {{ RHOAI_PIPELINE_CHANNEL }} rhoai_pipeline_installplan: {{ RHOAI_PIPELINE_INSTALLPLAN }} @@ -28,14 +27,14 @@ ibm_rhoai: serverless_operator_source: {{ SERVERLESS_OPERATOR_SOURCE }} serverless_operator_sourceNamespace: {{ SERVERLESS_OPERATOR_SOURCE_NAMESPACE }} - # OpenDataHub Operator - openshiftai_OperatorGroup_name: {{ OPENSHIFTAI_OPERATORGROUP_NAME }} - openshiftai_name: {{ OPENSHIFTAI_NAME }} - openshiftai_namespace: {{ OPENSHIFTAI_NAMESPACE }} - openshiftai_installPlanApproval: {{ RHOAI_INSTALL_PLAN }} - openshiftai_channel: {{ OPENSHIFTAI_CHANNEL }} - openshiftai_source: {{ OPENSHIFTAI_SOURCE }} - openshiftai_sourceNamespace: {{ OPENSHIFTAI_SOURCE_NAMESPACE }} - aiservice_rhoai_model_deployment_type: "{{ AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE }}" + # RHOAI Operator + rhoai_applications_namespace: redhat-ods-applications + rhoai_monitoring_namespace: redhat-ods-monitoring + rhoai_OperatorGroup_name: {{ OPENSHIFTAI_OPERATORGROUP_NAME }} + rhoai_name: {{ OPENSHIFTAI_NAME }} + rhoai_installPlanApproval: {{ RHOAI_INSTALL_PLAN }} + rhoai_source: {{ OPENSHIFTAI_SOURCE }} + rhoai_sourceNamespace: {{ OPENSHIFTAI_SOURCE_NAMESPACE }} + aiservice_rhoai_model_deployment_type: {{ AISERVICE_RHOAI_MODEL_DEPLOYMENT_TYPE }} primary_storage_class: {{ PRIMARY_STORAGE_CLASS }} From a0077d472cc0e2a009116ac5c6c833aa86c06e1d Mon Sep 17 00:00:00 2001 From: Divyesh Khokhar Date: Thu, 14 May 2026 16:32:17 +0530 Subject: [PATCH 10/11] [patch] Added action flags --- .../appset-configs/cluster/instance/ibm-mas-odh-install.yaml.j2 | 1 + .../cluster/instance/ibm-mas-rhoai-install.yaml.j2 | 1 + 2 files changed, 2 insertions(+) diff --git a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-odh-install.yaml.j2 b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-odh-install.yaml.j2 index ed0f55dff11..7441769c815 100644 --- a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-odh-install.yaml.j2 +++ b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-odh-install.yaml.j2 @@ -2,6 +2,7 @@ merge-key: "{{ ACCOUNT_ID }}/{{ CLUSTER_ID }}/{{ AISERVICE_INSTANCE_ID }}" ibm_odh: + action: {{ ODH_ACTION }} openshift_namespace: {{ OPENSHIFT_NAMESPACE }} odh_pipeline_channel: {{ ODH_PIPELINE_CHANNEL }} odh_pipeline_installplan: {{ ODH_PIPELINE_INSTALLPLAN }} diff --git a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 index 2ffcd1b1ae2..a1586a5975b 100644 --- a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 +++ b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-mas-rhoai-install.yaml.j2 @@ -2,6 +2,7 @@ merge-key: "{{ ACCOUNT_ID }}/{{ CLUSTER_ID }}/{{ AISERVICE_INSTANCE_ID }}" ibm_rhoai: + action: {{ RHOAI_ACTION }} openshift_namespace: {{ OPENSHIFT_NAMESPACE }} rhoai_pipeline_channel: {{ RHOAI_PIPELINE_CHANNEL }} rhoai_pipeline_installplan: {{ RHOAI_PIPELINE_INSTALLPLAN }} From 88756769be09340b66b716d1ccec15d12643d4d7 Mon Sep 17 00:00:00 2001 From: Divyesh Khokhar Date: Thu, 14 May 2026 18:18:56 +0530 Subject: [PATCH 11/11] [patch] added action vars in functions as well --- image/cli/mascli/functions/gitops_odh | 1 + image/cli/mascli/functions/gitops_rhoai | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/image/cli/mascli/functions/gitops_odh b/image/cli/mascli/functions/gitops_odh index 6b8ff721dae..b183ccb559b 100755 --- a/image/cli/mascli/functions/gitops_odh +++ b/image/cli/mascli/functions/gitops_odh @@ -106,6 +106,7 @@ function gitops_odh_noninteractive() { + export ODH_ACTION="${ODH_ACTION:-"install"}" export OPENSHIFT_NAMESPACE="${OPENSHIFT_NAMESPACE:-"openshift-operators"}" export ODH_PIPELINE_CHANNEL="${ODH_PIPELINE_CHANNEL:-"latest"}" export ODH_PIPELINE_INSTALLPLAN="${ODH_PIPELINE_INSTALLPLAN:-"manual"}" diff --git a/image/cli/mascli/functions/gitops_rhoai b/image/cli/mascli/functions/gitops_rhoai index 831af07afc6..527ec4fb2c5 100755 --- a/image/cli/mascli/functions/gitops_rhoai +++ b/image/cli/mascli/functions/gitops_rhoai @@ -106,6 +106,7 @@ function gitops_rhoai_noninteractive() { + export RHOAI_ACTION="${RHOAI_ACTION:-"uninstall"}" export OPENSHIFT_NAMESPACE="${OPENSHIFT_NAMESPACE:-"openshift-operators"}" export RHOAI_PIPELINE_CHANNEL="${RHOAI_PIPELINE_CHANNEL:-"latest"}" export RHOAI_PIPELINE_INSTALLPLAN="${RHOAI_PIPELINE_INSTALLPLAN:-"manual"}" @@ -129,9 +130,9 @@ function gitops_rhoai_noninteractive() { export SERVERLESS_OPERATOR_SOURCE="${SERVERLESS_OPERATOR_SOURCE:-"redhat-operators"}" export SERVERLESS_OPERATOR_SOURCE_NAMESPACE="${SERVERLESS_OPERATOR_SOURCE_NAMESPACE:-"openshift-marketplace"}" - export OPENSHIFTAI_OPERATORGROUP_NAME="${OPENSHIFTAI_OPERATORGROUP_NAME:-"operatorgroup"}" - export OPENSHIFTAI_NAME="${OPENSHIFTAI_NAME:-"rhods-operator"}" - export OPENSHIFTAI_NAMESPACE="${OPENSHIFTAI_NAMESPACE:-"redhat-ods-operator"}" + export OPENSHIFTAI_OPERATORGROUP_NAME="${RHOAI_OPERATOR_GROUP:-"operatorgroup"}" + export OPENSHIFTAI_NAME="${RHOAI_NAME:-"rhods-operator"}" + export OPENSHIFTAI_NAMESPACE="${RHOAI_NAMESPACE:-"redhat-ods-operator"}" export RHOAI_INSTALL_PLAN="${RHOAI_INSTALL_PLAN:-"Automatic"}" export OPENSHIFTAI_CHANNEL="${OPENSHIFTAI_CHANNEL:-"stable"}" export OPENSHIFTAI_SOURCE="${OPENSHIFTAI_SOURCE:-"redhat-operators"}"