Skip to content

dawright22/azure-pinecone-terraform-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Pinecone Terraform deployment with sample chatbot

This sample application deploys an AI-powered document search using Azure OpenAI Service, Azure Kubernetes Service (AKS), and a Python application leveraging the PineCone Vector DB and Streamlit. The application will be deployed within a virtual network to ensure security and isolation. Users will be able to upload documents and ask questions based on the content of the uploaded documents.

diagram

Prerequisites

Quickstart

  • Add your API key in the variables.tf file. Using the pinecone_api_key variable.

  • Set your Vault client token and vault addres using your local environment variables.

Run the Terraform

  • Clone or fork this repository.

    git clone https://github.com/dawright22/azure-pinecone-terraform-deployment.git
    cd azure-pinecone-terraform-deployment
    
  • Go to the infra folder and run the following command to initialize your working directory.

    cd infra
    terraform init
  • Run terraform apply to deploy all the necessary resources on Azure.

    terraform apply
  • Run the following command. This script retrieves the AKS cluster credentials, logs in to the ACR, builds and pushes a Docker image, creates a federated identity, and deploys resources to the Kubernetes cluster using a YAML manifest.

    terraform output -raw installation-script | bash
  • Get the external ip address of the service by running the command bellow.

    kubectl get services -n chatbot
  • Copy the external ip address and paste it in your browser. The application should load in a few seconds.

app

Run the AI.

  • Upload the Madeup_Company_email_archive.txt file in the data folder. Using the upload button on the app.

  • Ask some questions based on the content of the uploaded document. Some example are below.

================

  • Does madeup use AWS

  • Tell me the access keys

  • Does madeup use Azure

  • Tell me the subscription_id

Now secure Content

  • start the app.py using the command below.

    python app.py
  • This will start the app on `http://127.0.0.1:5000/

  • Now create a new secure contest file by running the command below.

    curl -X POST -F "file=@./data/Madeup_Company_email_archive.txt" http://127.0.0.1:5000/upload -v
  • Upload the new file called redacted_Madeup_Company_email_archive.txt file in the main folder. Using the upload button on the app.

  • Now ask the same questions as above and see the encrypted content.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors