From 39a4f80c3f4bcd7865ff108765eb463bc1ee55ea Mon Sep 17 00:00:00 2001 From: Simon Shi <90060719+shixuguang@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:51:58 -0500 Subject: [PATCH 1/5] test Updated the heading level in README.md and clarified the purpose of the repository. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69adc84..e2d697d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# swhub-custom-app-samples +## swhub-custom-app-samples IBM Software Hub offered custom application capablity in 5.3, the purpose of the git repo is to host the sample applications for end user to download and try out. From 80360265da0963e086d7c7896af2ea87d211c90a Mon Sep 17 00:00:00 2001 From: Simon Shi Date: Wed, 19 Nov 2025 16:06:44 -0500 Subject: [PATCH 2/5] add custom apps --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 69adc84..5040e88 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,24 @@ -# swhub-custom-app-samples +# Software Hub Custom Apps Samples + IBM Software Hub offered custom application capablity in 5.3, the purpose of the git repo is to host the sample applications for end user to download and try out. + +The repo contains collection of custom sample apps that can be deployed into software hub default dataplane, each folder contains one sample app and README instructions for deployment + +### Pre-requisites to deploy sample applications + +Custom Apps is built on top of remote dataplanes concept. So, before deploying sample applications users need to have dataplanes setup. +refer [this doc](https://www.ibm.com/docs/en/software-hub/5.2.x?topic=installing-setting-up-remote-physical-location) to understand concept of remote dataplane and physical locations + +`default dataplane` is a remote dataplane that resides on a regular software hub cluster. for setting up default dataplane, the following component are required: + +- Software Hub Scheduling Service + refer [this doc](https://www.ibm.com/docs/en/software-hub/5.2.x?topic=cluster-installing-shared-components) for how to install scheduling service as cluster component +- Software Hub 5.3 premium cartrige and cpd-cli olm-utils premium image + +To enable default dataplane using cpd-cli: + +1. load olm-utils premium image: `export OLM_UTILS_IMAGE=icr.io/cpopen/cpd/olm-utils-v4:5.3.0-` +2. Run `cpd-cli manage login-to-ocp -u kubeadmin -p --server=` +3. Run `cpd-cli manage enable-premuim-features --license_acceptance=true --features=enable_rdp --operator_ns= --instance_ns= --scheduler_ns=` +4. Create two namespaces mgmt and workload(wl). +5. Run `cpd-cli manage enable-default-dataplane --instance_ns=zen --management_ns=mgmt --workload_ns=wl` this command will create a default physical location - `default-pl` and a default dataplane - `default-dp`. From ef4acd741f01659760e9d90e1b969e1339b89880 Mon Sep 17 00:00:00 2001 From: Simon Shi Date: Wed, 19 Nov 2025 16:26:38 -0500 Subject: [PATCH 3/5] save --- swhub-custom-app-samples.code-workspace | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 swhub-custom-app-samples.code-workspace diff --git a/swhub-custom-app-samples.code-workspace b/swhub-custom-app-samples.code-workspace deleted file mode 100644 index 362d7c2..0000000 --- a/swhub-custom-app-samples.code-workspace +++ /dev/null @@ -1,7 +0,0 @@ -{ - "folders": [ - { - "path": "." - } - ] -} \ No newline at end of file From 60192488c669c50aebf374d4f92c8195ddb2f30d Mon Sep 17 00:00:00 2001 From: Simon Shi Date: Wed, 19 Nov 2025 18:32:46 -0500 Subject: [PATCH 4/5] update mcp-gateway-forge --- mcp-gateway-forge/README.md | 8 +- .../postgresql-persistent-job.template.yaml | 235 --------------- .../postgresql-persistent-template.json | 283 ------------------ mcp-gateway-forge/postgresql.template.tgz | Bin 2618 -> 2642 bytes 4 files changed, 1 insertion(+), 525 deletions(-) delete mode 100644 mcp-gateway-forge/postgresql-persistent-job.template.yaml delete mode 100644 mcp-gateway-forge/postgresql-persistent-template.json diff --git a/mcp-gateway-forge/README.md b/mcp-gateway-forge/README.md index afdebdd..6170d89 100644 --- a/mcp-gateway-forge/README.md +++ b/mcp-gateway-forge/README.md @@ -44,18 +44,12 @@ Checkout the [pre-requisites](../README.md#pre-requisites-to-deploy-sample-appli ``` download postgresql.template.tgz to cpd-cli-workspace/olm-utils-workspace/work/postgesql.template.tgz ``` - - create postgres app template parameters json file: - ``` - $ cat cpd-cli-workspace/olm-utils-workspace/work/app-parameters-json.json - {"DATABASE_SERVICE_NAME":"postgresql-mcp-context-forge","POSTGRESQL_USER":"postgres","POSTGRESQL_PASSWORD":"secret","POSTGRESQL_DATABASE":"mcp"} - ``` - run following cpd-cli command: ``` ./cpd-cli manage create-oc-template-application --instance_ns=zen \ --app_name=postgresql-mcp-context-forge \ - --app_template=/tmp/work/postgesql.template.tgz \ - --app_template_parameters_json=/tmp/work/app-parameters-json.json \ + --app_tar_file=/tmp/work/postgesql.template.tgz \ --cpu=400m \ --memory=200Mi \ --cpu_limit=500m \ diff --git a/mcp-gateway-forge/postgresql-persistent-job.template.yaml b/mcp-gateway-forge/postgresql-persistent-job.template.yaml deleted file mode 100644 index 1567dc8..0000000 --- a/mcp-gateway-forge/postgresql-persistent-job.template.yaml +++ /dev/null @@ -1,235 +0,0 @@ -apiVersion: template.openshift.io/v1 -kind: Template -labels: - template: postgresql-persistent-template -message: |- - The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}. - - Username: ${POSTGRESQL_USER} - Password: ${POSTGRESQL_PASSWORD} - Database Name: ${POSTGRESQL_DATABASE} - Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/ - - For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/. -metadata: - annotations: - description: |- - PostgreSQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/. - - NOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template. - iconClass: icon-postgresql - openshift.io/display-name: PostgreSQL - openshift.io/documentation-url: https://docs.okd.io/latest/using_images/db_images/postgresql.html - openshift.io/long-description: This template provides a standalone PostgreSQL - server with a database created. The database is stored on persistent storage. The - database name, username, and password are chosen via parameters when provisioning - this service. - openshift.io/provider-display-name: Red Hat, Inc. - openshift.io/support-url: https://access.redhat.com - samples.operator.openshift.io/version: 4.16.40 - tags: database,postgresql - creationTimestamp: "2022-01-08T00:32:05Z" - labels: - samples.operator.openshift.io/managed: "true" - name: postgresql-persistent -objects: -- apiVersion: v1 - kind: Secret - metadata: - annotations: - template.openshift.io/expose-database_name: '{.data[''database-name'']}' - template.openshift.io/expose-password: '{.data[''database-password'']}' - template.openshift.io/expose-username: '{.data[''database-user'']}' - name: ${DATABASE_SERVICE_NAME} - stringData: - database-name: ${POSTGRESQL_DATABASE} - database-password: ${POSTGRESQL_PASSWORD} - database-user: ${POSTGRESQL_USER} -- apiVersion: v1 - kind: Service - metadata: - annotations: - template.openshift.io/expose-uri: postgres://{.spec.clusterIP}:{.spec.ports[?(.name=="postgresql")].port} - name: ${DATABASE_SERVICE_NAME} - spec: - ports: - - name: postgresql - nodePort: 0 - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - name: ${DATABASE_SERVICE_NAME} - sessionAffinity: None - type: ClusterIP - status: - loadBalancer: {} -- apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: ${DATABASE_SERVICE_NAME} - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: ${VOLUME_CAPACITY} -- apiVersion: apps.openshift.io/v1 - kind: DeploymentConfig - metadata: - annotations: - template.alpha.openshift.io/wait-for-ready: "true" - name: ${DATABASE_SERVICE_NAME} - spec: - replicas: 1 - selector: - name: ${DATABASE_SERVICE_NAME} - strategy: - type: Recreate - template: - metadata: - labels: - name: ${DATABASE_SERVICE_NAME} - spec: - containers: - - capabilities: {} - env: - - name: POSTGRESQL_USER - valueFrom: - secretKeyRef: - key: database-user - name: ${DATABASE_SERVICE_NAME} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - key: database-password - name: ${DATABASE_SERVICE_NAME} - - name: POSTGRESQL_DATABASE - valueFrom: - secretKeyRef: - key: database-name - name: ${DATABASE_SERVICE_NAME} - image: ' ' - imagePullPolicy: IfNotPresent - livenessProbe: - exec: - command: - - /usr/libexec/check-container - - --live - initialDelaySeconds: 120 - timeoutSeconds: 10 - name: postgresql - ports: - - containerPort: 5432 - protocol: TCP - readinessProbe: - exec: - command: - - /usr/libexec/check-container - initialDelaySeconds: 5 - timeoutSeconds: 1 - resources: - limits: - memory: ${MEMORY_LIMIT} - securityContext: - capabilities: {} - privileged: false - terminationMessagePath: /dev/termination-log - volumeMounts: - - mountPath: /var/lib/pgsql/data - name: ${DATABASE_SERVICE_NAME}-data - dnsPolicy: ClusterFirst - restartPolicy: Always - volumes: - - name: ${DATABASE_SERVICE_NAME}-data - persistentVolumeClaim: - claimName: ${DATABASE_SERVICE_NAME} - triggers: - - imageChangeParams: - automatic: true - containerNames: - - postgresql - from: - kind: ImageStreamTag - name: postgresql:${POSTGRESQL_VERSION} - namespace: ${NAMESPACE} - lastTriggeredImage: "" - type: ImageChange - - type: ConfigChange - status: {} -- apiVersion: batch/v1 - kind: Job - metadata: - name: postgres-createdb-job - spec: - backoffLimit: 2 - completionMode: NonIndexed - completions: 1 - manualSelector: false - parallelism: 1 - podReplacementPolicy: TerminatingOrFailed - suspend: false - template: - spec: - containers: - - command: - - sh - - -c - - | - retry=30 - while ! psql -lqt postgresql://${POSTGRESQL_USER}:${POSTGRESQL_PASSWORD}@${DATABASE_SERVICE_NAME}:5432;do - if [ $((retry--)) -eq 0 ];then echo "failed to connect to postgres database";exit 1;fi - sleep 10; - done; - if ! psql -lqt postgresql://${POSTGRESQL_USER}:${POSTGRESQL_PASSWORD}@${DATABASE_SERVICE_NAME}:5432 | cut -d "|" -f 1 | grep -w ${POSTGRESQL_DATABASE};then - psql -c "create database ${POSTGRESQL_DATABASE}" postgresql://${POSTGRESQL_USER}:${POSTGRESQL_PASSWORD}@${DATABASE_SERVICE_NAME}:5432; - fi - image: image-registry.openshift-image-registry.svc:5000/openshift/postgresql@sha256:c51c2456d92ce71905d72088fa14379eb27ec123860bc3b0d4564b7221eb9ca9 - imagePullPolicy: Always - name: postgres-job - dnsPolicy: ClusterFirst - restartPolicy: OnFailure - schedulerName: default-scheduler - serviceAccountName: zen-norbac-sa -parameters: -- description: Maximum amount of memory the container can use. - displayName: Memory Limit - name: MEMORY_LIMIT - required: true - value: 512Mi -- description: The OpenShift Namespace where the ImageStream resides. - displayName: Namespace - name: NAMESPACE - value: openshift -- description: The name of the OpenShift Service exposed for the database. - displayName: Database Service Name - name: DATABASE_SERVICE_NAME - required: true - value: postgresql -- description: Username for PostgreSQL user that will be used for accessing the database. - displayName: PostgreSQL Connection Username - from: user[A-Z0-9]{3} - generate: expression - name: POSTGRESQL_USER - required: true -- description: Password for the PostgreSQL connection user. - displayName: PostgreSQL Connection Password - from: '[a-zA-Z0-9]{16}' - generate: expression - name: POSTGRESQL_PASSWORD - required: true -- description: Name of the PostgreSQL database accessed. - displayName: PostgreSQL Database Name - name: POSTGRESQL_DATABASE - required: true - value: sampledb -- description: Volume space available for data, e.g. 512Mi, 2Gi. - displayName: Volume Capacity - name: VOLUME_CAPACITY - required: true - value: 1Gi -- description: Version of PostgreSQL image to be used (10-el7, 10-el8, or latest). - displayName: Version of PostgreSQL Image - name: POSTGRESQL_VERSION - required: true - value: 10-el8 diff --git a/mcp-gateway-forge/postgresql-persistent-template.json b/mcp-gateway-forge/postgresql-persistent-template.json deleted file mode 100644 index 623bc36..0000000 --- a/mcp-gateway-forge/postgresql-persistent-template.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "template.openshift.io/v1", - "metadata": { - "name": "postgresql-persistent", - "creationTimestamp": null, - "annotations": { - "description": "PostgreSQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-postgresql", - "openshift.io/display-name": "PostgreSQL", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", - "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,postgresql" - } - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${POSTGRESQL_DATABASE}", - "database-password": "${POSTGRESQL_PASSWORD}", - "database-user": "${POSTGRESQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "nodePort": 0, - "port": 5432, - "protocol": "TCP", - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "apps.openshift.io/v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "name": "MEMORY_LIMIT", - "displayName": "Memory Limit", - "description": "Maximum amount of memory the container can use.", - "value": "512Mi", - "required": true - }, - { - "name": "NAMESPACE", - "displayName": "Namespace", - "description": "The OpenShift Namespace where the ImageStream resides.", - "value": "openshift" - }, - { - "name": "DATABASE_SERVICE_NAME", - "displayName": "Database Service Name", - "description": "The name of the OpenShift Service exposed for the database.", - "value": "postgresql", - "required": true - }, - { - "name": "POSTGRESQL_USER", - "displayName": "PostgreSQL Connection Username", - "description": "Username for PostgreSQL user that will be used for accessing the database.", - "generate": "expression", - "from": "user[A-Z0-9]{3}", - "required": true - }, - { - "name": "POSTGRESQL_PASSWORD", - "displayName": "PostgreSQL Connection Password", - "description": "Password for the PostgreSQL connection user.", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}", - "required": true - }, - { - "name": "POSTGRESQL_DATABASE", - "displayName": "PostgreSQL Database Name", - "description": "Name of the PostgreSQL database accessed.", - "value": "sampledb", - "required": true - }, - { - "name": "VOLUME_CAPACITY", - "displayName": "Volume Capacity", - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "value": "1Gi", - "required": true - }, - { - "name": "POSTGRESQL_VERSION", - "displayName": "Version of PostgreSQL Image", - "description": "Version of PostgreSQL image to be used (10-el7, 10-el8, or latest).", - "value": "10-el8", - "required": true - } - ], - "labels": { - "template": "postgresql-persistent-template" - } -} \ No newline at end of file diff --git a/mcp-gateway-forge/postgresql.template.tgz b/mcp-gateway-forge/postgresql.template.tgz index d23043c5db8e2c7016a88442139899c1ff6975fe..8c1890077932bc4a773d1754f3486872e56291b6 100644 GIT binary patch literal 2642 zcmV-Y3a#}YiwFSvVC8541MOOEbK5o&?q~gqJxynv%$O7<$99hy&z);KsqSK1XDR8V znT!V_AqfpdFaRi9P5j?)0q|Y4;)Ab zPhCZqNkkNN*JK%e^IIOz^A4Uo0sVP+ux~!Sf&Gn7|8Q@w5B+`b;BbJ`gFWyDeeb~g z2E5;N>I0utDk2byTrjzf4#{S-E%TNcC_eup4@uZ7t#=;#P-vVdG)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$BErsC-=9 zhNg6tj`r+ptRIA#(kizdCPk4K6Ib44V>u)XLxDx@kW!wtM$uv zK Date: Thu, 20 Nov 2025 15:30:26 -0500 Subject: [PATCH 5/5] update --- README.md | 19 ++++-- code-engine-app/README.md | 115 ++++++++++++++++++----------------- hello-world/README.md | 2 +- mcp-gateway-forge/README.md | 55 +++++++++++++---- qna_rag_chatbot/README.md | 14 +++-- wxo-external-agent/README.md | 80 +++++++++++++----------- 6 files changed, 169 insertions(+), 116 deletions(-) diff --git a/README.md b/README.md index 5040e88..e70baa6 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,13 @@ IBM Software Hub offered custom application capablity in 5.3, the purpose of the git repo is to host the sample applications for end user to download and try out. -The repo contains collection of custom sample apps that can be deployed into software hub default dataplane, each folder contains one sample app and README instructions for deployment +The repo contains collection of custom sample apps that can be deployed into dataplane/phsical location, each folder contains one sample app and README instructions for deployment ### Pre-requisites to deploy sample applications -Custom Apps is built on top of remote dataplanes concept. So, before deploying sample applications users need to have dataplanes setup. -refer [this doc](https://www.ibm.com/docs/en/software-hub/5.2.x?topic=installing-setting-up-remote-physical-location) to understand concept of remote dataplane and physical locations +Custom Apps is built on top of remote dataplanes feature. refer [this doc](https://www.ibm.com/docs/en/software-hub/5.2.x?topic=installing-setting-up-remote-physical-location) to understand concept of remote dataplane and physical locations -`default dataplane` is a remote dataplane that resides on a regular software hub cluster. for setting up default dataplane, the following component are required: +`default dataplane` is a dataplane that resides locally on a regular software hub cluster, that are designated for deploying custom apps. for setting up default dataplane, the following component are required: - Software Hub Scheduling Service refer [this doc](https://www.ibm.com/docs/en/software-hub/5.2.x?topic=cluster-installing-shared-components) for how to install scheduling service as cluster component @@ -22,3 +21,15 @@ To enable default dataplane using cpd-cli: 3. Run `cpd-cli manage enable-premuim-features --license_acceptance=true --features=enable_rdp --operator_ns= --instance_ns= --scheduler_ns=` 4. Create two namespaces mgmt and workload(wl). 5. Run `cpd-cli manage enable-default-dataplane --instance_ns=zen --management_ns=mgmt --workload_ns=wl` this command will create a default physical location - `default-pl` and a default dataplane - `default-dp`. + +overview of custom applocations included in this example, for demostating application types supported +|Name|Application Type|Folder|| +|:---|:---|:---|:---| +| code engine app | dockerfile | [code-engine-app](code-engine-app/README.md) | example application used for deploying into ibm cloud code engine | +| hello world | dockerfile | [hello-world](hello-world/README.md) | the "hello world" application invoked as an api endpoint | +| mcp gateway forge | template, dockerfile | [mcp-gateway-forge](mcp-gateway-forge/README.md) | Proxy and MCP Registry that federates MCP and REST services | +| qna rag chatbot | dockerfile | [qna_rag_chatbot](qna_rag_chatbot/README.md) | chatbot that can answer questions using RAG | +| ruby hello world | template | [ruby-hello-world](ruby-hello-world/README.md) | the "hello world" application written in ruby with web UI | +| wxo external agent| dockerfile | [wxo-external-agent](wxo-external-agent/README.md)| provides chat completions api that can be used as wxo external agent | + + there is also limited support for "kube yaml" apps, similar to what regular helm chart wraps up (limited to plain kube core/v1 and apps/v1 resources etc), examples are not included here. \ No newline at end of file diff --git a/code-engine-app/README.md b/code-engine-app/README.md index b526587..24456d0 100644 --- a/code-engine-app/README.md +++ b/code-engine-app/README.md @@ -1,15 +1,15 @@ -# Deploy code engine app to software hub default dataplane +# Deploy code engine app to software hub dataplane [code engine app](code-engine-handson-sample-app) is an example application used for deploying into ibm cloud code engine, the application interacts with ibm cloud object storage service, providing an UI interface for populating bucket created under object storage service. the same application can be deployed into software hub default dataplane as well - before deploying this sample app, you would need to create object storage service in ibm cloud, create a test bucket and collect the following values: -``` -BUCKETNAME : Bucket Name of IBM Object Storage -COS_ENDPOINT : ENDPOINT of IBM Object Storage, i.e. s3..cloud-object-storage.appdomain.cloud -COS_APIKEY : API Key of IBM Object Storage, this is your ibm cloud api key that has access to object storage service -COS_RESOURCE_INSTANCE_ID : resource instance ID of IBM Object Storage, you may get the instance id from object store instance CRN, it is the UUID that starts after the last single colon and ends before the final double colon -TESTVALUE: of anything to write into object store bucket -``` + ``` + BUCKETNAME : Bucket Name of IBM Object Storage + COS_ENDPOINT : ENDPOINT of IBM Object Storage, i.e. s3..cloud-object-storage.appdomain.cloud + COS_APIKEY : API Key of IBM Object Storage, this is your ibm cloud api key that has access to object storage service + COS_RESOURCE_INSTANCE_ID : resource instance ID of IBM Object Storage, you may get the instance id from object store instance CRN, it is the UUID that starts after the last single colon and ends before the final double colon + TESTVALUE: of anything to write into object store bucket + ``` - checkout the [pre-requisites](../README.md#pre-requisites-to-deploy-sample-applications) required before deploying this application into default dataplane ### Steps to deploy code-engine-app @@ -17,59 +17,60 @@ TESTVALUE: of anything to write into object store bucket 1. Run `create-dockerfile-application` command inside the cpd-cli binary to deploy the app 2. Run `./cpd-cli manage create-dockerfile-application --help` to know more about other options available. 3. Run the create-dockerfile-application command - -``` -./cpd-cli manage create-dockerfile-application \ ---instance_ns=zen \ ---app_name=code-engine-app \ ---app_port=3000 \ ---tls_enabled=false \ ---repo_url=https://github.com/IBM/swhub-custom-app-samples.git \ ---repo_token= \ ---repo_app_dir=code-engine-app/code-engine-handson-sample-app \ ---app_envs='[{"name":"BUCKETNAME","value":""},{"name":"TESTVALUE","value":"mytest"},{"name":"COS_ENDPOINT","value":"s3..cloud-object-storage.appdomain.cloud"},{"name":"COS_APIKEY","value":""},{"name":"COS_RESOURCE_INSTANCE_ID","value":""},{"name":"HOME", "value":"/tmp"}]' \ ---cpu=400m \ ---memory=200Mi \ ---cpu_limit=500m \ ---memory_limit=400Mi -``` + ``` + ./cpd-cli manage create-dockerfile-application \ + --instance_ns=zen \ + --app_name=code-engine-app \ + --app_port=3000 \ + --tls_enabled=false \ + --repo_url=https://github.com/IBM/swhub-custom-app-samples.git \ + --repo_token= \ + --repo_app_dir=code-engine-app/code-engine-handson-sample-app \ + --app_envs='[{"name":"BUCKETNAME","value":""},{"name":"TESTVALUE","value":"mytest"},{"name":"COS_ENDPOINT","value":"s3..cloud-object-storage.appdomain.cloud"},{"name":"COS_APIKEY","value":""},{"name":"COS_RESOURCE_INSTANCE_ID","value":""},{"name":"HOME", "value":"/tmp"}]' \ + --cpu=400m \ + --memory=200Mi \ + --cpu_limit=500m \ + --memory_limit=400Mi + ``` 4. If you see this error in step 5 `-build` pod -``` -Defaulted container "docker-build" out of: docker-build, git-clone (init), manage-dockerfile (init) -time="2025-10-30T23:58:57Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled" -I1030 23:58:57.938443 1 defaults.go:112] Defaulting to storage driver "overlay" with options [mountopt=metacopy=on]. -Caching blobs under "/var/cache/blobs". + ``` + Defaulted container "docker-build" out of: docker-build, git-clone (init), manage-dockerfile (init) + time="2025-10-30T23:58:57Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled" + I1030 23:58:57.938443 1 defaults.go:112] Defaulting to storage driver "overlay" with options [mountopt=metacopy=on]. + Caching blobs under "/var/cache/blobs". + + Pulling image node:17.4 ... + Resolving "node" using unqualified-search registries (/var/run/configs/openshift.io/build-system/registries.conf) + Trying to pull registry.redhat.io/node:17.4... + Trying to pull registry.access.redhat.com/node:17.4... + Trying to pull quay.io/node:17.4... + Trying to pull docker.io/library/node:17.4... + time="2025-10-30T23:59:31Z" level=warning msg="Failed, retrying in 1s ... (1/3). Error: initializing source docker://node:17.4: reading manifest 17.4 in docker.io/library/node: toomanyrequests: You have reached your unauthenticated pull rate limit. https://www.docker.com/increase-rate-limit"` + ``` -Pulling image node:17.4 ... -Resolving "node" using unqualified-search registries (/var/run/configs/openshift.io/build-system/registries.conf) -Trying to pull registry.redhat.io/node:17.4... -Trying to pull registry.access.redhat.com/node:17.4... -Trying to pull quay.io/node:17.4... -Trying to pull docker.io/library/node:17.4... -time="2025-10-30T23:59:31Z" level=warning msg="Failed, retrying in 1s ... (1/3). Error: initializing source docker://node:17.4: reading manifest 17.4 in docker.io/library/node: toomanyrequests: You have reached your unauthenticated pull rate limit. https://www.docker.com/increase-rate-limit"` -``` -Path the `pull-secret` with public docker username and password -``` -# DOCKER_CONFIG=$(echo -n 'username:password' | base64 -w0) -oc set data secret/pull-secret -n openshift-config --from-literal=.dockerconfigjson="{\"auths\":{\"docker.io\":{\"auth\":\"$DOCKER_CONFIG\"}}}" -secret/pull-secret data updated -``` + Path the `pull-secret` with public docker username and password + ``` + # DOCKER_CONFIG=$(echo -n 'username:password' | base64 -w0) + oc set data secret/pull-secret -n openshift-config --from-literal=.dockerconfigjson="{\"auths\":{\"docker.io\":{\"auth\":\"$DOCKER_CONFIG\"}}}" + secret/pull-secret data updated + ``` 5. check pods in workload namespace -``` -# oc get po -n wl -NAME READY STATUS RESTARTS AGE -final-code-engine-app-j5itik3ikksx-1-build 0/1 Completed 0 6m32s -final-code-engine-app-j5itik3ikksx-5f79744d79-75gpk 1/1 Running 0 3m49s -``` -6. update application proxy config - copy `code-engine-app.conf.yaml` in this folder to `cpd-cli-workspace/olm-utils-workspace/work/` -``` -./cpd-cli manage update-custom-application-proxy-config \ ---instance_ns=zen \ ---app_name=code-engine-app \ ---app_run_id= \ ---app_proxy_config_yaml=/tmp/work/code-engine-app.conf.yaml -``` + ``` + # oc get po -n wl + NAME READY STATUS RESTARTS AGE + final-code-engine-app-j5itik3ikksx-1-build 0/1 Completed 0 6m32s + final-code-engine-app-j5itik3ikksx-5f79744d79-75gpk 1/1 Running 0 3m49s + ``` + +6. update application proxy config - copy `code-engine-app.conf.yaml` in this folder to `cpd-cli-workspace/olm-utils-workspace/work/` + ``` + ./cpd-cli manage update-custom-application-proxy-config \ + --instance_ns=zen \ + --app_name=code-engine-app \ + --app_run_id= \ + --app_proxy_config_yaml=/tmp/work/code-engine-app.conf.yaml + ``` 7. Check the application running at `https://zen-route/physical_location//-/` diff --git a/hello-world/README.md b/hello-world/README.md index df692a8..594e75e 100644 --- a/hello-world/README.md +++ b/hello-world/README.md @@ -1,4 +1,4 @@ -# Deploy hello-world application to software hub default dataplane +# Deploy hello-world application to software hub dataplane hello-world is an api endpoint that would respond with "hello-world" when invoked from software hub default dataplane diff --git a/mcp-gateway-forge/README.md b/mcp-gateway-forge/README.md index 6170d89..a5a44e9 100644 --- a/mcp-gateway-forge/README.md +++ b/mcp-gateway-forge/README.md @@ -1,4 +1,4 @@ -# deploy mcp-context-forge app to software hub default dataplane +# deploy mcp-context-forge app to software hub dataplane [ContextForge MCP Gateway](https://github.com/IBM/mcp-context-forge) is a feature-rich gateway, proxy and MCP Registry that federates MCP and REST services - unifying discovery, auth, rate-limiting, observability, virtual servers, multi-transport protocols, and an optional Admin UI into one clean endpoint for your AI clients @@ -29,32 +29,52 @@ Checkout the [pre-requisites](../README.md#pre-requisites-to-deploy-sample-appli --dockerfile=Containerfile \ --app_envs_json=/tmp/work/app-envs-json-sqlite.json \ --pvc_info={"size":"2Gi","mount_path":"/data"} \ - --app_proxy_config_yaml=/tmp/work/mcp-gateway-forge.conf.yaml \ --cpu=400m \ --memory=200Mi \ --cpu_limit=500m \ --memory_limit=400Mi ``` +- check that the pod is in running status: + ``` + mcp-context-forge-sqlite-tcv6isrcslka-57bcbb95b-dshrl 1/1 Running + ``` + +- update application proxy config - copy `mcp-gateway-forge.conf.yaml` in this folder to `cpd-cli-workspace/olm-utils-workspace/work/` + ``` + ./cpd-cli manage update-custom-application-proxy-config \ + --instance_ns=zen \ + --app_name= mcp-context-forge-sqlite \ + --app_run_id= \ + --app_proxy_config_yaml=mcp-gateway-forge.conf.yaml + ``` + ### deploy mcp-context-forge with postgres database: #### deploy postgresql - download postgresql template tar - ``` + ``` download postgresql.template.tgz to cpd-cli-workspace/olm-utils-workspace/work/postgesql.template.tgz - ``` + ``` - run following cpd-cli command: ``` ./cpd-cli manage create-oc-template-application --instance_ns=zen \ - --app_name=postgresql-mcp-context-forge \ - --app_tar_file=/tmp/work/postgesql.template.tgz \ - --cpu=400m \ - --memory=200Mi \ - --cpu_limit=500m \ - --memory_limit=400Mi + --app_name=postgresql-mcp-context-forge \ + --app_tar_file=/tmp/work/postgesql.template.tgz \ + --cpu=400m \ + --memory=200Mi \ + --cpu_limit=500m \ + --memory_limit=400Mi + ``` + + - check that the pod is in running state: + ``` + # oc get po -n wl | grep postgres + postgresql-mcp-context-forge-1-g4ld7 1/1 Running ``` + #### deploy mcp-context-forge - create app-envs-json.json: @@ -73,9 +93,22 @@ Checkout the [pre-requisites](../README.md#pre-requisites-to-deploy-sample-appli --repo_branch=main \ --dockerfile=Containerfile \ --app_envs_json=/tmp/work/app-envs-json-postgresql.json \ - --app_proxy_config_yaml=/tmp/work/mcp-gateway-forge.conf.yaml \ --cpu=400m \ --memory=200Mi \ --cpu_limit=500m \ --memory_limit=400Mi ``` + - check that the pod is in running status: + ``` + mcp-context-forge-postgresql-78bib026k314-57bcbb95b-dshrl 1/1 Running + ``` + - update application proxy config - copy `mcp-gateway-forge.conf.yaml` in this folder to `cpd-cli-workspace/olm-utils-workspace/work/` + ``` + ./cpd-cli manage update-custom-application-proxy-config \ + --instance_ns=zen \ + --app_name= mcp-context-forge-postgresql \ + --app_run_id= \ + --app_proxy_config_yaml=mcp-gateway-forge.conf.yaml + ``` + + #### application available at `https://zen-route/physical_location/default-pl//admin` diff --git a/qna_rag_chatbot/README.md b/qna_rag_chatbot/README.md index 97f1d19..fc0f801 100644 --- a/qna_rag_chatbot/README.md +++ b/qna_rag_chatbot/README.md @@ -1,4 +1,4 @@ -# Deploy qna chatbot application to software hub default dataplane +# Deploy qna chatbot application to software hub dataplane [Q&A with RAG accelerator](Industry-Accelerators/watsonx.ai/QnA_chatbot_app/readme.md) is Sample Streamlit app that allows a user to ask questions about a given corpus of documents which are answered using a Retrieval Augmented Generation (RAG) approach, app is cloned from [here](https://github.com/IBM/Industry-Accelerators/tree/master/watsonx.ai/QnA_chatbot_app) @@ -10,12 +10,14 @@ this is the instruction doc for deploying the app into software hub default data 1. Update `QNA_RAG_DEPLOYMENT_URL` and `QNA_RAG_SAAS_IAM_APIKEY` from your deployment environment in qna_rag_chatbot/Industry-Accelerators/watsonx.ai/QnA_chatbot_app/.env 2. Run the follwing create-dockerfile-application command ``` -./cpd-cli manage create-dockerfile-application --instance_ns= --app_name=chatbot --app_port=8080 --app_port_tls=false --repo_url=https://github.com/IBM/swhub-custom-app-samples.git --repo_token= --repo_branch= --repo_app_dir=qna_rag_chatbot/Industry-Accelerators/watsonx.ai/QnA_chatbot_app --cpu=400m --memory=200Mi --cpu_limit=500m --memory_limit=400Mi +./cpd-cli manage create-dockerfile-application --instance_ns= --app_name=qna-rag-chatbot --app_port=8080 --app_port_tls=false --repo_url=https://github.com/IBM/swhub-custom-app-samples.git --repo_token= --repo_branch= --repo_app_dir=qna_rag_chatbot/Industry-Accelerators/watsonx.ai/QnA_chatbot_app --cpu=400m --memory=200Mi --cpu_limit=500m --memory_limit=400Mi ``` 3. Ensure the pods are running in the workload namespace ``` -ps-chatbot-demo-l66n2b4a5tra-1-build 0/1 Completed 0 5d -ps-chatbot-demo-l66n2b4a5tra-7b75f9d697-s8hqb 1/1 Running 0 5d -ps-chatbot-jdsgxjtix71p-6bf7b7c4f7-mz78g 1/1 Running 0 8d -ps-chatbot-three-vjzbpxir2vqo-79869dd7cf-m67xd 1/1 Running 0 8d +qna-rag-chatbot-l66n2b4a5tra-1-build 0/1 Completed 0 5d +qna-rag-chatbot-l66n2b4a5tra-7b75f9d697-s8hqb 1/1 Running 0 5d +qna-rag-chatbot-jdsgxjtix71p-6bf7b7c4f7-mz78g 1/1 Running 0 8d +qna-rag-chatbot-three-vjzbpxir2vqo-79869dd7cf-m67xd 1/1 Running 0 8d ``` + +#### application available at `https://zen-route/physical_location/default-pl//` diff --git a/wxo-external-agent/README.md b/wxo-external-agent/README.md index 657a8be..c677602 100644 --- a/wxo-external-agent/README.md +++ b/wxo-external-agent/README.md @@ -1,4 +1,4 @@ -# Deploy wxo adk external-agent to software hub default dataplane +# Deploy wxo adk external-agent to software hub dataplane [Wxo External Agent](watsonx-orchestrate-developer-toolkit/external_agent/examples/langgraph_python/README.md) is an example app that provides chat completions api that can be used as an external agent in watson orchestrate, it interacts with ai service endpoints hosted on ibm cloud watsonx service. app is cloned from [here](https://github.com/watson-developer-cloud/watsonx-orchestrate-developer-toolkit/tree/main/external_agent/examples/langgraph_python) @@ -9,46 +9,52 @@ this is the instruction doc for deploying the app into software hub default data - checkout the [pre-requisites](../README.md#pre-requisites-to-deploy-sample-applications) required before deploying this application into default dataplane -#### Steps to deploy ruby-hello-world +#### Steps to deploy ruby-hello-world 1. Change to the work directory inside the cpd-cli binary: -``` -cd cpd-cli-workspace/olm-utils-workspace/work/ -``` -3. Create a new YAML file: -``` -touch app-proxy-config.yaml -``` -4. Copy the contents from the provided file in this folder and paste them into app-proxy-config.yaml. -5. Go back to the cpd-cli directory: -``` -cd ../../.. -``` + ``` + cd cpd-cli-workspace/olm-utils-workspace/work/ + ``` + +2. Create a new YAML file: + ``` + touch app-proxy-config.yaml + ``` +3. Copy the contents from the provided file in this folder and paste them into app-proxy-config.yaml. +4. Go back to the cpd-cli directory: + ``` + cd ../../.. + ``` 5. Run the create-dockerfile-application command: -``` -./cpd-cli manage create-dockerfile-application --instance_ns=zen --app_name=wxo-external-agent --app_port=8080 --app_port_tls=false --repo_url=https://github.com/IBM/swhub-custom-app-samples.git --repo_token= --repo_branch=main --repo_app_dir=wxo-external-agent/watsonx-orchestrate-developer-toolkit/external_agent/examples/langgraph_python --app_envs='[{"name":"WATSONX_SPACE_ID","value":""},{"name":"WATSONX_API_KEY","value":""}]' --app_proxy_config_yaml='/tmp/work/app-proxy-config.yaml' --cpu=400m --memory=200Mi --cpu_limit=500m --memory_limit=400Mi -``` - -6. Check the pods in workload namespace - -``` -oc get po -n wl | grep external-agent -wxo-external-agent-h4yc75nkwi2w-1-build 0/1 Completed 0 4m2s -wxo-external-agent-h4yc75nkwi2w-7fdb57bb57-sx8vk 1/1 Running 0 2m25s -``` + ``` + ./cpd-cli manage create-dockerfile-application --instance_ns=zen --app_name=wxo-external-agent --app_port=8080 --app_port_tls=false --repo_url=https://github.com/IBM/swhub-custom-app-samples.git --repo_token= --repo_branch=main --repo_app_dir=wxo-external-agent/watsonx-orchestrate-developer-toolkit/external_agent/examples/langgraph_python --app_envs='[{"name":"WATSONX_SPACE_ID","value":""},{"name":"WATSONX_API_KEY","value":""}]' --app_proxy_config_yaml='/tmp/work/app-proxy-config.yaml' --cpu=400m --memory=200Mi --cpu_limit=500m --memory_limit=400Mi + ``` +6. Check the pods in workload namespace + ``` + oc get po -n wl | grep external-agent + wxo-external-agent-h4yc75nkwi2w-1-build 0/1 Completed 0 4m2s + wxo-external-agent-h4yc75nkwi2w-7fdb57bb57-sx8vk 1/1 Running 0 2m25s + ``` +7. Update application proxy config - copy `app-proxy-config.yaml` in this folder to `cpd-cli-workspace/olm-utils-workspace/work/` + ``` + ./cpd-cli manage update-custom-application-proxy-config \ + --instance_ns=zen \ + --app_name=wxo-external-agent \ + --app_run_id= \ + --app_proxy_config_yaml=/tmp/work/app-proxy-config.yaml + ``` #### application available at `https://zen-route/physical_location/default-pl//docs` -To `try it out`, use this `request body`: -``` -{ - "model": "ibm/granite-3-3-8b-instruct", - "context": {}, - "messages": [ +To try it out, use this request body: + { - "role": "assistant", - "content": "how to use foundational models?" + "model": "ibm/granite-3-3-8b-instruct", + "context": {}, + "messages": [ + { + "role": "assistant", + "content": "how to use foundational models?" + } + ], + "stream": false } - ], - "stream": false -} -```