Skip to content

Commit

Permalink
add readme requiements and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgearteiro committed Sep 12, 2024
1 parent 12b1d42 commit 6f948e5
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,44 @@

Demo Azure Open AI app using .NET Blazor Server template.

Requirements:
Create these secrets on the Kubernetes Namespace of your application deployment, like as showing here:
## Prerequisites

The application Ai Chat menu option requires an Azure Open AI subscription with "gpt-4o" model deployed.
Please, create these secrets on the Kubernetes Namespace of your application deployment, like as showing here:

```bash
kubectl create secret generic azure-openai-url --from-literal=AZURE_OPENAI_API_URL=<your Azure Open AI URL here> -n blazorintapp1

kubectl create secret generic azure-openai-key --from-literal=AZURE_OPENAI_API_KEY=<your Azure Open AI Key here> -n blazorintapp1
```

In development, you can use the dotnet secrets to store your App secrets.
In Visual Studio, right-click the project in Solution Explorer, and select Manage User Secrets from the context menu.
Add your secrets as showing here:
```json
{
"AzureOpenAIUrl": "<your Azure Open AI URL here>",
"AzureOpenAIKey": "<your Azure Open AI Key here>"
}
```

## Running the app with a Load Balancer service

If you want to create a Load Balancer service to your app, replace the whole manifest/service.yaml file with the following yaml:
```yaml
apiVersion: v1
kind: Service
metadata:
name: blazorintapp1
namespace: blazorintapp1
labels:
kubernetes.azure.com/generator: devhub
spec:
type: LoadBalancer
selector:
app: blazorintapp1
ports:
- protocol: TCP
port: 80
targetPort: 8080
```

0 comments on commit 6f948e5

Please sign in to comment.