Skip to content

Commit

Permalink
Merge pull request #69 from langchain-ai/infra/release-0.3.x
Browse files Browse the repository at this point in the history
Release 0.3.x
  • Loading branch information
langchain-infra authored Feb 21, 2024
2 parents dc3f75c + 91a259b commit 44b9376
Show file tree
Hide file tree
Showing 8 changed files with 134 additions and 24 deletions.
2 changes: 1 addition & 1 deletion charts/langsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ maintainers:
email: [email protected]
description: Helm chart to deploy the langsmith application and all services it depends on.
type: application
version: 0.2.11
version: 0.3.1
appVersion: "0.1.0"
18 changes: 12 additions & 6 deletions charts/langsmith/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# langsmith

![Version: 0.2.11](https://img.shields.io/badge/Version-0.2.11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)

Helm chart to deploy the langsmith application and all services it depends on.

## Migrating from LangSmith 0.2.0 to 0.3.0

LangSmith 0.3.0 should be a drop-in replacement for LangSmith 0.2.0. You can follow the generic upgrade instructions [here](docs/UPGRADE.md).

**Note: If you want to preserve old runs from 0.1.x, you will need to first upgrade to 0.2.0, migrate your runs, and then upgrade to 0.3.0.**

## Migrating from LangSmith 0.1.0 to 0.2.0

LangSmith 0.2.0 introduces a new dependency on Clickhouse for run storage. If you wish to retain runs in LangSmith from versions of LangSmith prior to 0.2.0, you will need to complete a migration process.
You can view the upgrade guide [here](https://github.com/langchain-ai/helm/blob/main/charts/langsmith/docs/UPGRADE-0.2.x.md).
You can view the upgrade guide [here](docs/UPGRADE-0.2.x.md).
If you need assistance, please reach out to [email protected].

## Deploying LangSmith with Helm
Expand Down Expand Up @@ -255,20 +261,20 @@ We typically validate deployment using the following quickstart guide:
| fullnameOverride | string | `""` | String to fully override `"langsmith.fullname"` |
| images.backendImage.pullPolicy | string | `"IfNotPresent"` | |
| images.backendImage.repository | string | `"docker.io/langchain/langchainplus-backend"` | |
| images.backendImage.tag | string | `"c9cf130"` | |
| images.backendImage.tag | string | `"4e98e27"` | |
| images.clickhouseImage.pullPolicy | string | `"Always"` | |
| images.clickhouseImage.repository | string | `"docker.io/clickhouse/clickhouse-server"` | |
| images.clickhouseImage.tag | string | `"23.9"` | |
| images.frontendImage.pullPolicy | string | `"IfNotPresent"` | |
| images.frontendImage.repository | string | `"docker.io/langchain/langchainplus-frontend-dynamic"` | |
| images.frontendImage.tag | string | `"c9cf130"` | |
| images.frontendImage.tag | string | `"4e98e27"` | |
| images.hubBackendImage.pullPolicy | string | `"IfNotPresent"` | |
| images.hubBackendImage.repository | string | `"docker.io/langchain/langchainhub-backend"` | |
| images.hubBackendImage.tag | string | `"c9cf130"` | |
| images.hubBackendImage.tag | string | `"4e98e27"` | |
| images.imagePullSecrets | list | `[]` | Secrets with credentials to pull images from a private registry. Specified as name: value. |
| images.playgroundImage.pullPolicy | string | `"IfNotPresent"` | |
| images.playgroundImage.repository | string | `"docker.io/langchain/langchainplus-playground"` | |
| images.playgroundImage.tag | string | `"c9cf130"` | |
| images.playgroundImage.tag | string | `"4e98e27"` | |
| images.postgresImage.pullPolicy | string | `"IfNotPresent"` | |
| images.postgresImage.repository | string | `"docker.io/postgres"` | |
| images.postgresImage.tag | string | `"14.7"` | |
Expand Down
8 changes: 7 additions & 1 deletion charts/langsmith/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@

{{ template "chart.description" . }}

## Migrating from LangSmith 0.2.0 to 0.3.0

LangSmith 0.3.0 should be a drop-in replacement for LangSmith 0.2.0. You can follow the generic upgrade instructions [here](docs/UPGRADE.md).

**Note: If you want to preserve old runs from 0.1.x, you will need to first upgrade to 0.2.0, migrate your runs, and then upgrade to 0.3.0.**

## Migrating from LangSmith 0.1.0 to 0.2.0

LangSmith 0.2.0 introduces a new dependency on Clickhouse for run storage. If you wish to retain runs in LangSmith from versions of LangSmith prior to 0.2.0, you will need to complete a migration process.
You can view the upgrade guide [here](https://github.com/langchain-ai/helm/blob/main/charts/langsmith/docs/UPGRADE-0.2.x.md).
You can view the upgrade guide [here](docs/UPGRADE-0.2.x.md).
If you need assistance, please reach out to [email protected].

## Deploying LangSmith with Helm
Expand Down
64 changes: 64 additions & 0 deletions charts/langsmith/docs/UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# General Upgrade Instructions

If you don't have the repo added, run the following command to add it:
```bash
helm repo add langchain https://langchain-ai.github.io/helm/
```

Update your local helm repo
```bash
helm repo update
```

Run the following command to upgrade the chart(replace version with the version you want to upgrade to):
```bash
helm upgrade <release-name> langchain/langsmith --version <version> --values <path-to-values-file>
```

Verify that the upgrade was successful:
```bash
helm status <release-name>
```
All pods should be in the `Running` state. Verify that clickhouse is running and that both backend-migrations containers have completed.

```bash
kubectl get pods

NAME READY STATUS RESTARTS AGE
langsmith-backend-95b6d54f5-gz48b 1/1 Running 0 15h
langsmith-backend-migrations-d2z6k 0/2 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
```

### Validate your deployment:

1. Run `kubectl get services`

Output should look something like:

```bash
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
langsmith-backend ClusterIP 172.20.140.77 <none> 1984/TCP 35h
langsmith-frontend LoadBalancer 172.20.253.251 <external ip> 80:31591/TCP 35h
langsmith-hub-backend ClusterIP 172.20.112.234 <none> 1985/TCP 35h
langsmith-playground ClusterIP 172.20.153.194 <none> 3001/TCP 9h
langsmith-postgres ClusterIP 172.20.244.82 <none> 5432/TCP 35h
langsmith-redis ClusterIP 172.20.81.217 <none> 6379/TCP 35h
```

2. Curl the external ip of the `langsmith-frontend` service:

```bash
curl <external ip>/api/tenants
[{"id":"00000000-0000-0000-0000-000000000000","has_waitlist_access":true,"created_at":"2023-09-13T18:25:10.488407","display_name":"Personal","config":{"is_personal":true,"max_identities":1},"tenant_handle":"default"}]%
```

3. Visit the external ip for the `langsmith-frontend` service on your browser

The Langsmith UI should be visible/operational

![.langsmith_ui.png](../langsmith_ui.png)
25 changes: 25 additions & 0 deletions charts/langsmith/templates/backend/config-map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
labels:
{{- include "langsmith.labels" . | nindent 4 }}
annotations:
{{- include "langsmith.annotations" . | nindent 4 }}
data:
nginx-unit-config.json: |
{
"listeners": {
"*:{{ .Values.backend.containerPort }}": {
"pass": "applications/fastapi"
}
},
"applications": {
"fastapi": {
"type": "python 3.11",
"path": "/code/smith-backend",
"module": "app.main",
"callable": "app"
}
}
}
23 changes: 16 additions & 7 deletions charts/langsmith/templates/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ spec:
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
template:
metadata:
{{- with .Values.backend.deployment.annotations }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/backend/config-map.yaml") . | sha256sum }}
{{- with .Values.backend.deployment.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
Expand Down Expand Up @@ -92,10 +93,12 @@ spec:
{{- toYaml .Values.backend.deployment.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.backend.deployment.securityContext | nindent 12 }}
{{- with .Values.backend.deployment.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.deployment.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
- mountPath: /docker-entrypoint.d
name: nginx-unit-conf
{{- with .Values.backend.deployment.extraContainerConfig }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand All @@ -114,7 +117,13 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.backend.deployment.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.backend.deployment.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: nginx-unit-conf
configMap:
name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
items:
- key: nginx-unit-config.json
path: unit.json
10 changes: 5 additions & 5 deletions charts/langsmith/templates/frontend/config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data:
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html/build;
root /tmp;
}
location = /health {
Expand Down Expand Up @@ -71,9 +71,9 @@ data:
}
location ~ /{{ .Values.ingress.subdomain }} {
root /usr/share/nginx/html;
root /tmp;
index index.html index.htm;
try_files $uri $uri/ /{{ .Values.ingress.subdomain }}/index.html;
try_files $uri $uri/ /index.html;
}
}
Expand All @@ -84,7 +84,7 @@ data:
server_name localhost;
location / {
root /usr/share/nginx/html/build;
root /tmp/build;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
Expand All @@ -97,7 +97,7 @@ data:
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html/build;
root /tmp/build;
}
location ~ /api/playground/ {
Expand Down
8 changes: 4 additions & 4 deletions charts/langsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ images:
backendImage:
repository: "docker.io/langchain/langchainplus-backend"
pullPolicy: IfNotPresent
tag: "c9cf130"
tag: "4e98e27"
frontendImage:
repository: "docker.io/langchain/langchainplus-frontend-dynamic"
pullPolicy: IfNotPresent
tag: "c9cf130"
tag: "4e98e27"
hubBackendImage:
repository: "docker.io/langchain/langchainhub-backend"
pullPolicy: IfNotPresent
tag: "c9cf130"
tag: "4e98e27"
playgroundImage:
repository: "docker.io/langchain/langchainplus-playground"
pullPolicy: IfNotPresent
tag: "c9cf130"
tag: "4e98e27"
postgresImage:
repository: "docker.io/postgres"
pullPolicy: IfNotPresent
Expand Down

0 comments on commit 44b9376

Please sign in to comment.