Skip to content

Commit

Permalink
Update README instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
trisberg committed Sep 6, 2024
1 parent b6896b0 commit 5c4b9c0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 20 deletions.
28 changes: 13 additions & 15 deletions spring-ai-chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ You need to specify the JDK version to be used for the app:
tanzu app config build non-secret-env set BP_JVM_VERSION=17
```

### Configure the AI API key

The application requires an AI API key to be provided.

You can set an environment variable for the app using this command:

```sh
tanzu app config non-secret-env set AI_API_KEY=<your-api-key>
```

> TODO: This needs to be set via a secret
### Configure HTTP Ingress Routing

If want to expose your application with a domain name and route traffic from the domain name to the deployed application, see [Adding HTTP Routing to an Application](https://docs.vmware.com/en/VMware-Tanzu-Platform/SaaS/create-manage-apps-tanzu-platform-k8s/how-to-ingress-to-app.html).
Expand Down Expand Up @@ -127,23 +115,33 @@ You can build using source from a locally cloned Git repository or from source o
To build the app you can run this command:

```sh
tanzu build --output-dir ./build
tanzu build --output-dir ./local
```

### Deploying the sample for TP for Kubernetes

Start the app deployment by running:

```sh
tanzu deploy --from-build ./build
tanzu deploy --from-build ./local
```

### Configure the AI API key

The application requires an AI API key to be provided.

You can set an environment variable for the app using this command:

```sh
tanzu app env set spring-ai-chat AI_API_KEY=<your-api-key>
```

### Scale the number of instances

Run this command to scale to 1 instance

```sh
tanzu app scale hello-fun --instances=1
tanzu app scale spring-ai-chat --instances=1
```

### PostgreSQL/pgvector
Expand Down
5 changes: 5 additions & 0 deletions spring-ai-chat/accelerator.axl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ engine {
}
}

// Update the artifact name as needed
applyTo("README.md") {
ReplaceText({{text: "spring-ai-chat", with: #artifactId.toLowerCase()}})
}

{
Include({'**'})
+ InvokeFragment("build-wrapper-maven")
Expand Down
6 changes: 3 additions & 3 deletions spring-cloud-serverless/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# spring-cloud-serverless repo
# hello-fun

This repo provides a simple serverless web app based on Spring Boot and Spring Cloud Function.

Expand Down Expand Up @@ -60,15 +60,15 @@ You can build using source from a locally cloned Git repository or from source o
To build the app you can run this command:

```sh
tanzu build --output-dir ./build
tanzu build --output-dir ./local
```

### Deploying the sample for TP for Kubernetes

Start the app deployment by running:

```sh
tanzu deploy --from-build ./build
tanzu deploy --from-build ./local
```

### Scale the number of instances
Expand Down
5 changes: 5 additions & 0 deletions spring-cloud-serverless/accelerator.axl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ engine {
+ InvokeFragment("build-wrapper-maven")
}

// Update the artifact name as needed
applyTo("README.md") {
ReplaceText({{text: "hello-fun", with: #artifactId.toLowerCase()}})
}

{
Include({"**"})
// Update the java version
Expand Down
4 changes: 2 additions & 2 deletions tanzu-java-web-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ You can build using source from a locally cloned Git repository or from source o
To build the app you can run this command:

```sh
tanzu build --output-dir ./build
tanzu build --output-dir ./local
```

### Deploying the sample for TP for Kubernetes

Start the app deployment by running:

```sh
tanzu deploy --from-build ./build
tanzu deploy --from-build ./local
```

### Scale the number of instances
Expand Down

0 comments on commit 5c4b9c0

Please sign in to comment.