Site icon George的生活點滴

Azure AI Store use AKS and Azure OpenAI

Reference URL: https://github.com/Azure-Samples/aks-store-demo/tree/main

  1. Please prepare AKS and Azure AI first
    A. Create an AKS resource : https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli
    B. Create an Open AI resource : https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal
  2. Connect to AKS use CLI : https://pitstop.manageengine.com/portal/en/kb/articles/how-to-connect-azure-kubernetes-service-aks-cluster
  3. Create a new namespace
    kubectl create ns store
  4. Create related pods via github
    kubectl apply -f https://raw.githubusercontent.com/Azure-Samples/aks-store-demo/main/aks-store-all-in-one.yaml -n store
  5. Check deployments
    kubectl get deployment
  6. Check pods
    kubectl get pods -n store
  7. Create a deployment for the AI container that contains AI-related information
    Edit this file: https://github.com/Azure-Samples/aks-store-demo/blob/main/ai-service.yaml

    Section 1: True
    Section 2-4: You can find this information in the Playground section of the OpenAI Studio.




  8. Create new deployment
    Kubectl apply -f ai-service.yaml -n store
  9. In Azure Portal, go to AKS resource then check the IP in service and ingress

  1. 請先準備好相關的環境
    A. 建立 AKS 的資源 : https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli
    B. 建立 ChatGTP 的資源 : https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal
  2. 連上 AKS : https://pitstop.manageengine.com/portal/en/kb/articles/how-to-connect-azure-kubernetes-service-aks-cluster
  3. 建立新的 namespace
    kubectl create ns store
  4. 利用現有的 Github 資源來建立新的 deployment
    kubectl apply -f https://raw.githubusercontent.com/Azure-Samples/aks-store-demo/main/aks-store-all-in-one.yaml -n store
  5. 檢查 deployment
    kubectl get deployment
  6. 檢查pods
    kubectl get pods -n store
  7. 編修檔案 ai-service.yaml 裡的內容,將 AI 所需的訊息填入檔案中
    檔案下載點: https://github.com/Azure-Samples/aks-store-demo/blob/main/ai-service.yaml

    Section 1: True
    Section 2-4: 在 Open AI Studio 中的 play ground 裡的 view code 找到 2-4 所需的資訊





  8. 佈署新的 ai service
    Kubectl apply -f ai-service.yaml -n store
  9. 在 Azure Portal 中, 到 AKS 資源裡 Service and Ingress 的 External IP 找到分配到的 IP, 輸入 Browser 中即可馬上體驗 AI 的商店

Exit mobile version