加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
demo.sh 926 Bytes
一键复制 编辑 原始数据 按行查看 历史
Taylor Dolezal 提交于 2023-11-02 17:11 . Update scripts for KCCN NA demo
#!/bin/bash
echo "Applying the Kubernetes manifests for this demo..."
kubectl apply -f kind/
# Wait for the pod starting with "db" to be running
while [[ $(kubectl get pods --no-headers | grep 'database' | awk '{print $3}') != "Running" ]]; do
echo "Waiting for the database pod to be running..."
sleep 5
done
# Wait for the pod starting with "bot" to be running
while [[ $(kubectl get pods --no-headers | grep 'bot' | awk '{print $3}') != "Running" ]]; do
echo "Waiting for the ChatBot pod to be running..."
sleep 5
done
echo "Forwarding the Chat Bot pod..."
kubectl port-forward svc/bot 8501:8501 &
echo "Forwarding the Weave Scope App..."
kubectl port-forward -n weave "$(kubectl get -n weave pod --selector=weave-scope-component=app -o jsonpath='{.items..metadata.name}')" 4040 &
echo "Opening the Chat Bot app..."
open http://localhost:8501
echo "Opening the Weave Scope app..."
open http://localhost:4040
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化