earayu
commited on
Commit
·
210cfc9
1
Parent(s):
c668f20
feat: add helm chart
Browse files
k8s-deploy/install_lightrag.sh
CHANGED
@@ -21,23 +21,19 @@ if [ -z "$OPENAI_API_BASE" ]; then
|
|
21 |
fi
|
22 |
|
23 |
# Install KubeBlocks (if not already installed)
|
24 |
-
echo "Preparing to install KubeBlocks and required components..."
|
25 |
bash "$SCRIPT_DIR/databases/01-prepare.sh"
|
26 |
|
27 |
# Install database clusters
|
28 |
-
echo "Installing database clusters..."
|
29 |
bash "$SCRIPT_DIR/databases/02-install-database.sh"
|
30 |
|
31 |
# Create vector extension in PostgreSQL if enabled
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
print "Warning: PostgreSQL pods not ready within timeout. Vector extension not created."
|
40 |
-
fi
|
41 |
fi
|
42 |
|
43 |
# Get database passwords from Kubernetes secrets
|
@@ -87,7 +83,7 @@ helm upgrade --install lightrag $SCRIPT_DIR/lightrag \
|
|
87 |
# Wait for LightRAG pod to be ready
|
88 |
echo ""
|
89 |
echo "Waiting for lightrag pod to be ready..."
|
90 |
-
kubectl wait --for=condition=ready pod -l app.kubernetes.io/instance=lightrag --timeout=
|
91 |
echo "lightrag pod is ready"
|
92 |
echo ""
|
93 |
echo "Running Port-Forward:"
|
|
|
21 |
fi
|
22 |
|
23 |
# Install KubeBlocks (if not already installed)
|
|
|
24 |
bash "$SCRIPT_DIR/databases/01-prepare.sh"
|
25 |
|
26 |
# Install database clusters
|
|
|
27 |
bash "$SCRIPT_DIR/databases/02-install-database.sh"
|
28 |
|
29 |
# Create vector extension in PostgreSQL if enabled
|
30 |
+
print "Waiting for PostgreSQL pods to be ready..."
|
31 |
+
if kubectl wait --for=condition=ready pods -l kubeblocks.io/role=primary,app.kubernetes.io/instance=pg-cluster -n $NAMESPACE --timeout=300s; then
|
32 |
+
print "Creating vector extension in PostgreSQL..."
|
33 |
+
kubectl exec -it $(kubectl get pods -l kubeblocks.io/role=primary,app.kubernetes.io/instance=pg-cluster -n $NAMESPACE -o name) -n $NAMESPACE -- psql -c "CREATE EXTENSION vector;"
|
34 |
+
print_success "Vector extension created successfully."
|
35 |
+
else
|
36 |
+
print "Warning: PostgreSQL pods not ready within timeout. Vector extension not created."
|
|
|
|
|
37 |
fi
|
38 |
|
39 |
# Get database passwords from Kubernetes secrets
|
|
|
83 |
# Wait for LightRAG pod to be ready
|
84 |
echo ""
|
85 |
echo "Waiting for lightrag pod to be ready..."
|
86 |
+
kubectl wait --for=condition=ready pod -l app.kubernetes.io/instance=lightrag --timeout=120s -n rag
|
87 |
echo "lightrag pod is ready"
|
88 |
echo ""
|
89 |
echo "Running Port-Forward:"
|
k8s-deploy/uninstall_lightrag.sh
CHANGED
File without changes
|