Skip to content

Commit 4b55dfe

Browse files
felixwang9817adchia
authored andcommitted
chore: Update helm chart name (#2969)
* Rename feast-python-server helm chart to feast-feature-server Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Switch example to Python 3.8 Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Update helm chart docs Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Change name Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Change references Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Change another reference Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Add arrow C++ library to example Dockerfile Signed-off-by: Felix Wang <wangfelix98@gmail.com>
1 parent 10ef6d3 commit 4b55dfe

File tree

9 files changed

+312
-15
lines changed

9 files changed

+312
-15
lines changed

docs/how-to-guides/running-feast-in-production.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,12 @@ This service will provide an HTTP API with JSON I/O, which can be easily used wi
242242

243243
[Read more about this feature](../reference/alpha-aws-lambda-feature-server.md)
244244

245-
### 4.3. Java based Feature Server deployed on Kubernetes
245+
### 4.3. Go feature server deployed on Kubernetes
246246

247-
For users with very latency-sensitive and high QPS use-cases, Feast offers a high-performance Java feature server.
248-
Besides the benefits of running on JVM, this implementation also provides a gRPC API, which guarantees good connection utilization and
249-
small request / response body size (compared to JSON).
250-
You will need the Feast Java SDK to retrieve features from this service. This SDK wraps all the gRPC logic for you and provides more convenient APIs.
247+
For users with very latency-sensitive and high QPS use-cases, Feast offers a high-performance [Go feature server](../reference/feature-servers/go-feature-server.md).
248+
It can use either HTTP or gRPC.
251249

252-
The Java based feature server can be deployed to Kubernetes cluster via Helm charts in a few simple steps:
250+
The Go feature server can be deployed to a Kubernetes cluster via Helm charts in a few simple steps:
253251

254252
1. Install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and [helm 3](https://helm.sh/)
255253
2. Add the Feast Helm repository and download the latest charts:
@@ -259,18 +257,15 @@ helm repo update
259257
```
260258
3. Run Helm Install
261259
```
262-
helm install feast-release feast-charts/feast \
260+
helm install feast-release feast-charts/feast-feature-server \
263261
--set global.registry.path=s3://feast/registries/prod \
264262
--set global.project=<project name>
265263
```
266264

267-
This chart will deploy two services: `feature-server` and `transformation-service`.
268-
Both must have read access to the registry file on cloud storage. Both will keep a copy of the registry in their memory and periodically refresh it, so expect some delays in update propagation in exchange for better performance.
269-
270-
#### Load balancing
271-
272-
The next step would be to install an L7 Load Balancer (eg, [Envoy](https://www.envoyproxy.io/)) in front of the Java feature server.
273-
For seamless integration with Kubernetes (including services created by Feast Helm chart) we recommend using [Istio](https://istio.io/) as Envoy's orchestrator.
265+
This chart will deploy a single service.
266+
The service must have read access to the registry file on cloud storage.
267+
It will keep a copy of the registry in their memory and periodically refresh it, so expect some delays in update propagation in exchange for better performance.
268+
In order for the Go feature server to be enabled, you should set `go_feature_serving: True` in the `feature_store.yaml`.
274269

275270
## 5. Ingesting features from a stream source
276271

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v2
2+
name: feast-feature-server
3+
description: Feast Feature Server in Go or Python
4+
type: application
5+
version: 0.22.0
6+
keywords:
7+
- machine learning
8+
- big data
9+
- mlops
10+
home: https://feast.dev/
11+
sources:
12+
- https://github.com/feast-dev/feast
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# feast-feature-server
2+
3+
![Version: 0.22.0](https://img.shields.io/badge/Version-0.22.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
4+
5+
Feast Feature Server in Go or Python
6+
7+
**Homepage:** <https://feast.dev/>
8+
9+
## Source Code
10+
11+
* <https://github.com/feast-dev/feast>
12+
13+
## Values
14+
15+
| Key | Type | Default | Description |
16+
|-----|------|---------|-------------|
17+
| affinity | object | `{}` | |
18+
| fullnameOverride | string | `""` | |
19+
| image.pullPolicy | string | `"IfNotPresent"` | |
20+
| image.repository | string | `""` | |
21+
| image.tag | string | `""` | |
22+
| imagePullSecrets | list | `[]` | |
23+
| livenessProbe.initialDelaySeconds | int | `30` | |
24+
| livenessProbe.periodSeconds | int | `30` | |
25+
| nameOverride | string | `""` | |
26+
| nodeSelector | object | `{}` | |
27+
| podAnnotations | object | `{}` | |
28+
| podSecurityContext | object | `{}` | |
29+
| readinessProbe.initialDelaySeconds | int | `20` | |
30+
| readinessProbe.periodSeconds | int | `10` | |
31+
| replicaCount | int | `1` | |
32+
| resources | object | `{}` | |
33+
| securityContext | object | `{}` | |
34+
| service.port | int | `80` | |
35+
| service.type | string | `"ClusterIP"` | |
36+
| tolerations | list | `[]` | |
37+
38+
----------------------------------------------
39+
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
40+
41+
42+
Docker repository and tag are required. Helm install example:
43+
```
44+
helm install feast-feature-server . --set image.repository=REPO --set image.tag=TAG
45+
```
46+
47+
Deployment assumes that `feature_store.yaml` exists on docker image. Example docker image:
48+
```
49+
FROM python:3.8
50+
51+
RUN apt update && \
52+
apt install -y jq
53+
54+
RUN pip install pip --upgrade
55+
56+
RUN pip install feast
57+
58+
COPY feature_store.yaml /feature_store.yaml
59+
```
60+
61+
Furthermore, if you wish to use the Go feature server, then you must install the Apache Arrow C++ libraries, and your `feature_store.yaml` should include `go_feature_server: True`.
62+
For more details, see the [docs](https://docs.feast.dev/reference/feature-servers/go-feature-server).
63+
The docker image might look like:
64+
```
65+
FROM python:3.8
66+
67+
RUN apt update && \
68+
apt install -y jq
69+
70+
RUN pip install pip --upgrade
71+
72+
RUN pip install feast
73+
74+
RUN apt update
75+
RUN apt install -y -V ca-certificates lsb-release wget
76+
RUN wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
77+
RUN apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
78+
RUN apt update
79+
RUN apt -y install libarrow-dev
80+
81+
COPY feature_store.yaml /feature_store.yaml
82+
```
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "feast-feature-server.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
7+
{{- end }}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "feast-feature-server.fullname" -}}
15+
{{- if .Values.fullnameOverride }}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
17+
{{- else }}
18+
{{- $name := default .Chart.Name .Values.nameOverride }}
19+
{{- if contains $name .Release.Name }}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
21+
{{- else }}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
23+
{{- end }}
24+
{{- end }}
25+
{{- end }}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "feast-feature-server.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
32+
{{- end }}
33+
34+
{{/*
35+
Common labels
36+
*/}}
37+
{{- define "feast-feature-server.labels" -}}
38+
helm.sh/chart: {{ include "feast-feature-server.chart" . }}
39+
{{ include "feast-feature-server.selectorLabels" . }}
40+
{{- if .Chart.AppVersion }}
41+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
42+
{{- end }}
43+
app.kubernetes.io/managed-by: {{ .Release.Service }}
44+
{{- end }}
45+
46+
{{/*
47+
Selector labels
48+
*/}}
49+
{{- define "feast-feature-server.selectorLabels" -}}
50+
app.kubernetes.io/name: {{ include "feast-feature-server.name" . }}
51+
app.kubernetes.io/instance: {{ .Release.Name }}
52+
{{- end }}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "feast-feature-server.fullname" . }}
5+
labels:
6+
{{- include "feast-feature-server.labels" . | nindent 4 }}
7+
spec:
8+
replicas: {{ .Values.replicaCount }}
9+
selector:
10+
matchLabels:
11+
{{- include "feast-feature-server.selectorLabels" . | nindent 6 }}
12+
template:
13+
metadata:
14+
{{- with .Values.podAnnotations }}
15+
annotations:
16+
{{- toYaml . | nindent 8 }}
17+
{{- end }}
18+
labels:
19+
{{- include "feast-feature-server.selectorLabels" . | nindent 8 }}
20+
spec:
21+
{{- with .Values.imagePullSecrets }}
22+
imagePullSecrets:
23+
{{- toYaml . | nindent 8 }}
24+
{{- end }}
25+
securityContext:
26+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
27+
containers:
28+
- name: {{ .Chart.Name }}
29+
securityContext:
30+
{{- toYaml .Values.securityContext | nindent 12 }}
31+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
32+
imagePullPolicy: {{ .Values.image.pullPolicy }}
33+
command: ["feast", "serve", "-h", "0.0.0.0"]
34+
ports:
35+
- name: http
36+
containerPort: 6566
37+
protocol: TCP
38+
livenessProbe:
39+
tcpSocket:
40+
port: http
41+
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
42+
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
43+
readinessProbe:
44+
tcpSocket:
45+
port: http
46+
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
47+
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
48+
resources:
49+
{{- toYaml .Values.resources | nindent 12 }}
50+
{{- with .Values.nodeSelector }}
51+
nodeSelector:
52+
{{- toYaml . | nindent 8 }}
53+
{{- end }}
54+
{{- with .Values.affinity }}
55+
affinity:
56+
{{- toYaml . | nindent 8 }}
57+
{{- end }}
58+
{{- with .Values.tolerations }}
59+
tolerations:
60+
{{- toYaml . | nindent 8 }}
61+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "feast-feature-server.name" . }}
5+
labels:
6+
{{- include "feast-feature-server.labels" . | nindent 4 }}
7+
spec:
8+
type: {{ .Values.service.type }}
9+
ports:
10+
- port: {{ .Values.service.port }}
11+
targetPort: http
12+
protocol: TCP
13+
name: http
14+
selector:
15+
{{- include "feast-feature-server.selectorLabels" . | nindent 4 }}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Default values for feast.
2+
# This is a YAML-formatted file.
3+
# Declare variables to be passed into your templates.
4+
5+
replicaCount: 1
6+
7+
image:
8+
repository: ""
9+
pullPolicy: IfNotPresent
10+
tag: ""
11+
12+
imagePullSecrets: []
13+
nameOverride: ""
14+
fullnameOverride: ""
15+
16+
podAnnotations: {}
17+
18+
podSecurityContext: {}
19+
# fsGroup: 2000
20+
21+
securityContext: {}
22+
# capabilities:
23+
# drop:
24+
# - ALL
25+
# readOnlyRootFilesystem: true
26+
# runAsNonRoot: true
27+
# runAsUser: 1000
28+
29+
service:
30+
type: ClusterIP
31+
port: 80
32+
33+
resources: {}
34+
# We usually recommend not to specify default resources and to leave this as a conscious
35+
# choice for the user. This also increases chances charts run on environments with little
36+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
37+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
38+
# limits:
39+
# cpu: 100m
40+
# memory: 128Mi
41+
# requests:
42+
# cpu: 100m
43+
# memory: 128Mi
44+
45+
nodeSelector: {}
46+
47+
tolerations: []
48+
49+
affinity: {}
50+
51+
livenessProbe:
52+
initialDelaySeconds: 30
53+
periodSeconds: 30
54+
55+
readinessProbe:
56+
initialDelaySeconds: 20
57+
periodSeconds: 10

infra/charts/feast-python-server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ helm install feast-python-server . --set image.repository=REPO --set image.tag=T
4646

4747
Deployment assumes that `feature_store.yaml` exists on docker image. Example docker image:
4848
```
49-
FROM python:3.7
49+
FROM python:3.8
5050
5151
RUN apt update && \
5252
apt install -y jq

0 commit comments

Comments
 (0)