Deploy the optional chatbot

In this section, you will learn how to deploy the optional chatbot application. NOTE: this requires that you have provisioned an Oracle Backend for Microservices and AI with a GPU cluster and are running Ollama in that cluster. The lab CloudBank AI Assistant outlines the steps.

Note if you already have a running session with oractl you can skip step 1-3.

  1. Start the tunnel

    kubectl port-forward -n obaas-admin svc/obaas-admin 8080
  2. Get the password for the obaas-admin user

    kubectl get secret -n azn-server oractl-passwords -o jsonpath='{.data.admin}' | base64 -d
  3. Start oractl from the cloudbank-v4 directory and login as the obaas-admin user.

  4. Run the following command in oractl:

    deploy --service-name chatbot --artifact-path chatbot/target/chatbot-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
  5. Start a tunnel to the chatbot application

    kubectl -n application port-forward svc/chatbot 7575:8080
  6. Test the chatbot application.

    curl -X POST -d 'what is spring boot?'  http://localhost:7575/chat

    The command should return something similar to this:

    A popular question!
    
    Spring Boot is an open-source Java-based framework that provides a simple and efficient wait to build web applications, RESTful APIs, and microservices. It's built on top of the Spring  Framework, but with a more streamlined and opinionated approach.