Unverified Commit 5aa5d4b2 authored by hhzhang16's avatar hhzhang16 Committed by GitHub
Browse files

docs: deployment docs improvements (#753)

parent 43dc9cee
......@@ -86,17 +86,19 @@ kubectl get storageclass
1. Set the required environment variables:
```bash
export PROJECT_ROOT=($pwd)
export DOCKER_USERNAME=<your-docker-username>
export DOCKER_PASSWORD=<your-docker-password>
export DOCKER_SERVER=<your-docker-server>
export IMAGE_TAG=<TAG> # Use the same tag you used when building the images
export NAMESPACE=dynamo-cloud # change this to whatever you want!
export DYNAMO_INGRESS_SUFFIX=dynamo-cloud.com # change this to whatever you want!
```
2. [One-time Action] Create a new kubernetes namespace and set it as your default. Create image pull secrets if needed.
```bash
cd deploy/dynamo/helm
cd $PROJECT_ROOT/deploy/dynamo/helm
kubectl create namespace $NAMESPACE
kubectl config set-context --current --namespace=$NAMESPACE
......
......@@ -48,6 +48,7 @@ dynamo-api-store:
tag: ${IMAGE_TAG}
pullPolicy: IfNotPresent
imagePullSecrets:
- name: docker-imagepullsecret
ingress:
hosts:
- host: ${NAMESPACE}.${DYNAMO_INGRESS_SUFFIX}
......
......@@ -220,12 +220,24 @@ kubectl delete dynamodeployment $DEPLOYMENT_NAME
Once you create the Dynamo deployment, a pod prefixed with `yatai-dynamonim-image-builder` will begin running. Once it finishes running, pods will be created using the image that was built. Once the pods prefixed with `$DEPLOYMENT_NAME` are up and running, you can test out your example!
Find your frontend pod using one of these methods:
```bash
# Forward the service port to localhost
kubectl -n ${KUBE_NS} port-forward svc/${DEPLOYMENT_NAME}-frontend 3000:3000
# Method 1: List all pods and find the frontend pod manually
kubectl get pods -n ${KUBE_NS} | grep frontend | cat
# Method 2: Use a label selector to find the frontend pod automatically
export FRONTEND_POD=$(kubectl get pods -n ${KUBE_NS} | grep "${DEPLOYMENT_NAME}-frontend" | sort -k1 | tail -n1 | awk '{print $1}')
# Forward the pod's port to localhost
kubectl port-forward pod/$FRONTEND_POD 8000:8000 -n ${KUBE_NS}
# Note: We forward directly to the pod's port 8000 rather than the service port because the frontend component listens on port 8000 internally.
# Test the API endpoint
curl localhost:3000/v1/chat/completions -H "Content-Type: application/json" -d '{
curl localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
"messages": [
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment