跳到主要内容

通用升级说明

对于通用升级说明,请遵循以下指示。某些版本可能有特定的升级说明,这些说明将在更详细的升级指南中阐述。

Kubernetes (Helm)

如果您尚未添加此仓库,请运行以下命令进行添加

helm repo add langchain https://github.langchain.ac.cn/helm/

更新您的本地 Helm 仓库

helm repo update

根据新版本中所需的任何更新,更新您的 Helm Chart 配置文件。这些更新将在新版本的发布说明中详细说明。

运行以下命令升级 Chart(将 version 替换为您想要升级到的版本)

命名空间

如果您使用的是非默认命名空间,则需要在使用 `-n

查找 Chart 的最新版本。您可以在 Langsmith Helm Chart GitHub 仓库中找到,或者通过运行以下命令来查找

helm search repo langchain/langsmith --versions

您应该会看到类似以下的输出

langchain/langsmith     0.10.14         0.10.32         Helm chart to deploy the langsmith application ...
langchain/langsmith 0.10.13 0.10.32 Helm chart to deploy the langsmith application ...
langchain/langsmith 0.10.12 0.10.32 Helm chart to deploy the langsmith application ...
langchain/langsmith 0.10.11 0.10.29 Helm chart to deploy the langsmith application ...
langchain/langsmith 0.10.10 0.10.29 Helm chart to deploy the langsmith application ...
langchain/langsmith 0.10.9 0.10.29 Helm chart to deploy the langsmith application ...

选择您想要升级到的版本(通常建议使用最新版本),并记下版本号。

helm upgrade <release-name> langchain/langsmith --version <version> --values <path-to-values-file>

验证升级是否成功

helm status <release-name>

所有 Pod 都应处于 `Running` 状态。验证 ClickHouse 是否正在运行,并且 `migrations` 作业均已完成。

kubectl get pods

NAME READY STATUS RESTARTS AGE
langsmith-backend-95b6d54f5-gz48b 1/1 Running 0 15h
langsmith-pg-migrations-d2z6k 0/1 Completed 0 5h48m
langsmith-ch-migrations-gasvk 0/1 Completed 0 5h48m
langsmith-clickhouse-0 1/1 Running 0 26h
langsmith-frontend-84687d9d45-6cg4r 1/1 Running 0 15h
langsmith-hub-backend-66ffb75fb4-qg6kl 1/1 Running 0 15h
langsmith-playground-85b444d8f7-pl589 1/1 Running 0 15h
langsmith-queue-d58cb64f7-87d68 1/1 Running 0 15h

验证您的部署:

  1. 运行 `kubectl get services`

    输出应类似如下所示

NAME                         TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)                      AGE
kubernetes ClusterIP 172.20.0.1 <none> 443/TCP 27d
langsmith-backend ClusterIP 172.20.22.34 <none> 1984/TCP 21d
langsmith-clickhouse ClusterIP 172.20.117.62 <none> 8123/TCP,9000/TCP 21d
langsmith-frontend LoadBalancer 172.20.218.30 <external ip> 80:30093/TCP,443:31130/TCP 21d
langsmith-platform-backend ClusterIP 172.20.232.183 <none> 1986/TCP 21d
langsmith-playground ClusterIP 172.20.167.132 <none> 3001/TCP 21d
langsmith-postgres ClusterIP 172.20.59.63 <none> 5432/TCP 21d
langsmith-redis ClusterIP 172.20.229.98 <none> 6379/TCP 20d
  1. Curl `langsmith-frontend` 服务的外部 IP

    curl <external ip>/api/info
    {"version":"0.5.7","license_expiration_time":"2033-05-20T20:08:06","batch_ingest_config":{"scale_up_qsize_trigger":1000,"scale_up_nthreads_limit":16,"scale_down_nempty_trigger":4,"size_limit":100,"size_limit_bytes":20971520}}

检查版本是否与您升级到的版本匹配。

  1. 在浏览器中访问 `langsmith-frontend` 服务的外部 IP

    Langsmith 用户界面应该可见/可操作

    .langsmith_ui.png

Docker

升级 LangSmith 的 Docker 版本比 Helm 版本更复杂一些,并且可能需要短暂的停机时间。请遵循以下说明升级您的 LangSmith Docker 版本。

  1. 将您的 `docker-compose.yml` 文件更新为最新版本中使用的文件。您可以在 LangSmith SDK GitHub 仓库中找到此文件
  2. 使用新版本中所需的任何新环境变量更新您的 `.env` 文件。这些变量将在新版本的发布说明中详细说明。
  3. 运行以下命令停止当前的 LangSmith 实例
docker-compose down
  1. 运行以下命令在后台启动新的 LangSmith 实例
docker-compose up -d

如果一切运行成功,您应该会看到所有 LangSmith 容器都在运行且健康。

CONTAINER ID   IMAGE                                  COMMAND                  CREATED        STATUS                        PORTS                                                      NAMES
e1c8f01a4ffc langchain/langsmith-frontend:0.5.7 "/entrypoint.sh ngin…" 10 hours ago Up 40 seconds 0.0.0.0:80->80/tcp, 8080/tcp cli-langchain-frontend-1
39e1394846b9 langchain/langsmith-backend:0.5.7 "/bin/sh -c 'exec uv…" 10 hours ago Up 40 seconds 0.0.0.0:1984->1984/tcp cli-langchain-backend-1
f8688dd58f2f langchain/langsmith-go-backend:0.5.7 "./smith-go" 10 hours ago Up 40 seconds 0.0.0.0:1986->1986/tcp cli-langchain-platform-backend-1
006f1303b04d langchain/langsmith-backend:0.5.7 "saq app.workers.que…" 10 hours ago Up 40 seconds cli-langchain-queue-1
73a90242ed3a redis:7 "docker-entrypoint.s…" 10 hours ago Up About a minute (healthy) 0.0.0.0:63791->6379/tcp cli-langchain-redis-1
eecf75ca672b postgres:14.7 "docker-entrypoint.s…" 10 hours ago Up About a minute (healthy) 0.0.0.0:5433->5432/tcp cli-langchain-db-1
3aa5652a864d clickhouse/clickhouse-server:23.9 "/entrypoint.sh" 10 hours ago Up About a minute (healthy) 9009/tcp, 0.0.0.0:8124->8123/tcp, 0.0.0.0:9001->9000/tcp cli-langchain-clickhouse-1
84edc329a37f langchain/langsmith-playground:0.5.7 "docker-entrypoint.s…" 10 hours ago Up About a minute 0.0.0.0:3001->3001/tcp cli-langchain-playground-1

验证您的部署:

  1. Curl `cli-langchain-frontend-1` 容器的暴露端口

    curl localhost:80/info
    {"version":"0.5.7","license_expiration_time":"2033-05-20T20:08:06","batch_ingest_config":{"scale_up_qsize_trigger":1000,"scale_up_nthreads_limit":16,"scale_down_nempty_trigger":4,"size_limit":100,"size_limit_bytes":20971520}}

1. 在浏览器中访问 `cli-langchain-frontend-1` 容器的暴露端口

Langsmith 用户界面应该可见/可操作

.langsmith_ui.png


此页面有帮助吗?


您可以提供详细反馈 在 GitHub 上.