diff --git a/scripts/import-ai-lab-samples b/scripts/import-ai-lab-samples index ac0610fd..0d7780e4 100755 --- a/scripts/import-ai-lab-samples +++ b/scripts/import-ai-lab-samples @@ -20,8 +20,10 @@ fi (cd $SAMPLE_DIR; git checkout $BRANCH; git pull) - cd $SAMPLE_DIR +# get readme to source component doc +cp -r $SAMPLE_DIR/README.md $SKELETON_DIR/techdoc/docs/source-component.md + for f in */; do if [ -d "$f" ]; then # $f is a directory @@ -36,14 +38,7 @@ for f in */; do cp -r $ROOT_DIR/skeleton/template-card-techdocs/base/mkdocs.yml $DEST/mkdocs.yml cp $ROOT_DIR/skeleton/template.yaml $DEST/template.yaml - - cp -r $ROOT_DIR/skeleton/techdoc/docs $DEST/content/docs - cp -r $ROOT_DIR/skeleton/techdoc/mkdocs.yml $DEST/content/mkdocs.yml - - # get readme to source component doc - cp -r $SAMPLE_DIR/README.md $DEST/content/docs/source-component.md - cp -r $ROOT_DIR/skeleton/source-repo/.tekton/README.md $DEST/content/docs/pipelines.md - + # get default env variables source $SCRIPTDIR/envs/base diff --git a/scripts/update-tekton-definition b/scripts/update-tekton-definition index 05c597ee..4457fb97 100755 --- a/scripts/update-tekton-definition +++ b/scripts/update-tekton-definition @@ -36,10 +36,10 @@ SRC_TEKTON=$ROOTDIR/skeleton/source-repo/.tekton rm -rf $SRC_TEKTON mkdir -p $SRC_TEKTON cp -r $TEMPDIR/$REPONAME/pac/source-repo/. $SRC_TEKTON - +cp $SRC_TEKTON/README.md $ROOTDIR/skeleton/techdoc/docs/pipelines.md rm -rf $TEMPDIR -for prun in $SRC_TEKTON/*.yaml $GITOPS_TEKTON/*.yaml; do +for prun in $SRC_TEKTON/*.yaml; do echo "Labels for $prun" add-backstage-labels $prun done diff --git a/templates/audio-to-text/content/docs/pipelines.md b/skeleton/techdoc/docs/pipelines.md similarity index 100% rename from templates/audio-to-text/content/docs/pipelines.md rename to skeleton/techdoc/docs/pipelines.md diff --git a/templates/audio-to-text/content/docs/source-component.md b/skeleton/techdoc/docs/source-component.md similarity index 100% rename from templates/audio-to-text/content/docs/source-component.md rename to skeleton/techdoc/docs/source-component.md diff --git a/skeleton/template.yaml b/skeleton/template.yaml index 6d05fec9..0f337fce 100644 --- a/skeleton/template.yaml +++ b/skeleton/template.yaml @@ -255,6 +255,13 @@ spec: input: url: ./content targetPath: source + # Renders all of the template variables into the techdocs and adds them to the source repo + - id: fetch-skeleton-docs + name: Fetch Skeleton Techdocs + action: fetch:template + input: + url: ../../skeleton/techdoc + targetPath: source values: name: ${{ parameters.name }} appSummary: ${APP_SUMMARY} diff --git a/templates/audio-to-text/content/docs/gitops-application.md b/templates/audio-to-text/content/docs/gitops-application.md deleted file mode 100644 index b43fa417..00000000 --- a/templates/audio-to-text/content/docs/gitops-application.md +++ /dev/null @@ -1,15 +0,0 @@ -# ai-lab-template-gitops - -# Gitops Repo Patterns - -This repository contains an HTTP Gitops repository format component for use as the AI-Lab Gitops template. - -## HTTP - -This contains a deployment with the following characteristics: - -**Model service image** `${{ values.modelServiceContainer }}` **listening on port** `${{ values.modelServicePort }}`. - -**App interface image** `${{ values.appContainer }}` **listening on port** `${{ values.appPort }}` for service and routing. - -This matches the current AI-Lab software template default deployment. \ No newline at end of file diff --git a/templates/audio-to-text/content/docs/images/access-openshift-ai.png b/templates/audio-to-text/content/docs/images/access-openshift-ai.png deleted file mode 100644 index 361a3b18..00000000 Binary files a/templates/audio-to-text/content/docs/images/access-openshift-ai.png and /dev/null differ diff --git a/templates/audio-to-text/content/docs/images/access-workbench.png b/templates/audio-to-text/content/docs/images/access-workbench.png deleted file mode 100644 index f5702a36..00000000 Binary files a/templates/audio-to-text/content/docs/images/access-workbench.png and /dev/null differ diff --git a/templates/audio-to-text/content/docs/images/data-science-projects.png b/templates/audio-to-text/content/docs/images/data-science-projects.png deleted file mode 100644 index 20025ca7..00000000 Binary files a/templates/audio-to-text/content/docs/images/data-science-projects.png and /dev/null differ diff --git a/templates/audio-to-text/content/docs/images/open-terminal.png b/templates/audio-to-text/content/docs/images/open-terminal.png deleted file mode 100644 index b3330cb4..00000000 Binary files a/templates/audio-to-text/content/docs/images/open-terminal.png and /dev/null differ diff --git a/templates/audio-to-text/content/docs/images/workbench-name.png b/templates/audio-to-text/content/docs/images/workbench-name.png deleted file mode 100644 index ccbdc160..00000000 Binary files a/templates/audio-to-text/content/docs/images/workbench-name.png and /dev/null differ diff --git a/templates/audio-to-text/content/docs/index.md b/templates/audio-to-text/content/docs/index.md deleted file mode 100644 index 40dd4c4d..00000000 --- a/templates/audio-to-text/content/docs/index.md +++ /dev/null @@ -1,20 +0,0 @@ -# AI Software Template - -This application, ${{ values.name }}, is created from an AI Software Template. These software templates create a new source code repository as well as a new GitOps deployment repository. - -The chosen sample source applicable is included in the source code repository. - -## Sample Source Application - -${{ values.appSummary }} - -## Repositories - -The source code for your application can be found in [${{ values.srcRepoURL }} ](${{ values.srcRepoURL }} ). - -The GitOps repository, which contains the Kubernetes manifests for the application can be found in -[${{ values.repoURL }} ](${{ values.repoURL }} ). - -## Application namespaces - -The default application is found in the namespace: **`${{ values.namespace }}`**. Applications can be deployed into their own unique namespace or multiple software templates can generate numerous applications into the same namespace. \ No newline at end of file diff --git a/templates/audio-to-text/content/docs/rhoai.md b/templates/audio-to-text/content/docs/rhoai.md deleted file mode 100644 index 81a3b527..00000000 --- a/templates/audio-to-text/content/docs/rhoai.md +++ /dev/null @@ -1,48 +0,0 @@ -# Running Samples in OpenShift AI - -This document outlines how you can build and run your sample applications within an OpenShift AI workbench. - -## Prerequisites - -- Red Hat OpenShift AI installed, and `Create workbench for OpenShift AI` selected during component creation. -- `oc` cli installed - - `oc` can be downloaded from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/ -- Permissions to run `oc port-forward` on the cluster, specifically an account with the following roles: - - `get`, `create`, and `list` for the `pods/portforward` subresource - -## Running the Sample - -1) On the Console, click the square "apps" icon on the upper-right corner (next to the notifications icon). `Openshift AI` is listed in the drop-down list. - -![image](./images/access-openshift-ai.png) - -2) Go to the `Data Science Projects` section and access your application's project named `${{ values.namespace }}`. - -![image](./images/data-science-projects.png) - -3) Access the `workbench` named `${{ values.name }}-notebook`. - -![image](./images/access-workbench.png) - -4) Go to `File->Open` and select `Terminal`. - -![image](./images/open-terminal.png) - -5) In the terminal, run `cd ${{ values.name }}` to navigate to your sample app's directory. - -6) Run `pip install --upgrade -r requirements.txt` to install the dependencies for your application. - -7) Run `${{ values.appRunCommand }}` to run the sample in the workbench. - -## Accessing the Sample - -With the sample app now running, complete the following steps to access the sample app in your browser: - -1) Go to the OpenShift AI dashboard, and find the name of your workbench. -![image](./images/workbench-name.png) - -2) In a terminal window on your machine, run `oc get pods -l app=`. This retrieves the name of the pod where the workbench is running. - -3) Run `oc port-forward ${{ values.appPort }}` to port forward the sample application's port to your local machine. - -4) Finally, visit `http://localhost:${{ values.appPort }}` in your browser to access the application. \ No newline at end of file diff --git a/templates/audio-to-text/content/mkdocs.yml b/templates/audio-to-text/content/mkdocs.yml deleted file mode 100644 index bb44658e..00000000 --- a/templates/audio-to-text/content/mkdocs.yml +++ /dev/null @@ -1,11 +0,0 @@ -site_name: 'Documentation' - -nav: - - Home: index.md - - Source Component: source-component.md - - Pipelines: pipelines.md - - GitOps Application: gitops-application.md - - OpenShift AI: rhoai.md - -plugins: - - techdocs-core \ No newline at end of file diff --git a/templates/audio-to-text/template.yaml b/templates/audio-to-text/template.yaml index 5cb7f0b6..26fda98e 100644 --- a/templates/audio-to-text/template.yaml +++ b/templates/audio-to-text/template.yaml @@ -192,6 +192,13 @@ spec: input: url: ./content targetPath: source + # Renders all of the template variables into the techdocs and adds them to the source repo + - id: fetch-skeleton-docs + name: Fetch Skeleton Techdocs + action: fetch:template + input: + url: ../../skeleton/techdoc + targetPath: source values: name: ${{ parameters.name }} appSummary: An AI-enabled audio transcription streamlit application. Upload an audio file to be transcribed. diff --git a/templates/chatbot/content/docs/gitops-application.md b/templates/chatbot/content/docs/gitops-application.md deleted file mode 100644 index b43fa417..00000000 --- a/templates/chatbot/content/docs/gitops-application.md +++ /dev/null @@ -1,15 +0,0 @@ -# ai-lab-template-gitops - -# Gitops Repo Patterns - -This repository contains an HTTP Gitops repository format component for use as the AI-Lab Gitops template. - -## HTTP - -This contains a deployment with the following characteristics: - -**Model service image** `${{ values.modelServiceContainer }}` **listening on port** `${{ values.modelServicePort }}`. - -**App interface image** `${{ values.appContainer }}` **listening on port** `${{ values.appPort }}` for service and routing. - -This matches the current AI-Lab software template default deployment. \ No newline at end of file diff --git a/templates/chatbot/content/docs/images/access-openshift-ai.png b/templates/chatbot/content/docs/images/access-openshift-ai.png deleted file mode 100644 index 361a3b18..00000000 Binary files a/templates/chatbot/content/docs/images/access-openshift-ai.png and /dev/null differ diff --git a/templates/chatbot/content/docs/images/access-workbench.png b/templates/chatbot/content/docs/images/access-workbench.png deleted file mode 100644 index f5702a36..00000000 Binary files a/templates/chatbot/content/docs/images/access-workbench.png and /dev/null differ diff --git a/templates/chatbot/content/docs/images/data-science-projects.png b/templates/chatbot/content/docs/images/data-science-projects.png deleted file mode 100644 index 20025ca7..00000000 Binary files a/templates/chatbot/content/docs/images/data-science-projects.png and /dev/null differ diff --git a/templates/chatbot/content/docs/images/open-terminal.png b/templates/chatbot/content/docs/images/open-terminal.png deleted file mode 100644 index b3330cb4..00000000 Binary files a/templates/chatbot/content/docs/images/open-terminal.png and /dev/null differ diff --git a/templates/chatbot/content/docs/images/workbench-name.png b/templates/chatbot/content/docs/images/workbench-name.png deleted file mode 100644 index ccbdc160..00000000 Binary files a/templates/chatbot/content/docs/images/workbench-name.png and /dev/null differ diff --git a/templates/chatbot/content/docs/index.md b/templates/chatbot/content/docs/index.md deleted file mode 100644 index 40dd4c4d..00000000 --- a/templates/chatbot/content/docs/index.md +++ /dev/null @@ -1,20 +0,0 @@ -# AI Software Template - -This application, ${{ values.name }}, is created from an AI Software Template. These software templates create a new source code repository as well as a new GitOps deployment repository. - -The chosen sample source applicable is included in the source code repository. - -## Sample Source Application - -${{ values.appSummary }} - -## Repositories - -The source code for your application can be found in [${{ values.srcRepoURL }} ](${{ values.srcRepoURL }} ). - -The GitOps repository, which contains the Kubernetes manifests for the application can be found in -[${{ values.repoURL }} ](${{ values.repoURL }} ). - -## Application namespaces - -The default application is found in the namespace: **`${{ values.namespace }}`**. Applications can be deployed into their own unique namespace or multiple software templates can generate numerous applications into the same namespace. \ No newline at end of file diff --git a/templates/chatbot/content/docs/pipelines.md b/templates/chatbot/content/docs/pipelines.md deleted file mode 100644 index bde693dd..00000000 --- a/templates/chatbot/content/docs/pipelines.md +++ /dev/null @@ -1,22 +0,0 @@ -# docker-build-ai-rhdh - -## Shared Git resolver model for shared pipeline and tasks - -This pipeline is used to create Containerfile based SSCS (Software Supply Chain Security) builds. The pipeline run by this runner clones the source, builds an image with SBOM (Software Bill of Materials), attests, and pushes these to the users image registry. - -Tasks references come from this [repository](https://github.com/redhat-ai-dev/rhdh-pipelines) `pac/pipelines` and the tasks are defined in `pac/tasks`. The tasks are referenced by URL using the git resolver in tekton. - -When the pipelines in this repository are updated, all future runs in existing pipelines are shared. - -A developer can override these tasks with a local copy and updated annotations. - -Example - -To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation. - -`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"` - -## Templates -These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo. - -The intent of the template is to fork this repository and update its use in the Developer Hub templates directory. diff --git a/templates/chatbot/content/docs/rhoai.md b/templates/chatbot/content/docs/rhoai.md deleted file mode 100644 index 81a3b527..00000000 --- a/templates/chatbot/content/docs/rhoai.md +++ /dev/null @@ -1,48 +0,0 @@ -# Running Samples in OpenShift AI - -This document outlines how you can build and run your sample applications within an OpenShift AI workbench. - -## Prerequisites - -- Red Hat OpenShift AI installed, and `Create workbench for OpenShift AI` selected during component creation. -- `oc` cli installed - - `oc` can be downloaded from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/ -- Permissions to run `oc port-forward` on the cluster, specifically an account with the following roles: - - `get`, `create`, and `list` for the `pods/portforward` subresource - -## Running the Sample - -1) On the Console, click the square "apps" icon on the upper-right corner (next to the notifications icon). `Openshift AI` is listed in the drop-down list. - -![image](./images/access-openshift-ai.png) - -2) Go to the `Data Science Projects` section and access your application's project named `${{ values.namespace }}`. - -![image](./images/data-science-projects.png) - -3) Access the `workbench` named `${{ values.name }}-notebook`. - -![image](./images/access-workbench.png) - -4) Go to `File->Open` and select `Terminal`. - -![image](./images/open-terminal.png) - -5) In the terminal, run `cd ${{ values.name }}` to navigate to your sample app's directory. - -6) Run `pip install --upgrade -r requirements.txt` to install the dependencies for your application. - -7) Run `${{ values.appRunCommand }}` to run the sample in the workbench. - -## Accessing the Sample - -With the sample app now running, complete the following steps to access the sample app in your browser: - -1) Go to the OpenShift AI dashboard, and find the name of your workbench. -![image](./images/workbench-name.png) - -2) In a terminal window on your machine, run `oc get pods -l app=`. This retrieves the name of the pod where the workbench is running. - -3) Run `oc port-forward ${{ values.appPort }}` to port forward the sample application's port to your local machine. - -4) Finally, visit `http://localhost:${{ values.appPort }}` in your browser to access the application. \ No newline at end of file diff --git a/templates/chatbot/content/docs/source-component.md b/templates/chatbot/content/docs/source-component.md deleted file mode 100644 index 6f00d1eb..00000000 --- a/templates/chatbot/content/docs/source-component.md +++ /dev/null @@ -1,9 +0,0 @@ -# AI-lab samples - -## Usage in AI-lab templates - -This repository is being used in [ai-lab-template](https://github.com/redhat-ai-dev/ai-lab-template) as component source code for users to start with. - -This is a copy of the ai lab sample apps source code. The master copy of those apps are under [ai-lab-recipes](https://github.com/containers/ai-lab-recipes) - -To pull in the latest changes, run `./pull-sample-app.sh`, and commit the changes. diff --git a/templates/chatbot/content/mkdocs.yml b/templates/chatbot/content/mkdocs.yml deleted file mode 100644 index bb44658e..00000000 --- a/templates/chatbot/content/mkdocs.yml +++ /dev/null @@ -1,11 +0,0 @@ -site_name: 'Documentation' - -nav: - - Home: index.md - - Source Component: source-component.md - - Pipelines: pipelines.md - - GitOps Application: gitops-application.md - - OpenShift AI: rhoai.md - -plugins: - - techdocs-core \ No newline at end of file diff --git a/templates/chatbot/template.yaml b/templates/chatbot/template.yaml index 9631168b..80bc7b51 100644 --- a/templates/chatbot/template.yaml +++ b/templates/chatbot/template.yaml @@ -215,6 +215,13 @@ spec: input: url: ./content targetPath: source + # Renders all of the template variables into the techdocs and adds them to the source repo + - id: fetch-skeleton-docs + name: Fetch Skeleton Techdocs + action: fetch:template + input: + url: ../../skeleton/techdoc + targetPath: source values: name: ${{ parameters.name }} appSummary: A Large Language Model (LLM)-enabled streamlit chat application. The bot replies with AI generated responses. diff --git a/templates/codegen/content/docs/gitops-application.md b/templates/codegen/content/docs/gitops-application.md deleted file mode 100644 index b43fa417..00000000 --- a/templates/codegen/content/docs/gitops-application.md +++ /dev/null @@ -1,15 +0,0 @@ -# ai-lab-template-gitops - -# Gitops Repo Patterns - -This repository contains an HTTP Gitops repository format component for use as the AI-Lab Gitops template. - -## HTTP - -This contains a deployment with the following characteristics: - -**Model service image** `${{ values.modelServiceContainer }}` **listening on port** `${{ values.modelServicePort }}`. - -**App interface image** `${{ values.appContainer }}` **listening on port** `${{ values.appPort }}` for service and routing. - -This matches the current AI-Lab software template default deployment. \ No newline at end of file diff --git a/templates/codegen/content/docs/images/access-openshift-ai.png b/templates/codegen/content/docs/images/access-openshift-ai.png deleted file mode 100644 index 361a3b18..00000000 Binary files a/templates/codegen/content/docs/images/access-openshift-ai.png and /dev/null differ diff --git a/templates/codegen/content/docs/images/access-workbench.png b/templates/codegen/content/docs/images/access-workbench.png deleted file mode 100644 index f5702a36..00000000 Binary files a/templates/codegen/content/docs/images/access-workbench.png and /dev/null differ diff --git a/templates/codegen/content/docs/images/data-science-projects.png b/templates/codegen/content/docs/images/data-science-projects.png deleted file mode 100644 index 20025ca7..00000000 Binary files a/templates/codegen/content/docs/images/data-science-projects.png and /dev/null differ diff --git a/templates/codegen/content/docs/images/open-terminal.png b/templates/codegen/content/docs/images/open-terminal.png deleted file mode 100644 index b3330cb4..00000000 Binary files a/templates/codegen/content/docs/images/open-terminal.png and /dev/null differ diff --git a/templates/codegen/content/docs/images/workbench-name.png b/templates/codegen/content/docs/images/workbench-name.png deleted file mode 100644 index ccbdc160..00000000 Binary files a/templates/codegen/content/docs/images/workbench-name.png and /dev/null differ diff --git a/templates/codegen/content/docs/index.md b/templates/codegen/content/docs/index.md deleted file mode 100644 index 40dd4c4d..00000000 --- a/templates/codegen/content/docs/index.md +++ /dev/null @@ -1,20 +0,0 @@ -# AI Software Template - -This application, ${{ values.name }}, is created from an AI Software Template. These software templates create a new source code repository as well as a new GitOps deployment repository. - -The chosen sample source applicable is included in the source code repository. - -## Sample Source Application - -${{ values.appSummary }} - -## Repositories - -The source code for your application can be found in [${{ values.srcRepoURL }} ](${{ values.srcRepoURL }} ). - -The GitOps repository, which contains the Kubernetes manifests for the application can be found in -[${{ values.repoURL }} ](${{ values.repoURL }} ). - -## Application namespaces - -The default application is found in the namespace: **`${{ values.namespace }}`**. Applications can be deployed into their own unique namespace or multiple software templates can generate numerous applications into the same namespace. \ No newline at end of file diff --git a/templates/codegen/content/docs/pipelines.md b/templates/codegen/content/docs/pipelines.md deleted file mode 100644 index bde693dd..00000000 --- a/templates/codegen/content/docs/pipelines.md +++ /dev/null @@ -1,22 +0,0 @@ -# docker-build-ai-rhdh - -## Shared Git resolver model for shared pipeline and tasks - -This pipeline is used to create Containerfile based SSCS (Software Supply Chain Security) builds. The pipeline run by this runner clones the source, builds an image with SBOM (Software Bill of Materials), attests, and pushes these to the users image registry. - -Tasks references come from this [repository](https://github.com/redhat-ai-dev/rhdh-pipelines) `pac/pipelines` and the tasks are defined in `pac/tasks`. The tasks are referenced by URL using the git resolver in tekton. - -When the pipelines in this repository are updated, all future runs in existing pipelines are shared. - -A developer can override these tasks with a local copy and updated annotations. - -Example - -To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation. - -`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"` - -## Templates -These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo. - -The intent of the template is to fork this repository and update its use in the Developer Hub templates directory. diff --git a/templates/codegen/content/docs/rhoai.md b/templates/codegen/content/docs/rhoai.md deleted file mode 100644 index 81a3b527..00000000 --- a/templates/codegen/content/docs/rhoai.md +++ /dev/null @@ -1,48 +0,0 @@ -# Running Samples in OpenShift AI - -This document outlines how you can build and run your sample applications within an OpenShift AI workbench. - -## Prerequisites - -- Red Hat OpenShift AI installed, and `Create workbench for OpenShift AI` selected during component creation. -- `oc` cli installed - - `oc` can be downloaded from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/ -- Permissions to run `oc port-forward` on the cluster, specifically an account with the following roles: - - `get`, `create`, and `list` for the `pods/portforward` subresource - -## Running the Sample - -1) On the Console, click the square "apps" icon on the upper-right corner (next to the notifications icon). `Openshift AI` is listed in the drop-down list. - -![image](./images/access-openshift-ai.png) - -2) Go to the `Data Science Projects` section and access your application's project named `${{ values.namespace }}`. - -![image](./images/data-science-projects.png) - -3) Access the `workbench` named `${{ values.name }}-notebook`. - -![image](./images/access-workbench.png) - -4) Go to `File->Open` and select `Terminal`. - -![image](./images/open-terminal.png) - -5) In the terminal, run `cd ${{ values.name }}` to navigate to your sample app's directory. - -6) Run `pip install --upgrade -r requirements.txt` to install the dependencies for your application. - -7) Run `${{ values.appRunCommand }}` to run the sample in the workbench. - -## Accessing the Sample - -With the sample app now running, complete the following steps to access the sample app in your browser: - -1) Go to the OpenShift AI dashboard, and find the name of your workbench. -![image](./images/workbench-name.png) - -2) In a terminal window on your machine, run `oc get pods -l app=`. This retrieves the name of the pod where the workbench is running. - -3) Run `oc port-forward ${{ values.appPort }}` to port forward the sample application's port to your local machine. - -4) Finally, visit `http://localhost:${{ values.appPort }}` in your browser to access the application. \ No newline at end of file diff --git a/templates/codegen/content/docs/source-component.md b/templates/codegen/content/docs/source-component.md deleted file mode 100644 index 6f00d1eb..00000000 --- a/templates/codegen/content/docs/source-component.md +++ /dev/null @@ -1,9 +0,0 @@ -# AI-lab samples - -## Usage in AI-lab templates - -This repository is being used in [ai-lab-template](https://github.com/redhat-ai-dev/ai-lab-template) as component source code for users to start with. - -This is a copy of the ai lab sample apps source code. The master copy of those apps are under [ai-lab-recipes](https://github.com/containers/ai-lab-recipes) - -To pull in the latest changes, run `./pull-sample-app.sh`, and commit the changes. diff --git a/templates/codegen/content/mkdocs.yml b/templates/codegen/content/mkdocs.yml deleted file mode 100644 index bb44658e..00000000 --- a/templates/codegen/content/mkdocs.yml +++ /dev/null @@ -1,11 +0,0 @@ -site_name: 'Documentation' - -nav: - - Home: index.md - - Source Component: source-component.md - - Pipelines: pipelines.md - - GitOps Application: gitops-application.md - - OpenShift AI: rhoai.md - -plugins: - - techdocs-core \ No newline at end of file diff --git a/templates/codegen/template.yaml b/templates/codegen/template.yaml index 62ad050d..bcce372b 100644 --- a/templates/codegen/template.yaml +++ b/templates/codegen/template.yaml @@ -215,6 +215,13 @@ spec: input: url: ./content targetPath: source + # Renders all of the template variables into the techdocs and adds them to the source repo + - id: fetch-skeleton-docs + name: Fetch Skeleton Techdocs + action: fetch:template + input: + url: ../../skeleton/techdoc + targetPath: source values: name: ${{ parameters.name }} appSummary: A Large Language Model (LLM)-enabled streamlit code generation application. This specialized bot helps with code related queries. diff --git a/templates/object-detection/content/docs/gitops-application.md b/templates/object-detection/content/docs/gitops-application.md deleted file mode 100644 index b43fa417..00000000 --- a/templates/object-detection/content/docs/gitops-application.md +++ /dev/null @@ -1,15 +0,0 @@ -# ai-lab-template-gitops - -# Gitops Repo Patterns - -This repository contains an HTTP Gitops repository format component for use as the AI-Lab Gitops template. - -## HTTP - -This contains a deployment with the following characteristics: - -**Model service image** `${{ values.modelServiceContainer }}` **listening on port** `${{ values.modelServicePort }}`. - -**App interface image** `${{ values.appContainer }}` **listening on port** `${{ values.appPort }}` for service and routing. - -This matches the current AI-Lab software template default deployment. \ No newline at end of file diff --git a/templates/object-detection/content/docs/images/access-openshift-ai.png b/templates/object-detection/content/docs/images/access-openshift-ai.png deleted file mode 100644 index 361a3b18..00000000 Binary files a/templates/object-detection/content/docs/images/access-openshift-ai.png and /dev/null differ diff --git a/templates/object-detection/content/docs/images/access-workbench.png b/templates/object-detection/content/docs/images/access-workbench.png deleted file mode 100644 index f5702a36..00000000 Binary files a/templates/object-detection/content/docs/images/access-workbench.png and /dev/null differ diff --git a/templates/object-detection/content/docs/images/data-science-projects.png b/templates/object-detection/content/docs/images/data-science-projects.png deleted file mode 100644 index 20025ca7..00000000 Binary files a/templates/object-detection/content/docs/images/data-science-projects.png and /dev/null differ diff --git a/templates/object-detection/content/docs/images/open-terminal.png b/templates/object-detection/content/docs/images/open-terminal.png deleted file mode 100644 index b3330cb4..00000000 Binary files a/templates/object-detection/content/docs/images/open-terminal.png and /dev/null differ diff --git a/templates/object-detection/content/docs/images/workbench-name.png b/templates/object-detection/content/docs/images/workbench-name.png deleted file mode 100644 index ccbdc160..00000000 Binary files a/templates/object-detection/content/docs/images/workbench-name.png and /dev/null differ diff --git a/templates/object-detection/content/docs/index.md b/templates/object-detection/content/docs/index.md deleted file mode 100644 index 40dd4c4d..00000000 --- a/templates/object-detection/content/docs/index.md +++ /dev/null @@ -1,20 +0,0 @@ -# AI Software Template - -This application, ${{ values.name }}, is created from an AI Software Template. These software templates create a new source code repository as well as a new GitOps deployment repository. - -The chosen sample source applicable is included in the source code repository. - -## Sample Source Application - -${{ values.appSummary }} - -## Repositories - -The source code for your application can be found in [${{ values.srcRepoURL }} ](${{ values.srcRepoURL }} ). - -The GitOps repository, which contains the Kubernetes manifests for the application can be found in -[${{ values.repoURL }} ](${{ values.repoURL }} ). - -## Application namespaces - -The default application is found in the namespace: **`${{ values.namespace }}`**. Applications can be deployed into their own unique namespace or multiple software templates can generate numerous applications into the same namespace. \ No newline at end of file diff --git a/templates/object-detection/content/docs/pipelines.md b/templates/object-detection/content/docs/pipelines.md deleted file mode 100644 index bde693dd..00000000 --- a/templates/object-detection/content/docs/pipelines.md +++ /dev/null @@ -1,22 +0,0 @@ -# docker-build-ai-rhdh - -## Shared Git resolver model for shared pipeline and tasks - -This pipeline is used to create Containerfile based SSCS (Software Supply Chain Security) builds. The pipeline run by this runner clones the source, builds an image with SBOM (Software Bill of Materials), attests, and pushes these to the users image registry. - -Tasks references come from this [repository](https://github.com/redhat-ai-dev/rhdh-pipelines) `pac/pipelines` and the tasks are defined in `pac/tasks`. The tasks are referenced by URL using the git resolver in tekton. - -When the pipelines in this repository are updated, all future runs in existing pipelines are shared. - -A developer can override these tasks with a local copy and updated annotations. - -Example - -To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation. - -`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"` - -## Templates -These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo. - -The intent of the template is to fork this repository and update its use in the Developer Hub templates directory. diff --git a/templates/object-detection/content/docs/rhoai.md b/templates/object-detection/content/docs/rhoai.md deleted file mode 100644 index 81a3b527..00000000 --- a/templates/object-detection/content/docs/rhoai.md +++ /dev/null @@ -1,48 +0,0 @@ -# Running Samples in OpenShift AI - -This document outlines how you can build and run your sample applications within an OpenShift AI workbench. - -## Prerequisites - -- Red Hat OpenShift AI installed, and `Create workbench for OpenShift AI` selected during component creation. -- `oc` cli installed - - `oc` can be downloaded from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/ -- Permissions to run `oc port-forward` on the cluster, specifically an account with the following roles: - - `get`, `create`, and `list` for the `pods/portforward` subresource - -## Running the Sample - -1) On the Console, click the square "apps" icon on the upper-right corner (next to the notifications icon). `Openshift AI` is listed in the drop-down list. - -![image](./images/access-openshift-ai.png) - -2) Go to the `Data Science Projects` section and access your application's project named `${{ values.namespace }}`. - -![image](./images/data-science-projects.png) - -3) Access the `workbench` named `${{ values.name }}-notebook`. - -![image](./images/access-workbench.png) - -4) Go to `File->Open` and select `Terminal`. - -![image](./images/open-terminal.png) - -5) In the terminal, run `cd ${{ values.name }}` to navigate to your sample app's directory. - -6) Run `pip install --upgrade -r requirements.txt` to install the dependencies for your application. - -7) Run `${{ values.appRunCommand }}` to run the sample in the workbench. - -## Accessing the Sample - -With the sample app now running, complete the following steps to access the sample app in your browser: - -1) Go to the OpenShift AI dashboard, and find the name of your workbench. -![image](./images/workbench-name.png) - -2) In a terminal window on your machine, run `oc get pods -l app=`. This retrieves the name of the pod where the workbench is running. - -3) Run `oc port-forward ${{ values.appPort }}` to port forward the sample application's port to your local machine. - -4) Finally, visit `http://localhost:${{ values.appPort }}` in your browser to access the application. \ No newline at end of file diff --git a/templates/object-detection/content/docs/source-component.md b/templates/object-detection/content/docs/source-component.md deleted file mode 100644 index 6f00d1eb..00000000 --- a/templates/object-detection/content/docs/source-component.md +++ /dev/null @@ -1,9 +0,0 @@ -# AI-lab samples - -## Usage in AI-lab templates - -This repository is being used in [ai-lab-template](https://github.com/redhat-ai-dev/ai-lab-template) as component source code for users to start with. - -This is a copy of the ai lab sample apps source code. The master copy of those apps are under [ai-lab-recipes](https://github.com/containers/ai-lab-recipes) - -To pull in the latest changes, run `./pull-sample-app.sh`, and commit the changes. diff --git a/templates/object-detection/content/mkdocs.yml b/templates/object-detection/content/mkdocs.yml deleted file mode 100644 index bb44658e..00000000 --- a/templates/object-detection/content/mkdocs.yml +++ /dev/null @@ -1,11 +0,0 @@ -site_name: 'Documentation' - -nav: - - Home: index.md - - Source Component: source-component.md - - Pipelines: pipelines.md - - GitOps Application: gitops-application.md - - OpenShift AI: rhoai.md - -plugins: - - techdocs-core \ No newline at end of file diff --git a/templates/object-detection/template.yaml b/templates/object-detection/template.yaml index fe9fc5fd..4d75e167 100644 --- a/templates/object-detection/template.yaml +++ b/templates/object-detection/template.yaml @@ -192,6 +192,13 @@ spec: input: url: ./content targetPath: source + # Renders all of the template variables into the techdocs and adds them to the source repo + - id: fetch-skeleton-docs + name: Fetch Skeleton Techdocs + action: fetch:template + input: + url: ../../skeleton/techdoc + targetPath: source values: name: ${{ parameters.name }} appSummary: A DEtection TRansformer (DETR) model streamlit application. Upload an image to identify and locate objects in the image. diff --git a/templates/rag/content/docs/gitops-application.md b/templates/rag/content/docs/gitops-application.md deleted file mode 100644 index b43fa417..00000000 --- a/templates/rag/content/docs/gitops-application.md +++ /dev/null @@ -1,15 +0,0 @@ -# ai-lab-template-gitops - -# Gitops Repo Patterns - -This repository contains an HTTP Gitops repository format component for use as the AI-Lab Gitops template. - -## HTTP - -This contains a deployment with the following characteristics: - -**Model service image** `${{ values.modelServiceContainer }}` **listening on port** `${{ values.modelServicePort }}`. - -**App interface image** `${{ values.appContainer }}` **listening on port** `${{ values.appPort }}` for service and routing. - -This matches the current AI-Lab software template default deployment. \ No newline at end of file diff --git a/templates/rag/content/docs/images/access-openshift-ai.png b/templates/rag/content/docs/images/access-openshift-ai.png deleted file mode 100644 index 361a3b18..00000000 Binary files a/templates/rag/content/docs/images/access-openshift-ai.png and /dev/null differ diff --git a/templates/rag/content/docs/images/access-workbench.png b/templates/rag/content/docs/images/access-workbench.png deleted file mode 100644 index f5702a36..00000000 Binary files a/templates/rag/content/docs/images/access-workbench.png and /dev/null differ diff --git a/templates/rag/content/docs/images/data-science-projects.png b/templates/rag/content/docs/images/data-science-projects.png deleted file mode 100644 index 20025ca7..00000000 Binary files a/templates/rag/content/docs/images/data-science-projects.png and /dev/null differ diff --git a/templates/rag/content/docs/images/open-terminal.png b/templates/rag/content/docs/images/open-terminal.png deleted file mode 100644 index b3330cb4..00000000 Binary files a/templates/rag/content/docs/images/open-terminal.png and /dev/null differ diff --git a/templates/rag/content/docs/images/workbench-name.png b/templates/rag/content/docs/images/workbench-name.png deleted file mode 100644 index ccbdc160..00000000 Binary files a/templates/rag/content/docs/images/workbench-name.png and /dev/null differ diff --git a/templates/rag/content/docs/index.md b/templates/rag/content/docs/index.md deleted file mode 100644 index 40dd4c4d..00000000 --- a/templates/rag/content/docs/index.md +++ /dev/null @@ -1,20 +0,0 @@ -# AI Software Template - -This application, ${{ values.name }}, is created from an AI Software Template. These software templates create a new source code repository as well as a new GitOps deployment repository. - -The chosen sample source applicable is included in the source code repository. - -## Sample Source Application - -${{ values.appSummary }} - -## Repositories - -The source code for your application can be found in [${{ values.srcRepoURL }} ](${{ values.srcRepoURL }} ). - -The GitOps repository, which contains the Kubernetes manifests for the application can be found in -[${{ values.repoURL }} ](${{ values.repoURL }} ). - -## Application namespaces - -The default application is found in the namespace: **`${{ values.namespace }}`**. Applications can be deployed into their own unique namespace or multiple software templates can generate numerous applications into the same namespace. \ No newline at end of file diff --git a/templates/rag/content/docs/pipelines.md b/templates/rag/content/docs/pipelines.md deleted file mode 100644 index bde693dd..00000000 --- a/templates/rag/content/docs/pipelines.md +++ /dev/null @@ -1,22 +0,0 @@ -# docker-build-ai-rhdh - -## Shared Git resolver model for shared pipeline and tasks - -This pipeline is used to create Containerfile based SSCS (Software Supply Chain Security) builds. The pipeline run by this runner clones the source, builds an image with SBOM (Software Bill of Materials), attests, and pushes these to the users image registry. - -Tasks references come from this [repository](https://github.com/redhat-ai-dev/rhdh-pipelines) `pac/pipelines` and the tasks are defined in `pac/tasks`. The tasks are referenced by URL using the git resolver in tekton. - -When the pipelines in this repository are updated, all future runs in existing pipelines are shared. - -A developer can override these tasks with a local copy and updated annotations. - -Example - -To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation. - -`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"` - -## Templates -These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo. - -The intent of the template is to fork this repository and update its use in the Developer Hub templates directory. diff --git a/templates/rag/content/docs/rhoai.md b/templates/rag/content/docs/rhoai.md deleted file mode 100644 index 81a3b527..00000000 --- a/templates/rag/content/docs/rhoai.md +++ /dev/null @@ -1,48 +0,0 @@ -# Running Samples in OpenShift AI - -This document outlines how you can build and run your sample applications within an OpenShift AI workbench. - -## Prerequisites - -- Red Hat OpenShift AI installed, and `Create workbench for OpenShift AI` selected during component creation. -- `oc` cli installed - - `oc` can be downloaded from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/ -- Permissions to run `oc port-forward` on the cluster, specifically an account with the following roles: - - `get`, `create`, and `list` for the `pods/portforward` subresource - -## Running the Sample - -1) On the Console, click the square "apps" icon on the upper-right corner (next to the notifications icon). `Openshift AI` is listed in the drop-down list. - -![image](./images/access-openshift-ai.png) - -2) Go to the `Data Science Projects` section and access your application's project named `${{ values.namespace }}`. - -![image](./images/data-science-projects.png) - -3) Access the `workbench` named `${{ values.name }}-notebook`. - -![image](./images/access-workbench.png) - -4) Go to `File->Open` and select `Terminal`. - -![image](./images/open-terminal.png) - -5) In the terminal, run `cd ${{ values.name }}` to navigate to your sample app's directory. - -6) Run `pip install --upgrade -r requirements.txt` to install the dependencies for your application. - -7) Run `${{ values.appRunCommand }}` to run the sample in the workbench. - -## Accessing the Sample - -With the sample app now running, complete the following steps to access the sample app in your browser: - -1) Go to the OpenShift AI dashboard, and find the name of your workbench. -![image](./images/workbench-name.png) - -2) In a terminal window on your machine, run `oc get pods -l app=`. This retrieves the name of the pod where the workbench is running. - -3) Run `oc port-forward ${{ values.appPort }}` to port forward the sample application's port to your local machine. - -4) Finally, visit `http://localhost:${{ values.appPort }}` in your browser to access the application. \ No newline at end of file diff --git a/templates/rag/content/docs/source-component.md b/templates/rag/content/docs/source-component.md deleted file mode 100644 index 6f00d1eb..00000000 --- a/templates/rag/content/docs/source-component.md +++ /dev/null @@ -1,9 +0,0 @@ -# AI-lab samples - -## Usage in AI-lab templates - -This repository is being used in [ai-lab-template](https://github.com/redhat-ai-dev/ai-lab-template) as component source code for users to start with. - -This is a copy of the ai lab sample apps source code. The master copy of those apps are under [ai-lab-recipes](https://github.com/containers/ai-lab-recipes) - -To pull in the latest changes, run `./pull-sample-app.sh`, and commit the changes. diff --git a/templates/rag/content/mkdocs.yml b/templates/rag/content/mkdocs.yml deleted file mode 100644 index bb44658e..00000000 --- a/templates/rag/content/mkdocs.yml +++ /dev/null @@ -1,11 +0,0 @@ -site_name: 'Documentation' - -nav: - - Home: index.md - - Source Component: source-component.md - - Pipelines: pipelines.md - - GitOps Application: gitops-application.md - - OpenShift AI: rhoai.md - -plugins: - - techdocs-core \ No newline at end of file diff --git a/templates/rag/template.yaml b/templates/rag/template.yaml index 29e9a5bd..d589700b 100644 --- a/templates/rag/template.yaml +++ b/templates/rag/template.yaml @@ -215,6 +215,13 @@ spec: input: url: ./content targetPath: source + # Renders all of the template variables into the techdocs and adds them to the source repo + - id: fetch-skeleton-docs + name: Fetch Skeleton Techdocs + action: fetch:template + input: + url: ../../skeleton/techdoc + targetPath: source values: name: ${{ parameters.name }} appSummary: RAG (Retrieval Augmented Generation) streamlit chat application with a vector database. Upload a file containing relevant information to train the model for more accurate responses.