diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b5c8672 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,40 @@ +name: Publish to GitHub Pages +on: + push: + branches: [main] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +concurrency: + group: pages + cancel-in-progress: true +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write +jobs: + build: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Install Antora + run: npm i antora + - name: Generate Site + run: npx antora workshop/antora-playbook.yml + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: workshop/build/site + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.gitignore b/.gitignore index 68bc17f..a966e07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +**/node_modules + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/workshop/.gitignore b/workshop/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/workshop/antora-playbook.yml b/workshop/antora-playbook.yml new file mode 100644 index 0000000..7f5f23c --- /dev/null +++ b/workshop/antora-playbook.yml @@ -0,0 +1,25 @@ +site: + title: Fraud Detection Workshop + start_page: fraud-detection-workshop::index.adoc +content: + sources: + - url: ./../ + start_path: workshop/docs +asciidoc: + attributes: + release-version: master + page-pagination: true + extensions: + - ./lib/tab-block.js + - ./lib/remote-include-processor.js + +ui: + bundle: + url: https://github.com/redhat-developer-demos/rhd-tutorial-ui/releases/download/v0.1.9/ui-bundle.zip + snapshot: true + supplemental_files: + - path: ./supplemental-ui + - path: .nojekyll + - path: ui.yml + contents: "static_files: [ .nojekyll ]" + diff --git a/workshop/docs/antora.yml b/workshop/docs/antora.yml new file mode 100644 index 0000000..854f724 --- /dev/null +++ b/workshop/docs/antora.yml @@ -0,0 +1,7 @@ +name: fraud-detection-workshop +title: Fraud Detection Workshop +version: master +nav: + - modules/ROOT/nav.adoc + +start_page: ROOT:index.adoc diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/create-model-server-form.png b/workshop/docs/modules/ROOT/assets/images/model-serving/create-model-server-form.png new file mode 100644 index 0000000..3f4c846 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/create-model-server-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/create-workbench-form-data-connection.png b/workshop/docs/modules/ROOT/assets/images/model-serving/create-workbench-form-data-connection.png new file mode 100644 index 0000000..7ff9fb8 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/create-workbench-form-data-connection.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/deploy-model-form.png b/workshop/docs/modules/ROOT/assets/images/model-serving/deploy-model-form.png new file mode 100644 index 0000000..3e5f7f8 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/deploy-model-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-add.png b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-add.png new file mode 100644 index 0000000..6977622 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-add.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-name.png b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-name.png new file mode 100644 index 0000000..f0a4419 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-name.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-status.png b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-status.png new file mode 100644 index 0000000..b7d121a Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-status.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-url.png b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-url.png new file mode 100644 index 0000000..d8bfbb5 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-model-list-url.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-deploy.png b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-deploy.png new file mode 100644 index 0000000..5ce7268 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-deploy.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-edit.png b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-edit.png new file mode 100644 index 0000000..ee0a8af Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/ds-project-workbench-list-edit.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/jupyter-notebook-2.png b/workshop/docs/modules/ROOT/assets/images/model-serving/jupyter-notebook-2.png new file mode 100644 index 0000000..192904b Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/jupyter-notebook-2.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/model-serving/wb-notebook-requests.png b/workshop/docs/modules/ROOT/assets/images/model-serving/wb-notebook-requests.png new file mode 100644 index 0000000..13d49a7 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/model-serving/wb-notebook-requests.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/notebook-nav-folder.png b/workshop/docs/modules/ROOT/assets/images/notebook-nav-folder.png new file mode 100644 index 0000000..3adcd00 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/notebook-nav-folder.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/notebook-nav-select.png b/workshop/docs/modules/ROOT/assets/images/notebook-nav-select.png new file mode 100644 index 0000000..447b4e4 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/notebook-nav-select.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-dc-secret-name.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-dc-secret-name.png new file mode 100644 index 0000000..f9c3c16 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-dc-secret-name.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-complete.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-complete.png new file mode 100644 index 0000000..3793701 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-complete.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-create-run.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-create-run.png new file mode 100644 index 0000000..d4467b3 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-create-run.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-import.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-import.png new file mode 100644 index 0000000..7bb07ea Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipeline-import.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-button.png new file mode 100644 index 0000000..32497cc Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-button.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-upload.png b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-upload.png new file mode 100644 index 0000000..1d12ad1 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/dsp-pipline-import-upload.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-create-run-form.png b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-create-run-form.png new file mode 100644 index 0000000..ca8d5d1 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-create-run-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-complete.png b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-complete.png new file mode 100644 index 0000000..d588c81 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-complete.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-create-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-create-button.png new file mode 100644 index 0000000..6c1c9d0 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-create-button.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-in-progress.png b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-in-progress.png new file mode 100644 index 0000000..0c1d4ea Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/pipeline-run-in-progress.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-download.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-download.png new file mode 100644 index 0000000..cbb152f Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-download.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-launcher-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-launcher-button.png new file mode 100644 index 0000000..60ed22a Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-launcher-button.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-add-kube-secret.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-add-kube-secret.png new file mode 100644 index 0000000..a66f783 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-add-kube-secret.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-blank.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-blank.png new file mode 100644 index 0000000..2c63f8c Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-blank.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-complete.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-complete.png new file mode 100644 index 0000000..aaf0f75 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-complete.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-connect-nodes.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-connect-nodes.png new file mode 100644 index 0000000..f6409a1 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-connect-nodes.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-drag-drop.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-drag-drop.png new file mode 100644 index 0000000..890d5af Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-drag-drop.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-editor-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-editor-button.png new file mode 100644 index 0000000..6d4b745 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-editor-button.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-kube-secret-form.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-kube-secret-form.png new file mode 100644 index 0000000..6d2e506 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-kube-secret-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-launcher.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-launcher.png new file mode 100644 index 0000000..56cb62f Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-launcher.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-add-output.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-add-output.png new file mode 100644 index 0000000..3af2368 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-add-output.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep-form.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep-form.png new file mode 100644 index 0000000..907e6c7 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep.png new file mode 100644 index 0000000..dba6c77 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-dep.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-output-form.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-output-form.png new file mode 100644 index 0000000..93f168c Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1-file-output-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1.png new file mode 100644 index 0000000..9ab083f Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-1.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-remove-env-var.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-remove-env-var.png new file mode 100644 index 0000000..3417405 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-node-remove-env-var.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-output.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-output.png new file mode 100644 index 0000000..b7f0406 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-output.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button-loc.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button-loc.png new file mode 100644 index 0000000..b8d98de Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button-loc.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button.png new file mode 100644 index 0000000..7da85e6 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-panel-button.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-properties-tab.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-properties-tab.png new file mode 100644 index 0000000..12fd03a Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-properties-tab.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run-button.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run-button.png new file mode 100644 index 0000000..a00fbbb Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run-button.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run.png new file mode 100644 index 0000000..1c40859 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-run.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime-image.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime-image.png new file mode 100644 index 0000000..c97faac Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime-image.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime.png new file mode 100644 index 0000000..2681d5e Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-runtime.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-secret.png b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-secret.png new file mode 100644 index 0000000..274bcdd Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/pipelines/wb-pipeline-secret.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/create-project-button.png b/workshop/docs/modules/ROOT/assets/images/projects/create-project-button.png new file mode 100644 index 0000000..b2c0e77 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/create-project-button.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-click-projects.png b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-click-projects.png new file mode 100644 index 0000000..4defc23 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-click-projects.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-enabled.png b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-enabled.png new file mode 100644 index 0000000..8b719c2 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-enabled.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/dashboard-projects.png b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-projects.png new file mode 100644 index 0000000..edd779d Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/dashboard-projects.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-console-ocp-tile.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-console-ocp-tile.png new file mode 100644 index 0000000..b88521f Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-console-ocp-tile.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-add-dc.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-add-dc.png new file mode 100644 index 0000000..3ac52a0 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-add-dc.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-complete.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-complete.png new file mode 100644 index 0000000..6e4ec26 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-complete.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-form.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-form.png new file mode 100644 index 0000000..cf2173c Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server.png new file mode 100644 index 0000000..80e3f0d Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-create-pipeline-server.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-dc-list.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-dc-list.png new file mode 100644 index 0000000..aad8d26 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-dc-list.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-list-resource-hover.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-list-resource-hover.png new file mode 100644 index 0000000..e0ae15f Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-list-resource-hover.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-my-storage-form.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-my-storage-form.png new file mode 100644 index 0000000..b670451 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-my-storage-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form-resource.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form-resource.png new file mode 100644 index 0000000..9211315 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form-resource.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form.png new file mode 100644 index 0000000..d6d6b51 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new.png new file mode 100644 index 0000000..07a6983 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-new.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-ocp-link.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-ocp-link.png new file mode 100644 index 0000000..24035c4 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-ocp-link.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ds-project-pipeline-artifacts-form.png b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-pipeline-artifacts-form.png new file mode 100644 index 0000000..7ba16e9 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ds-project-pipeline-artifacts-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/login-with-openshift.png b/workshop/docs/modules/ROOT/assets/images/projects/login-with-openshift.png new file mode 100644 index 0000000..392ecb5 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/login-with-openshift.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-icon.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-icon.png new file mode 100644 index 0000000..28f03d0 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-icon.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-resource.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-resource.png new file mode 100644 index 0000000..0ac0edd Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-add-resource.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-ds-tile.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-ds-tile.png new file mode 100644 index 0000000..d2b9208 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-ds-tile.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-project-selected.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-project-selected.png new file mode 100644 index 0000000..e728b0d Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-project-selected.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-select-project.png b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-select-project.png new file mode 100644 index 0000000..7d9de56 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/ocp-console-select-project.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/projects/project.png b/workshop/docs/modules/ROOT/assets/images/projects/project.png new file mode 100644 index 0000000..1a9b1a9 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/projects/project.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/cell.png b/workshop/docs/modules/ROOT/assets/images/workbenches/cell.png new file mode 100644 index 0000000..5019336 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/cell.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/cell_code.png b/workshop/docs/modules/ROOT/assets/images/workbenches/cell_code.png new file mode 100644 index 0000000..442f9a5 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/cell_code.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/cell_run.png b/workshop/docs/modules/ROOT/assets/images/workbenches/cell_run.png new file mode 100644 index 0000000..45fb393 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/cell_run.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-button.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-button.png new file mode 100644 index 0000000..1ed1f8a Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-button.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-data-connection.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-data-connection.png new file mode 100644 index 0000000..7ff9fb8 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-data-connection.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-env-storage.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-env-storage.png new file mode 100644 index 0000000..1fc6ecf Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-env-storage.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-image.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-image.png new file mode 100644 index 0000000..b33dda5 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-image.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-name-desc.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-name-desc.png new file mode 100644 index 0000000..c37b637 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-name-desc.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-size.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-size.png new file mode 100644 index 0000000..f54f69f Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form-size.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form.png b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form.png new file mode 100644 index 0000000..e77b0c3 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/create-workbench-form.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-create-workbench.png b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-create-workbench.png new file mode 100644 index 0000000..0dcf09f Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-create-workbench.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list-edit.png b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list-edit.png new file mode 100644 index 0000000..ee0a8af Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list-edit.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list-stop.png b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list-stop.png new file mode 100644 index 0000000..4350871 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list-stop.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list.png b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list.png new file mode 100644 index 0000000..c11e5dc Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-list.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-open.png b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-open.png new file mode 100644 index 0000000..cd4dd4c Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/ds-project-workbench-open.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser-2.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser-2.png new file mode 100644 index 0000000..cc75409 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser-2.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser.png new file mode 100644 index 0000000..79f0e4e Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-file-browser.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-icon.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-icon.png new file mode 100644 index 0000000..149a96b Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-icon.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-modal.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-modal.png new file mode 100644 index 0000000..0acfaac Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-git-modal.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-0.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-0.png new file mode 100644 index 0000000..5ea64cd Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-0.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-1.png b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-1.png new file mode 100644 index 0000000..4097d7f Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/jupyter-notebook-1.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/new_notebook.png b/workshop/docs/modules/ROOT/assets/images/workbenches/new_notebook.png new file mode 100644 index 0000000..f7451d8 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/new_notebook.png differ diff --git a/workshop/docs/modules/ROOT/assets/images/workbenches/run_button.png b/workshop/docs/modules/ROOT/assets/images/workbenches/run_button.png new file mode 100644 index 0000000..fb4e479 Binary files /dev/null and b/workshop/docs/modules/ROOT/assets/images/workbenches/run_button.png differ diff --git a/workshop/docs/modules/ROOT/examples/run.sh b/workshop/docs/modules/ROOT/examples/run.sh new file mode 100644 index 0000000..a753c71 --- /dev/null +++ b/workshop/docs/modules/ROOT/examples/run.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo "Hello World" \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/nav.adoc b/workshop/docs/modules/ROOT/nav.adoc new file mode 100644 index 0000000..74f2bb0 --- /dev/null +++ b/workshop/docs/modules/ROOT/nav.adoc @@ -0,0 +1,23 @@ +* 1. Projects +** xref:1-01-dashboard.adoc[1. The Dashboard] +** xref:1-02-project-setup.adoc[2. Data Science Projects] +** xref:1-03-data-connections.adoc[3. Storage Data Connections] +*** xref:1-03-01-data-connections-manual.adoc[1. Manual] +*** xref:1-03-02-data-connections-script.adoc[2. Scripted Local] +** xref:1-04-enable-pipelines.adoc[4. Enable Pipelines] + +* 2. Workbenches +** xref:2-01-create-workbench.adoc[1. Create a Workbench] +** xref:2-02-jupyter-env.adoc[2. Jupyter] +** xref:2-03-notebooks.adoc[3. Notebooks] +** xref:2-04-experiment-train.adoc[4. Training a Model] + +* 3. Model Serving +** xref:3-01-save-model.adoc[1. Saving the Model] +** xref:3-02-deploy-model.adoc[2. Deploy the Model] +** xref:3-03-model-api.adoc[3. Using the API] +// ** xref:3-04-calling-from-application.adoc[4. Calling from an Application] + +* 4. Data Science Pipelines +** xref:4-01-gui-pipelines.adoc[1. Workbench Pipeline Editor] +** xref:4-02-sdk-pipelines.adoc[2. Python Pipelines] \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/1-01-dashboard.adoc b/workshop/docs/modules/ROOT/pages/1-01-dashboard.adoc new file mode 100644 index 0000000..416c2ad --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/1-01-dashboard.adoc @@ -0,0 +1,31 @@ += 1.1 Navigating The Dashboard + +include::_attributes.adoc[] + +xref:index.adoc[Back to the introduction] + +== The OpenShift Data Science Dashboard + +include::_attributes.adoc[] + +NOTE: We're going to refer to _Red Hat OpenShift Data Science_ as _RHODS_ throughout this workshop. + +After logging into the OpenShift Web Console, you should see the OpenShift Data Science Dashboard as a tile in the top right-hand corner. You'll be prompted to log in to the OpenShift Data Science Dashboard using the Developer Sandbox authentication. + +image::projects/ocp-console-ds-tile.png[Data Science Dashboard link] + +If you are prompted to log in using OpenShift, please go ahead and do so. RHODS will use the same credentials as OpenShift for the dashboard, notebooks, and all other components. + +image::projects/login-with-openshift.png[OpenShift Login, 300] + +At the OpenShift Data Science Dashboard, you can see the status of any installed and enabled applications as well as *Explore* other available application integrations. + +image::projects/dashboard-enabled.png[Dashboard Enabled] + +== Navigating to the OCP console + +You can navigate back to the OpenShift console in a similar fashion. Simply click on the application switcher to access the OCP console. + +image::projects/ds-console-ocp-tile.png[OCP Console Link] + +For now, let's stay in the RHODS Dashboard. Now that you are logged into to *Red Hat OpenShift Data Science*, we can move on to creating a project. diff --git a/workshop/docs/modules/ROOT/pages/1-02-project-setup.adoc b/workshop/docs/modules/ROOT/pages/1-02-project-setup.adoc new file mode 100644 index 0000000..b1a3b3d --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/1-02-project-setup.adoc @@ -0,0 +1,42 @@ += 1.2 Setting up your Data Science Project + +include::_attributes.adoc[] + +xref:index.adoc[Back to the introduction] + +== The OpenShift Data Science Dashboard + +You should be logged into *Red Hat OpenShift Data Science*, and be able to see the dashboard, that looks like this: + +image::projects/dashboard-enabled.png[Dashboard Enabled] + +You could start a Jupyter notebook from here, but it would be a one-off notebook run in isolation. To do data science as part of a workflow, we need to create a data science project. Projects allow you and your team to organize and collaborate on resources within separated namespaces. From a project you can create multiple workbenches, each with their own Jupyter notebook environment, and each with their own data connections and cluster storage. In addition, they can share models and data with pipelines and model servers. + +* Navigate to *Data Science Projects* in the left menu. Here you can see the list of existing projects that you have access to. + +image::projects/dashboard-click-projects.png[Data Science Projects List] + +From here, you can select an existing project, or create a new one. If you already have an active project you'd like to use, select it now and skip ahead to the xref:1-03-data-connections.adoc[next section]. Otherwise, let's create a new project. + + +* Click *Create data science project*. + +image::projects/create-project-button.png[Create proejct button] + +* Enter a user friendly display name and description. It will automatically generate a resource name, but you can change it if you'd like. + +image::projects/ds-project-new-form.png[New DS Project Form] + +* You can now see its initial state. There are five types of Project resources: + +image::projects/ds-project-new.png[New DS Project] + +** *Workbenches* are instances of your development and experimentation environment. They typically contain IDEs such as JupyterLab, RStudio and Visual Studio Code. + +** A *Cluster storage* is a volume that persists the files and data you're working on within a workbench. A workbench has access to one or more cluster storage instances. + +** *Data connections* contain configuration parameters that are required to connect to a data source such as an S3 object bucket. + +** *Pipelines* contain the Data Science Pipelines that have been executed within the Project. + +** *Models and model servers* allow you to quickly serve a trained model for real-time inference. You can have multiple model servers per Project, and one model server can host multiple models. diff --git a/workshop/docs/modules/ROOT/pages/1-03-01-data-connections-manual.adoc b/workshop/docs/modules/ROOT/pages/1-03-01-data-connections-manual.adoc new file mode 100644 index 0000000..90de88d --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/1-03-01-data-connections-manual.adoc @@ -0,0 +1,37 @@ += 1.3.1 Creating a Data Connection + +include::_attributes.adoc[] + +xref:index.adoc[Back to the introduction] + +NOTE: If you do not have your own s3 compatible storage, or wish to use a disposable local Minio instance, skip this page and use an automated script to *install object storage locally* for the purposes of this workshop: xref:1-03-02-data-connections-script.adoc[Scripted Local Installation] + +== Data Connections + +Let's create a data connection to your S3 compatible storage bucket. For this you will need all the credential info including the endpoint URL, access key, secret key, region, and bucket name. If you don't have this information, please contact your storage administrator. + +* Click *Add data connection* to open the form. + +image::projects/ds-project-add-dc.png[Add Data Connection] + +* Fill out the form and name your connection `My Storage`. This will be used to save your personal work, including data and models. + +image::projects/ds-project-my-storage-form.png[Add My Storage Form] + +* Click *Add data connection* to save and close. + +Repeat for the pipeline artifacts connection. + +NOTE: If you do not intend to complete the pipelines section of the workshop you can skip this step to add the pipeline artifacts connection. + +* Click *Add data connection* to open the form. + +* Fill out the form and name your connection `Pipeline Artifacts`. This will be where pipeline servers save artifacts. While necessary to run pipelines, we will not be exploring artifacts in this demo. + +image::projects/ds-project-pipeline-artifacts-form.png[Add Pipeline Artifacts Form] + +* Click *Add data connection* to save and close. + +Now you should see your data connections listed in the project. + +image::projects/ds-project-dc-list.png[] diff --git a/workshop/docs/modules/ROOT/pages/1-03-02-data-connections-script.adoc b/workshop/docs/modules/ROOT/pages/1-03-02-data-connections-script.adoc new file mode 100644 index 0000000..336abf3 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/1-03-02-data-connections-script.adoc @@ -0,0 +1,95 @@ += 1.3.2 Scripted Data Connection Installation + +include::_attributes.adoc[] + +xref:index.adoc[Back to the introduction] + + +NOTE: This script will install two data connections and two Minio buckets as s3 compatible storage into your data science project for convenience. These are *not* meant for production usage. It is based on the instructions for installing Minio in this https://ai-on-openshift.io/tools-and-applications/minio/minio/[guide]. It will create a random user and password for security. If you wish to connect to your own storage, please refer to these instructions: xref:1-03-01-data-connections-manual.adoc[Manually Adding Data Connections] + +== Finding the OpenShift Project Name + +We're going to want to update the project we created in the previous section. To do that, we need to navigate to the project in the OpenShift Console. First, we must take note of the project resource name when we created it. + +image::projects/ds-project-new-form-resource.png[New Project Form Resource Name] + +You can also find the resource name on your list of projects by hovering over the *?* icon next to the project name. + +image::projects/ds-project-list-resource-hover.png[Project List Resource Name] + + +== Navigate to the OpenShift Project + +NOTE: This section details how to start an OpenShift job to install the s3 compatible storage and associated data connection secrets. If you are knowledgeable in OpenShift and can access the cluster from the command line, you can simply execute `oc apply -n -f https://github.com/cfchase/fraud-detection-notebooks/raw/main/setup/setup-s3.yaml`. + +Now that we have the resource name, we can navigate to the project in the OpenShift Console. Click on the *OpenShift Console* link in the application switcher top right corner of the OpenShift Web Console. + +image::projects/ds-project-ocp-link.png[OpenShift Console Link] + +* Click the *+* icon in the navbar to create new resources. + +image::projects/ocp-console-add-icon.png[Add Resources Icon] + +* Select your project from the list of projects and verify the correct project is now listed. + +image::projects/ocp-console-select-project.png[Select Project] + +image::projects/ocp-console-project-selected.png[Project Selected] + +[.lines_space] +[.console-input] +[source, yaml] +---- +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: demo-setup +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: demo-setup-edit +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: edit +subjects: + - kind: ServiceAccount + name: demo-setup +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: create-s3-storage +spec: + selector: {} + template: + spec: + containers: + - args: + - -ec + - |- + echo -n 'Setting up Minio instance and data connections' + oc apply -f https://github.com/cfchase/fraud-detection-notebooks/raw/main/setup/setup-s3-no-sa.yaml + command: + - /bin/bash + image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest + imagePullPolicy: IfNotPresent + name: create-s3-storage + restartPolicy: Never + serviceAccount: demo-setup + serviceAccountName: demo-setup +---- + + +== Data Connections + +We will be using S3 compatible object storage, such as Ceph, Minio, or AWS S3, to store the data and models used in this workshop. To access the data and models, we will use a Data Connection, which is a resource that contains the configuration parameters required to connect to an object storage bucket. + +We will need 2 buckets. + +1. *My Storage* - Personal use for models and data. We can reuse that bucket and connection for notebooks and model servers. +2. *Pipelines Artifacts* - This is used as storage for your pipeline artifacts and required when creating a pipeline server. We'll keep it separate from the first bucket for clarity. + +You can choose to use your own object storage and learn how to configure it manually \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/1-03-data-connections.adoc b/workshop/docs/modules/ROOT/pages/1-03-data-connections.adoc new file mode 100644 index 0000000..885e138 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/1-03-data-connections.adoc @@ -0,0 +1,22 @@ += 1.3 Object Storage with Data Connections + +include::_attributes.adoc[] + +xref:index.adoc[Back to the introduction] + +== Data Connections + +We will be using S3 compatible object storage, such as Ceph, Minio, or AWS S3, to store the data and models used in this workshop. To access the data and models, we will use a Data Connection, which is a resource that contains the configuration parameters required to connect to an object storage bucket. + +We will need 2 buckets. + +1. *My Storage* - Personal use for models and data. We can reuse that bucket and connection for notebooks and model servers. +2. *Pipelines Artifacts* - This is used as storage for your pipeline artifacts and required when creating a pipeline server. We'll keep it separate from the first bucket for clarity. + +You can choose to: + +* Create connections to your own S3 compatible object storage. Click here for instructions on how to do that: xref:1-03-01-data-connections-manual.adoc[Manually Adding Data Connections] + +OR + +* Use an automated script to install object storage locally for the purposes of this workshop: xref:1-03-02-data-connections-script.adoc[Scripted installation of local Minio instance] \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/1-04-enable-pipelines.adoc b/workshop/docs/modules/ROOT/pages/1-04-enable-pipelines.adoc new file mode 100644 index 0000000..797d348 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/1-04-enable-pipelines.adoc @@ -0,0 +1,28 @@ += 1.4 Enable Data Science Pipelines + +include::_attributes.adoc[] + +xref:index.adoc[Back to the introduction] + +This section will prepare your workspace for Section $ xref:4-01-gui-pipelines.adoc[Data Science Pipelines]. You can do this now to save time later, but you can also skip and return to this section. + +NOTE: If you do not intend to complete the pipelines section of the workshop you can skip this step and move on to the next section, xref:2-01-create-workbench.adoc[Create a Workbench] + +== Create a Pipeline Server + +* Click *Create pipeline server* + +image::projects/ds-project-create-pipeline-server.png[Create pipeline server button] + +* Select the `Pipeline Artifacts` data connection. + +image::projects/ds-project-create-pipeline-server-form.png[Selecting the Pipeline Artifacts data connection] + +* Leave the database configuration as the default. + +* Click *Configure*. + +Pipelines should now be enabled for your project and the *Create pipeline server* button should disappear. + +image::projects/ds-project-create-pipeline-server-complete.png[Create pipeline server complete] + diff --git a/workshop/docs/modules/ROOT/pages/2-01-create-workbench.adoc b/workshop/docs/modules/ROOT/pages/2-01-create-workbench.adoc new file mode 100644 index 0000000..58aafd5 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/2-01-create-workbench.adoc @@ -0,0 +1,51 @@ += 2.1 Starting a Jupyter environment + +include::_attributes.adoc[] + +NOTE: This section assumes you created a `My Storage` data connection xref:1-03-data-connections.adoc[as described in section 1.3]. + + +== Create a Workbench + +In section 1, we created a data science project. From the project detail page + +* Click the *Create workbench* button. + +image::workbenches/ds-project-create-workbench.png[Create workbench button] + +* Fill out the name and description. + +image::workbenches/create-workbench-form-name-desc.png[Workbench Name and Description, 600] + +Red Hat ships several notebook images that are built and supported. The *Notebook image* section will allow you to choose one of these or any custom images an administrator has set up for you. Today, we'll be using the *Tensorflow* image which has the necessary libraries for this workshop. + +* Choose the latest *Tensorflow* image. + +image::workbenches/create-workbench-form-image.png[Workbench image, 600] + +* Choose a small deployment and no GPUs. We won't need them for this workshop + +image::workbenches/create-workbench-form-size.png[Workbench size,600] + +* Leave the environment variables and storage options as the defaults. + +image::workbenches/create-workbench-form-env-storage.png[Workbench Env Storage, 600] + +* Under *Data connections*, choose to *Use existing data connection* and choose `My Storage` from the dropdown. This will allow us to access the object storage we configured previously. + +image::workbenches/create-workbench-form-data-connection.png[Data Connection, 600] + +* Click the *Create workbench* button. + +image::workbenches/create-workbench-form-button.png[Create workbench button] + +You will be returned to your project while the workbench starts. You'll see the status of the workbench change from `Starting` to `Running` next to the listed workbench. + +image::workbenches/ds-project-workbench-list.png[Workbench list] + + +NOTE: *Editing a Workbench Configuration* if you have made a mistake you can simply stop the workbench and edit it to make changes. + +image::workbenches/ds-project-workbench-list-stop.png[Workbench List Stop] + +image::workbenches/ds-project-workbench-list-edit.png[Workbench List Edit] \ No newline at end of file diff --git a/workshop/docs/modules/ROOT/pages/2-02-jupyter-env.adoc b/workshop/docs/modules/ROOT/pages/2-02-jupyter-env.adoc new file mode 100644 index 0000000..b41628a --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/2-02-jupyter-env.adoc @@ -0,0 +1,40 @@ += 2.2 The Jupyter Environment + +include::_attributes.adoc[] + +== Access your Workbench + +* Click the *Open* link next to your workbench. If prompted, log in and allow the notebook to authorize your user. + +image::workbenches/ds-project-workbench-open.png[Open Workbench] + +== Using Jupyter + +You are now inside your Jupyter environment. As you can see, it's a web-based environment, but everything you'll do here is in fact happening on the *Red Hat OpenShift Data Science*, powered underneath by the *OpenShift* cluster. This means that without having to install and maintain anything on your own computer, and without disposing of lots of local resources like CPU, GPU and RAM, you can still conduct your Data Science work in this powerful and stable managed environment. + +In the "file-browser" like window you're in right now, you'll find the files and folders that are saved inside your own personal space inside *RHODS*. + +It's pretty empty right now though... So the first thing we will do is to bring the content of the workshop inside this environment. + +* On the toolbar, click on the Git icon: + +image::workbenches/jupyter-git-icon.png[Git Icon] + +* Enter the git *https* URL, `https://github.com/cfchase/fraud-detection-notebooks.git`, then click *CLONE*: + +[.lines_space] +[.console-input] +[source,text] +---- +https://github.com/cfchase/fraud-detection-notebooks.git +---- + +image::workbenches/jupyter-git-modal.png[Git Modal] + +* Double-click and navigate to the newly-created folder, `fraud-detection-notebooks`: + +image::workbenches/jupyter-file-browser.png[Jupyter File Browser] + +You should now see the notebooks we've cloned from git in the file browser. + +image::workbenches/jupyter-file-browser-2.png[Jupyter File Browser - fraud-detection-notebooks] diff --git a/workshop/docs/modules/ROOT/pages/2-03-notebooks.adoc b/workshop/docs/modules/ROOT/pages/2-03-notebooks.adoc new file mode 100644 index 0000000..2fcee24 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/2-03-notebooks.adoc @@ -0,0 +1,49 @@ += 2.3 Working with Notebooks + +include::_attributes.adoc[] + +This section provides a small introduction on how to use Jupyter Notebooks. If you're already at ease with Jupyter, you can xref:2-04-experiment-train.adoc[head to the next section]. + +== What's a notebook? + +* A notebook is an environment where you have _cells_ that can display formatted text, or code. + +This is an empty cell: + +image::workbenches/cell.png[Jupyter Cell] + +And a cell where we have entered some code: + +image::workbenches/cell_code.png[Jupyter Cell Code] + +* Code cells contain Python code that can be run interactively. Thats means you can modify the code, then run it. The code will not run on your computer or in the browser, but directly in the environment you are connected to, *Red Hat OpenShift Data Science* in our case. +* To run a code cell, just select it (click in the cell, or on the left side of it), and click the Run/Play button from the toolbar (you can also press CTRL+Enter to run a cell, or Shift+Enter to run the cell and automatically select the following one). + +The Run button on the toolbar: + +image::workbenches/run_button.png[Jupyter Run] + +Our cell after pressing Run: + +image::workbenches/cell_run.png[Jupyter Run Cell] + +As you can see, you have the result of the code that was run in that cell, as well as information on when this particular cell has been run. + +* When you save a notebook, the code as well as the results are saved! So you can always reopen it to look at the results without having to run all the program again, while still having access to the code. + +Notebooks are so named because they are just like a physical *Notebook*: it's exactly like if you were taking notes about your experiments (which you will do), along with the code itself, including any parameters you set. You see the output of the experiment inline (this is the result from a cell once it's run), along with all the notes you want to take (to do that, switch the cell type from the menu from `Code` to `Markup`). + +== Time to play + +Now that we have covered the basics, just give it a try! + +image::workbenches/jupyter-notebook-0.png[Notebook 0] + +* In your Jupyter environment (the file explorer-like interface), there is file called `0_sandbox.ipynb`. Double-click on it to launch the notebook (it will open another tab in the content section of the environment). Please feel free to experiment, run the cells, add some more and create functions. You can do what you want - it's your environment, and there is no risk of breaking anything or impacting other users. This environment isolation is also a great advantage brought by *RHODS*. +* You can also create a new notebook by selecting *File\->New\->Notebook* from the menu on the top left, then select a Python 3 kernel. This instructs Jupyter that we want to create a new notebook where the code cells will be run using a Python 3 kernel. We could have different kernels, with different languages or versions that we can run into notebooks, but that's a story for another time... +* You can also create a notebook by simply clicking on the icon in the launcher: + +image::workbenches/new_notebook.png[alt text] + +* If you want to learn more about notebooks, head to https://jupyter.org/[the Jupyter site] . + diff --git a/workshop/docs/modules/ROOT/pages/2-04-experiment-train.adoc b/workshop/docs/modules/ROOT/pages/2-04-experiment-train.adoc new file mode 100644 index 0000000..8094424 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/2-04-experiment-train.adoc @@ -0,0 +1,9 @@ += 2.4 Training a Model + +include::_attributes.adoc[] + +Now that you know how the environment works, the real work can begin! + +Still in you environment, just open the file `1_experiment_train.ipynb`, and follow the instructions directly in the notebook, where you'll do some simple data exploration, experimentation, and train a model. + +image::workbenches/jupyter-notebook-1.png[Jupyter Notebook 1] diff --git a/workshop/docs/modules/ROOT/pages/3-01-save-model.adoc b/workshop/docs/modules/ROOT/pages/3-01-save-model.adoc new file mode 100644 index 0000000..874e558 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/3-01-save-model.adoc @@ -0,0 +1,23 @@ += 3.4 Fraud Detection + +include::_attributes.adoc[] + + +== Using the Model as an API +Now that you've used a pretrained model for inference, let's deploy that model using the RHODS model serving capabilities. + +In order to do so, we need to move the model from your workbench to our S3 compatible object storage. We'll be using the data connection you created earlier in the section xref:1-03-data-connections.adoc[Storage Data Connections]. We'll simply upload the model from a notebook. + +NOTE: you must have created the data connection `My Storage` *AND* added that data connection to your workbench before you can use it in a notebook. If you missed it, you can edit your workbench and add the data connection now. This will *restart* your workbench with the data connection attached. You *ONLY* need to do this if you missed it the first time. + +image::model-serving/ds-project-workbench-list-edit.png[Workbench Form Edit] + +image::model-serving/create-workbench-form-data-connection.png[Workbench Form Data Connection, 600] + +If your data connection has been set up, you can continue with the next step. + +* In your Jupyter environment, open the file `2_save_model.ipynb`, and follow the instructions in the notebook. + +image::model-serving/jupyter-notebook-2.png[Jupyter Notebook 2] + +At the end of the notebook, you will have uploaded the file `models/fraud/model.onnx` to object storage, ready for your model server to use. diff --git a/workshop/docs/modules/ROOT/pages/3-02-deploy-model.adoc b/workshop/docs/modules/ROOT/pages/3-02-deploy-model.adoc new file mode 100644 index 0000000..45c57dd --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/3-02-deploy-model.adoc @@ -0,0 +1,56 @@ += 2.2 Deploy the Model + +include::_attributes.adoc[] + +Now that the model is accessible in storage and saved in a portable `onnx` format, we can very easily use a RHODS model server to deploy it as an API. + +We'll complete this workflow in the *RHODS Dashboard*. + +== Create a Model Server + +RHODS multi-model servers can host several models at once. We'll create a new model server and deploy our model to it. + +* In the *Models and model servers* list, click *Add server*. + +image::model-serving/ds-project-model-list-add.png[Add Server] + +In the form: + +* Fill out the *Model server name*. We named ours `Model Server`. + +* Select `OpenVINO Model Server`. + +* Leave other fields (replicas, size, route, auth) as the defaults. + +image::model-serving/create-model-server-form.png[Add Server Form] + +== Deploy a Model + +* In the *Models and model servers* list, next to your new model server, click *Deploy model*. + +image::model-serving/ds-project-workbench-list-deploy.png[Deploy model button] + +In the form: + +* Fill out the *Model Name* with the value `fraud`. + +* Select the server you created (`Model Server`). + +* Select the *Existing data connection* `My Storage` + +* Enter the path to your uploaded model, `models/fraud/model.onnx` + +image::model-serving/deploy-model-form.png[Deploy Model Form] + +* Wait for the model to deploy and wait until the *Status* shows a green checkmark. + +image::model-serving/ds-project-model-list-status.png[Model Status] + +* Take note of the API Endpoint name and URL. We'll use this in the next section. + +image::model-serving/ds-project-model-list-name.png[Model Name] + +image::model-serving/ds-project-model-list-url.png[Model URL] + + + diff --git a/workshop/docs/modules/ROOT/pages/3-03-model-api.adoc b/workshop/docs/modules/ROOT/pages/3-03-model-api.adoc new file mode 100644 index 0000000..a4a70bd --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/3-03-model-api.adoc @@ -0,0 +1,25 @@ += 2.3 Testing the Model API + +include::_attributes.adoc[] + +== API Requests + +Now that we've deployed the model, we can look at the endpoints it created. + +When creating the model server, we did *not* create a route for external access to the API and we did not protect it with an auth token. This created an internal endpoint with no authentication. You found this information about the service and the model by hovering over the *Internal Service* and *?* identifiers for endpoint and model name in the previous section. In the instructions, we named this model `fraud` + +image::model-serving/ds-project-model-list-name.png[Model Name] + +image::model-serving/ds-project-model-list-url.png[Model URL] + +For this internal service, we can access it by communicating directly with the service the same way an application in your project would. One of the easiest way to do test it out, is from a notebook in the same project. + +Let's go back to the Jupyter environment and try out our new endpoint. We'll be trying out REST API calls in `4_rest_requests.ipynb` and gRPC requests in `5_grpc_requests.ipynb`. + +image::model-serving/wb-notebook-requests.png[Request Notebooks] + + + +* + + diff --git a/workshop/docs/modules/ROOT/pages/3-04-calling-from-application.adoc b/workshop/docs/modules/ROOT/pages/3-04-calling-from-application.adoc new file mode 100644 index 0000000..e42968b --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/3-04-calling-from-application.adoc @@ -0,0 +1,135 @@ += 2.4 Calling the API from an Application + +include::_attributes.adoc[] + +Now that we have a working API serving predictions, we can call it from an application. + +Until now, we have been using a route which exposes the service externally. Sometimes, services don't expose themselves outside the cluster. We'll deploy an application to the same project and can refer to it using its internal service name. + +== Verify your service URL + +If you followed previous naming instructions, your service should be `http://object-detection-rest:8080`. You can verify your rest service's name and port on the service detail screen. + +* From the project topology, open your deployment's detail screen. Check the service *name* and *port*. +Your internal URL will be `http://:` + +image::s2i/topology-rest-service.png[alt text, 700] + +== Create the Front End Application + +There are two options for creating the Front End Application. If you have time you can build this +NodeJS app from source like we did for the REST API. If however you are in a rush we can run +the application from a pre-built container which is much *faster*. + +[tabs, subs="attributes+,+macros"] +==== + +Use pre-built container:: ++ +-- +We will create the test app using a pre-built container from a public container registry + +From the `+Add` menu, click on the `Container images` tile: + +image::s2i/from-container-image.png[alt text, 800] + +Set the container location in the ``Image name``field, enter: `+quay.io/agroom/object-detection-app+`. + +[.lines_space] +[.console-input] +[source,text] +---- +quay.io/agroom/object-detection-app +---- + +image::s2i/deploy-image.png[alt text, 800] + +If you've entered the correct repository it will be marked as *validated* You can optionally set the +runtime icon from something other than OpenShift, in the example screen *nodejs* was chosen. + +-- + +Build from source:: ++ +-- +We will create the test app the exact same way we created the REST service, but instead, we'll be creating an `object-detection-app` + +From the `+Add` menu, click on the `Import from Git` tile: + +image::s2i/from-git.png[alt text, 800] + +Now set the Git repo ``Git Repo URL``field, enter: `+https://github.com/rh-aiservices-bu/object-detection-app.git+`. + +[.lines_space] +[.console-input] +[source,text] +---- +https://github.com/rh-aiservices-bu/object-detection-app.git +---- +If you've entered the correct repository, the Node.js builder image will be selected since this front end application was written in Node.js. + + +image::s2i/git-repo-app.png[alt text, 800] +-- +==== + +== Configuring the application + +Don't hit that *Create* button just yet. We have to configure the runtime aspects of the application, this is then the +same regardless of whether it came from source or a container. + +=== Set the App Name + +* By default, our new deployment will be added to the existing application `object-detection` we created during our previous app. We can leave that as is. Instead of `object-detection-app-git`, we can change the *Name* to `object-detection-app`, but it's not required. + +image::s2i/general-app.png[alt text, 700] + +=== Route +For the detection application we want a *secure https* Route so we will use the default - so no changes required. + +=== Configure the Deployment Environment Variables + +The application needs to know where to send its images for predictions. Earlier, we confirmed the service URL of the `object-detection-rest` deployment. We'll use that value and add `/predictions`. This will tell our front end application where to send the images by setting the variable `OBJECT_DETECTION_URL` to `http://:https://github.com/cfchase/fraud-detection-notebooks/raw/main/7_get_data_train_upload.yaml +++++ + + +// link:https://github.com/cfchase/fraud-detection-notebooks/raw/main/7_get_data_train_upload.yaml[Download Pipeline YAML, window=_blank, download] + +Or, you can download it directly from your workbench: + +image::pipelines/wb-download.png[Download Pipeline YAML] + +Now you can upload `7_get_data_train_upload.yaml` to OpenShift AI. Start from the OpenShift AI dashboard. + +* Click *Import pipeline* in the *Pipelines* section. + +image::pipelines/dsp-pipeline-import.png[] + +* Fill out the *Pipeline name* and *Pipeline description* + +* Click *Upload* and select `7_get_data_train_upload.yaml` from your local files to upload the pipeline. + +image::pipelines/dsp-pipline-import-upload.png[] + +* Click *Import pipeline* to import and save the pipeline. + +image::pipelines/dsp-pipline-import-button.png[] + +As you can tell, no runs have been triggered yet. + +* Click *Create run* either under the *Actions* menu or in the expand pipeline item. + +* Fill out the *Name* on the form. You can leave other fields as default. + +image::pipelines/pipeline-create-run-form.png[Create Pipeline Run Form] + +* Click *Create* to create the run. + +image::pipelines/pipeline-run-create-button.png[Create Pipeline Run Button] + +This will kick off a new run immediately and send you to the run details page. + +image::pipelines/pipeline-run-in-progress.png[] + +There you have it. A pipeline created in Python running in OpenShift AI. + + + + + diff --git a/workshop/docs/modules/ROOT/pages/_attributes.adoc b/workshop/docs/modules/ROOT/pages/_attributes.adoc new file mode 100644 index 0000000..ad2bb5a --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/_attributes.adoc @@ -0,0 +1,2 @@ +:experimental: +:source-highlighter: highlightjs diff --git a/workshop/docs/modules/ROOT/pages/conclusion.adoc b/workshop/docs/modules/ROOT/pages/conclusion.adoc new file mode 100644 index 0000000..4a3af41 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/conclusion.adoc @@ -0,0 +1,6 @@ += Fraud Detection Workshop with Red Hat OpenShift Data Science +:page-layout: home +:!sectids: + +[.text-center.strong] +== Conclusion diff --git a/workshop/docs/modules/ROOT/pages/index.adoc b/workshop/docs/modules/ROOT/pages/index.adoc new file mode 100644 index 0000000..907e739 --- /dev/null +++ b/workshop/docs/modules/ROOT/pages/index.adoc @@ -0,0 +1,30 @@ += Fraud Detection Workshop with Red Hat OpenShift Data Science +:page-layout: home +:!sectids: + +[.text-center.strong] +== Introduction + +Welcome! + +In this workshop, you'll learn an easy way to incorporate data science and AI/ML into an OpenShift development workflow. +As an example, you'll use an fraud detection model in several different ways. + +You will: + +* use Jupyter Notebooks to explore a pre-trained fraud detection model +* deploy the model using OpenShift Data Science model serving +* integrate the model into a real-time fraud detection app +* refine and train the model using automated pipelines + +And all of this without having to install anything on your own computer, thanks to https://www.redhat.com/en/technologies/cloud-computing/openshift/openshift-data-science[Red Hat OpenShift Data Science]. + + +=== Environment + +https://developers.redhat.com/products/red-hat-openshift-data-science/download[Set up your Red Hat OpenShift Data Science environment] + +If you haven't already got an instance of Red Hat OpenShift Data Science, find out more on the https://developers.redhat.com/products/red-hat-openshift-data-science/download[developer page]. There, you can spin up your own account on the *free OpenShift Data Science Sandbox* or learn about installing on *your own OpenShift cluster*. + + +If you're ready, xref:1-01-dashboard.adoc[let's start!] diff --git a/workshop/docs/modules/ROOT/partials/exec_pod.adoc b/workshop/docs/modules/ROOT/partials/exec_pod.adoc new file mode 100644 index 0000000..73c8950 --- /dev/null +++ b/workshop/docs/modules/ROOT/partials/exec_pod.adoc @@ -0,0 +1,25 @@ +Check that the pod is up and running: + +[.lines_space] +[.console-input] +[source,bash, subs="+macros,+attributes"] +---- +kubectl get pods +---- + +[.console-output] +[source,bash,subs="+macros,+attributes"] +---- +NAME READY STATUS RESTARTS AGE +{podname} 1/1 Running 0 5s +---- + +Then let's go into the running pod to execute some commands: + +[.console-input] +[source,bash, subs="+macros,+attributes"] +---- +kubectl exec -ti {podname} /bin/bash +---- + +NOTE: Change the pod name with your pod name. \ No newline at end of file diff --git a/workshop/supplemental-ui/.nojekyll b/workshop/supplemental-ui/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/workshop/supplemental-ui/img/favicon.ico b/workshop/supplemental-ui/img/favicon.ico new file mode 100644 index 0000000..c483f34 Binary files /dev/null and b/workshop/supplemental-ui/img/favicon.ico differ diff --git a/workshop/supplemental-ui/partials/footer-nav.hbs b/workshop/supplemental-ui/partials/footer-nav.hbs new file mode 100644 index 0000000..65cd1c9 --- /dev/null +++ b/workshop/supplemental-ui/partials/footer-nav.hbs @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/workshop/supplemental-ui/ui.yml b/workshop/supplemental-ui/ui.yml new file mode 100644 index 0000000..079c1fc --- /dev/null +++ b/workshop/supplemental-ui/ui.yml @@ -0,0 +1,2 @@ +static_files: +- .nojekyll \ No newline at end of file