-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Operator example notebook & api reference docs #4807
Draft
tchughesiv
wants to merge
24
commits into
feast-dev:master
Choose a base branch
from
tchughesiv:deploy-docs-new2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,649
−16
Draft
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c3419d6
operator example runbook & api reference docs
tchughesiv fe57d10
docs
tchughesiv 3338d31
docs
tchughesiv 33a7b6f
docs
tchughesiv 720f5ad
docs
tchughesiv acb9de8
docs
tchughesiv 216936c
docs
tchughesiv 8057c22
docs
tchughesiv 4c1223f
docs
tchughesiv e4d90c4
docs
tchughesiv 8f03668
docs
tchughesiv 0cbd219
docs
tchughesiv 973544f
ubi9
tchughesiv 2093395
ubi9
tchughesiv 3f11fd8
ubi9
tchughesiv a32f93d
docs
tchughesiv 201b688
dev
tchughesiv b5113bc
dev
tchughesiv 17d0785
dev
tchughesiv 95058d8
dev
tchughesiv 2645afe
dev
tchughesiv 07606a4
dev
tchughesiv 1555267
dev
tchughesiv 1e6708e
dev
tchughesiv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,282 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Install Feast on Kind with the Feast Operator\n", | ||
"## Objective\n", | ||
"\n", | ||
"Provide a reference implementation of a runbook to deploy a Feast development environment on a Kubernetes cluster using [Kind](https://kind.sigs.k8s.io/docs/user/quick-start) and the [Feast Operator](../../infra/feast-operator/)." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Prerequisites\n", | ||
"* Kubernetes Cluster - e.g. [Kind](https://kind.sigs.k8s.io/) or OpenShift\n", | ||
"* [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) Kubernetes CLI tool." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Install Prerequisites\n", | ||
"\n", | ||
"The following commands install and configure all the prerequisites on MacOS environment. You can find the\n", | ||
"equivalent instructions on the offical documentation pages:\n", | ||
"* Install Kind and Container runtime (e.g. [Colima](https://github.com/abiosoft/colima)).\n", | ||
"* Create Kind cluster named `feast`.\n", | ||
"* Install and setup the `kubectl` context.\n", | ||
"```bash\n", | ||
"brew install colima\n", | ||
"colima start\n", | ||
"brew install kind\n", | ||
"kind create cluster --name feast\n", | ||
"kind start\n", | ||
"brew install kubectl\n", | ||
"kubectl config use-context kind-feast\n", | ||
"```\n", | ||
"\n", | ||
"Additionally, we create a `feast` namespace and use it as the default for the `kubectl` CLI:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl create ns feast\n", | ||
"!kubectl config set-context --current --namespace feast" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Validate the cluster setup:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl get ns feast" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Deployment Architecture\n", | ||
"The primary objective of this runbook is to guide the deployment of Feast services on a Kubernetes Kind cluster, using the `postgres` template to set up a basic feature store.\n", | ||
"\n", | ||
"In this notebook, we will deploy a distributed topology of Feast services, which includes:\n", | ||
"\n", | ||
"* `Registry Server`: Handles metadata storage for feature definitions.\n", | ||
"* `Online Store Server`: Uses the `Registry Server` to query metadata and is responsible for low-latency serving of features.\n", | ||
"* `Offline Store Server`: Uses the `Registry Server` to query metadata and provides access to batch data for historical feature retrieval.\n", | ||
"\n", | ||
"Each service is backed by a `PostgreSQL` database, which is also deployed within the same Kind cluster." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Install PostgreSQL\n", | ||
"Install the [reference deployment](postgres.yaml) to install and configure a simple PostgreSQL database." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl apply -f postgres.yaml\n", | ||
"!kubectl wait --for=condition=available deployment/postgres --timeout=2m" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl get all" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### Install the Operator" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl apply -f ../../infra/feast-operator/dist/install.yaml\n", | ||
"#!make -C ../../infra/feast-operator install\n", | ||
"#!make -C ../../infra/feast-operator deploy IMG=quay.io/<org>/feast-operator:<tag>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Install the Feast services via FeatureStore CR\n", | ||
"We'll use the Operator in this local repository to install the feast services. Install the [reference deployment](feast.yaml) to install and configure Feast." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl apply -f feast.yaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### Validate deployment\n", | ||
"Validate application and service status:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl get feast\n", | ||
"!kubectl get all\n", | ||
"!kubectl wait --for=condition=available deployment/feast-example-registry --timeout=2m\n", | ||
"!kubectl wait --for=condition=available deployment/feast-example-offline --timeout=2m\n", | ||
"!kubectl wait --for=condition=available deployment/feast-example-online --timeout=2m" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Then verify the content of each feast service's local configuration file (it's stored in the `FEATURE_STORE_YAML_BASE64` env variable)." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl get deploy feast-example-online -o jsonpath='{.spec.template.spec.containers[*].env[?(@.name==\"FEATURE_STORE_YAML_BASE64\")].value}' | base64 -d" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl get deploy feast-example-offline -o jsonpath='{.spec.template.spec.containers[*].env[?(@.name==\"FEATURE_STORE_YAML_BASE64\")].value}' | base64 -d" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl get deploy feast-example-registry -o jsonpath='{.spec.template.spec.containers[*].env[?(@.name==\"FEATURE_STORE_YAML_BASE64\")].value}' | base64 -d" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Verify the content of the feast client configuration file (it's generated by the Operator and stored in a `ConfigMap`)." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl get cm feast-example-client -o jsonpath='{.data.feature_store\\.yaml}'" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Verify that the DB includes the expected tables." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl exec deploy/postgres -- psql -h localhost -U feast feast -c '\\dt'" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Finally, let's verify the `feast` version in each server" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl exec deployment/feast-example-registry -- feast version\n", | ||
"!kubectl exec deployment/feast-example-offline -- feast version\n", | ||
"!kubectl exec deployment/feast-example-online -- feast version" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.12.4" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems these notebooks have no output. While I agree that maintaining outputs in git can be challenging, having the outputs preserved is indeed very helpful when the notebooks from a browser. It provides immediate insight into the results of the experiment without needing to rerun it. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ok, i hadn't thought of it that way. i'll add them