Skip to content

0pens0/spring-metal

 
 

Repository files navigation

Demo of Tanzu platform and SpringAI

Spring Boot AI LLM PostgreSQL Tanzu

This repository contains artifacts necessary to build and run generative AI applications using Spring Boot and Tanzu Platform. The instructions below cover setup for both Cloud Foundry (cf) and Kubernetes (k8s) environments.

Architecture

Alt text

Prerequisites

  • Ensure you have the latest version of the Tanzu CLI installed.
  • Access to a Route53 domain and necessary AWS permissions.
  • Update the parameters in demo.sh according to your TPCF and TPK8s configurations
  • Follow the getting started guides for TPK8s

Running the Demo

Preperations

cf login -u admin -p YOUR_CF_ADMIN_PASSWORD
cf target -o YOUR_ORG -s YOUR_SPACE # this space must have access to postgres and genai services
./demo.sh prepare-cf
./demo.sh prepare-k8s

Deployment

  • cf runtime
cf login -u admin -p YOUR_CF_ADMIN_PASSWORD
cf target -o YOUR_ORG -s YOUR_SPACE
./demo.sh deploy-cf
  • k8s runtime
tanzu login
tanzu context use <my-context>
tanzu project use <my-project>
tanzu space use <my-space>
tanzu deploy

note: AI and db external services are bound as part of the deployment. You can bind to on-cluster services by using tanzu service create

Cleanup

./demo.sh cleanup-k8s #removes app and services from TPK8s space, but keep the space and its ingress/egress
./demo.sh cleanup-cf #removes app and services from TPCF space

Troubleshooting

Issue: Application deployment fails, or stuck in 'deploying'

  • Solution: In AppsMan->YOUR_SPACE->services->vector db instance->settings: manually enter "svc_gw_enable":true in the json area and redeploy

Contributing

Contributions to this project are welcome. Please ensure to follow the existing coding style and add unit tests for any new or changed functionality.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 52.5%
  • HTML 19.7%
  • Shell 11.9%
  • JavaScript 11.0%
  • CSS 4.3%
  • Smalltalk 0.6%