diff --git a/.secrets.baseline b/.secrets.baseline index a06ded1923..c4eebd62dd 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$", "lines": null }, - "generated_at": "2026-01-12T15:19:33Z", + "generated_at": "2026-01-21T09:03:12Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -232,7 +232,7 @@ "hashed_secret": "b2817467154949a61f8e9ad31d1eeaf03221cbfa", "is_secret": false, "is_verified": false, - "line_number": 337, + "line_number": 357, "type": "Secret Keyword", "verified_result": null } @@ -652,7 +652,7 @@ "hashed_secret": "fee2d55ad9a49a95fc89abe8f414dad66704ebfd", "is_secret": false, "is_verified": false, - "line_number": 37, + "line_number": 41, "type": "Secret Keyword", "verified_result": null } diff --git a/image/cli/mascli/functions/gitops_aiservice_tenant b/image/cli/mascli/functions/gitops_aiservice_tenant index 34c481f3b5..02f775c92a 100644 --- a/image/cli/mascli/functions/gitops_aiservice_tenant +++ b/image/cli/mascli/functions/gitops_aiservice_tenant @@ -41,9 +41,10 @@ DRO : --drocfg-url ${COLOR_YELLOW}DROCFG_URL${TEXT_RESET} URL of the DRO configuration service SLS : ---slscfg-url ${COLOR_YELLOW}SLSCFG_URL${TEXT_RESET} URL of the SLS configuration service +--slscfg-url ${COLOR_YELLOW}SLSCFG_URL${TEXT_RESET} URL of the SLS configuration service --aiservice-sls-subscription-id ${COLOR_YELLOW}AISERVICE_SLS_SUBSCRIPTION_ID${TEXT_RESET} Subscription ID associated with SLS - +-s, --sls-service ${COLOR_YELLOW}STANDALONE_SLS_SERVICE${TEXT_RESET} for ibm internal use only. + Watsonx : --aiservice-watsonxai-url ${COLOR_YELLOW}AISERVICE_WATSONXAI_URL${TEXT_RESET} Endpoint URL for Watsonx.ai --aiservice-watsonx-full ${COLOR_YELLOW}AISERVICE_WATSONX_FULL${TEXT_RESET} Full URL for Watsonx.ai including API key @@ -77,6 +78,19 @@ function gitops_aiservice_tenant_noninteractive() { SECRETS_KEY_SEPERATOR="/" GIT_COMMIT_MSG="gitops-aiservice-tenant commit" + if [ ! -z "$STANDALONE_SLS_SERVICE" ]; then + CLEAN_PATH=$(echo "$STANDALONE_SLS_SERVICE" | sed 's###') + IFS='/' read -r -a PARTS <<< "$CLEAN_PATH" + if [ ${#PARTS[@]} -lt 6 ]; then + echo "Error: Invalid SLS service parameter file Path $STANDALONE_SLS_SERVICE format." >&2 + exit 1 + fi + ICN="${PARTS[3]}" + SAAS_SUB_ID="${PARTS[4]}" + fi + export ICN=${ICN:-""} + export SAAS_SUB_ID=${SAAS_SUB_ID:-""} + # adding default values # all generic values should to put here # check with ansible playbook/gitops envs @@ -170,6 +184,10 @@ function gitops_aiservice_tenant_noninteractive() { --slscfg-url) export SLSCFG_URL=$1 && shift ;; + # Standalone Server configuration + -s|--sls-service) + export STANDALONE_SLS_SERVICE=$1 && shift + ;; --aiservice-sls-subscription-id ) export AISERVICE_SLS_SUBSCRIPTION_ID=$1 && shift @@ -286,7 +304,9 @@ function gitops_aiservice_tenant_noninteractive() { [[ -z "$DROCFG_URL" ]] && gitops_aiservice_tenant_help "DROCFG_URL is not set. Please specify the DRO configuration URL using --drocfg-url." # -- SLS - [[ -z "$SLSCFG_URL" ]] && gitops_aiservice_tenant_help "SLSCFG_URL is not set. Please specify the SLS configuration URL using --slscfg-url." + if [ -z "$STANDALONE_SLS_SERVICE" ]; then + [[ -z "$SLSCFG_URL" ]] && gitops_aiservice_tenant_help "SLSCFG_URL is not set. Please specify the SLS configuration URL using --slscfg-url." + fi # -- Watsonx [[ -z "$AISERVICE_WATSONXAI_URL" ]] && gitops_aiservice_tenant_help "AISERVICE_WATSONXAI_URL is not set. Please specify the Watsonx.ai URL using --aiservice-watsonxai-url." @@ -370,7 +390,11 @@ function gitops_aiservice_tenant() { # -- SLS echo_reset_dim "SLS subscription ID .......................... ${COLOR_MAGENTA}${AISERVICE_SLS_SUBSCRIPTION_ID}" - + echo_reset_dim "SLS service param file path .................. ${COLOR_MAGENTA}${STANDALONE_SLS_SERVICE}" + if [ ! -z "$STANDALONE_SLS_SERVICE" ]; then + echo_reset_dim "ICN ........................................ ${COLOR_MAGENTA}${ICN}" + echo_reset_dim "SAAS_SUB_ID ........................................ ${COLOR_MAGENTA}${SAAS_SUB_ID}" + fi # -- Watsonx echo_reset_dim "Watsonx.ai URL ............................... ${COLOR_MAGENTA}${AISERVICE_WATSONXAI_URL}" echo_reset_dim "Watsonx.ai full URL .......................... ${COLOR_MAGENTA}${AISERVICE_WATSONX_FULL}" @@ -394,9 +418,16 @@ function gitops_aiservice_tenant() { export SECRET_KEY_DROCFG_REGISTRATION_KEY=${SECRETS_PREFIX}droai#drocfg_registration_key # sls - SLS_SECRETS_PREFIX="${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}${AISERVICE_INSTANCE_ID}${SECRETS_KEY_SEPERATOR}${TENANT_ID}${SECRETS_KEY_SEPERATOR}" - export SECRET_KEY_SLSCFG_REGISTRATION_KEY=${SLS_SECRETS_PREFIX}sls#slscfg_registration_key - export SECRET_KEY_SLSCFG_CA_B64ENC=${SLS_SECRETS_PREFIX}sls#slscfg_ca_b64enc + if [ -z "$STANDALONE_SLS_SERVICE" ]; then + export SLS_SECRETS_PREFIX="${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}${AISERVICE_INSTANCE_ID}${SECRETS_KEY_SEPERATOR}${TENANT_ID}${SECRETS_KEY_SEPERATOR}" + export SECRET_KEY_SLSCFG_REGISTRATION_KEY=${SLS_SECRETS_PREFIX}sls#slscfg_registration_key + export SECRET_KEY_SLSCFG_CA_B64ENC=${SLS_SECRETS_PREFIX}sls#slscfg_ca_b64enc + else + export SLS_SECRETS_PREFIX="${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${ICN}${SECRETS_KEY_SEPERATOR}${SAAS_SUB_ID}${SECRETS_KEY_SEPERATOR}" + export SECRET_KEY_SLSCFG_REGISTRATION_KEY=${SLS_SECRETS_PREFIX}sls#registration_key + export SECRET_KEY_SLSCFG_CA_B64ENC=${SLS_SECRETS_PREFIX}sls#ca_b64 + export SECRET_KEY_SLS_URL=${SLS_SECRETS_PREFIX}sls#sls_url + fi export SECRET_KEY_RSL_ORG_ID=${SECRETS_PREFIX}rsl#rsl_org_id export SECRET_KEY_RSL_TOKEN=${SECRETS_PREFIX}rsl#rsl_token @@ -416,7 +447,11 @@ function gitops_aiservice_tenant() { sm_verify_secret_exists ${SECRETS_PREFIX}ibm_entitlement "image_pull_secret_b64,entitlement_key" sm_verify_secret_exists ${SECRETS_PREFIX}droai "drocfg_registration_key,drocfg_ca_b64enc" - sm_verify_secret_exists ${SLS_SECRETS_PREFIX}sls "slscfg_registration_key,slscfg_ca_b64enc" + if [ -z "$STANDALONE_SLS_SERVICE" ]; then + sm_verify_secret_exists ${SLS_SECRETS_PREFIX}sls "slscfg_registration_key,slscfg_ca_b64enc" + else + sm_verify_secret_exists ${SLS_SECRETS_PREFIX}sls "registration_key,ca_b64,sls_url" + fi sm_verify_secret_exists ${SECRETS_PREFIX}rsl "rsl_org_id,rsl_token" sm_verify_secret_exists ${SECRETS_PREFIX}watsonx "watsonxai_apikey,watsonxai_project_id" diff --git a/image/cli/mascli/functions/gitops_deprovision_aiservice_tenant b/image/cli/mascli/functions/gitops_deprovision_aiservice_tenant index 7ef673ec0e..6d8c1c4be3 100644 --- a/image/cli/mascli/functions/gitops_deprovision_aiservice_tenant +++ b/image/cli/mascli/functions/gitops_deprovision_aiservice_tenant @@ -222,7 +222,7 @@ function gitops_deprovision_aiservice_tenant() { export SECRET_S3_AUTH=${SECRETS_PREFIX}s3 - deleting secrets from aws + # deleting secrets from aws echo -e "Deleting ibm_entitlement secrets $SECRET_IBM_ENTITLEMENT_AUTH" sm_delete_secret $SECRET_IBM_ENTITLEMENT_AUTH diff --git a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice-tenant.yaml.j2 b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice-tenant.yaml.j2 index 28c614b0b3..b297edd40c 100644 --- a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice-tenant.yaml.j2 +++ b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice-tenant.yaml.j2 @@ -17,7 +17,11 @@ ibm_aiservice_tenant: # sls slscfg_ca_b64enc: "" + {%- if STANDALONE_SLS_SERVICE %} + slscfg_url: + {%- else %} slscfg_url: "{{ SLSCFG_URL }}" + {%- endif %} slscfg_registration_key: "" aiservice_sls_subscription_id: "{{ AISERVICE_SLS_SUBSCRIPTION_ID }}" diff --git a/tekton/src/pipelines/gitops/gitops-aiservice-tenant-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-aiservice-tenant-pipeline.yml.j2 index 19178244cb..a12730cd73 100644 --- a/tekton/src/pipelines/gitops/gitops-aiservice-tenant-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-aiservice-tenant-pipeline.yml.j2 @@ -85,6 +85,11 @@ spec: - name: tenant_entitlement_end_date type: string + # standalone sls + - name: sls_service + type: string + default: "" + workspaces: - name: configs tasks: @@ -173,4 +178,5 @@ spec: value: $(params.tenant_entitlement_start_date) - name: tenant_entitlement_end_date value: $(params.tenant_entitlement_end_date) - \ No newline at end of file + - name: sls_service + value: $(params.sls_service) \ No newline at end of file diff --git a/tekton/src/tasks/gitops/gitops-aiservice-tenant.yml.j2 b/tekton/src/tasks/gitops/gitops-aiservice-tenant.yml.j2 index 9d5c256023..50e8bfcdf5 100644 --- a/tekton/src/tasks/gitops/gitops-aiservice-tenant.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-aiservice-tenant.yml.j2 @@ -81,6 +81,9 @@ spec: type: string - name: tenant_entitlement_end_date type: string + - name: sls_service + type: string + default: "" stepTemplate: name: gitops-aiservice-tenant env: @@ -158,6 +161,8 @@ spec: value: $(params.tenant_entitlement_start_date) - name: TENANT_ENTITLEMENT_END_DATE value: $(params.tenant_entitlement_end_date) + - name: STANDALONE_SLS_SERVICE + value: $(params.sls_service) envFrom: - configMapRef: name: environment-properties