Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
Signed-off-by: Tommy Hughes <tohughes@redhat.com>
  • Loading branch information
tchughesiv committed Jan 23, 2025
1 parent 20bd7ba commit 24757c2
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 36 deletions.
42 changes: 32 additions & 10 deletions examples/operator-quickstart/01-Install.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Install Feast on Kind with the Feast Operator\n",
"# Install Feast on Kubernetes 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/)."
"Provide a reference implementation of a runbook to deploy a Feast environment on a Kubernetes cluster using [Kind](https://kind.sigs.k8s.io/docs/user/quick-start) and the [Feast Operator](../../infra/feast-operator/)."
]
},
{
Expand All @@ -29,7 +29,8 @@
"equivalent instructions on the offical documentation pages:\n",
"* Install the `kubectl` cli.\n",
"* Install Kubernetes and Container runtime (e.g. [Colima](https://github.com/abiosoft/colima)).\n",
"* Create cluster\n",
" * Alternatively, authenticate to an existing Kubernetes or OpenShift cluster.\n",
" \n",
"```bash\n",
"brew install colima kubectl\n",
"colima start -r containerd -k -m 3 -d 100 -c 2 --cpu-type max -a x86_64\n",
Expand Down Expand Up @@ -101,8 +102,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Install PostgreSQL & Redis\n",
"Apply the included [postgres](postgres.yaml) & [redis](redis.yaml) deployments to install and configure simple databases."
"## Setup Postgresql and Redis\n",
"Apply the included [postgres](postgres.yaml) & [redis](redis.yaml) deployments to run simple databases."
]
},
{
Expand Down Expand Up @@ -166,7 +167,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Install the Operator"
"## Install the Feast Operator"
]
},
{
Expand Down Expand Up @@ -212,7 +213,7 @@
"metadata": {},
"source": [
"## Install the Feast services via FeatureStore CR\n",
"We'll use the Operator in this local repository to install the feast services. Apply the included [reference deployment](feast.yaml) to install and configure Feast."
"Next, we'll use the running Feast Operator to install the feast services. Apply the included [reference deployment](feast.yaml) to install and configure Feast."
]
},
{
Expand All @@ -237,8 +238,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Validate deployment\n",
"Validate application and service status:"
"## Validate the running FeatureStore deployment\n",
"Validate the deployment status."
]
},
{
Expand Down Expand Up @@ -281,6 +282,13 @@
"!kubectl wait --for=condition=available --timeout=5m deployment/feast-example"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Validate that the FeatureStore CR is in a `Ready` state."
]
},
{
"cell_type": "code",
"execution_count": 8,
Expand Down Expand Up @@ -339,6 +347,13 @@
"!kubectl exec deploy/postgres -- psql -h localhost -U feast feast -c '\\dt'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Verify the client `feature_store.yaml` and create the sample feature store definitions."
]
},
{
"cell_type": "code",
"execution_count": 10,
Expand Down Expand Up @@ -382,6 +397,13 @@
"!kubectl exec deploy/feast-example -itc registry -- feast apply"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"List the registered feast projects & feature views."
]
},
{
"cell_type": "code",
"execution_count": 11,
Expand Down Expand Up @@ -422,7 +444,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, let's verify the `feast` version"
"Finally, let's verify the feast version."
]
},
{
Expand Down
60 changes: 45 additions & 15 deletions examples/operator-quickstart/02-Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Run the Credit Score tutorial"
"# Run the \"Real-time Credit Scoring\" tutorial"
]
},
{
Expand All @@ -27,7 +27,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Verify the client `feature_store.yaml`."
"Upload the tutorial source code to the running feast pod and extract its contents."
]
},
{
Expand Down Expand Up @@ -105,7 +105,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Move the `feature_store.yaml` config to demo directory and verify its contents."
"Copy the `feature_store.yaml` to the tutorial directory and verify its contents."
]
},
{
Expand Down Expand Up @@ -149,6 +149,13 @@
"## Apply the feature store definitions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Update the feature store definitions for the tutorial."
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand Down Expand Up @@ -183,6 +190,13 @@
"!kubectl exec deploy/feast-example -itc registry -- feast -c /feast-data/feast-credit-score-local-tutorial/feature_repo apply"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Load data from feature views into the online store, beginning from either the previous materialize or materialize-incremental end date, or the beginning of time."
]
},
{
"cell_type": "code",
"execution_count": 4,
Expand Down Expand Up @@ -228,7 +242,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, we run the full test suite from the client folder."
"List the registered feast feature views & entities."
]
},
{
Expand Down Expand Up @@ -256,21 +270,22 @@
}
],
"source": [
"!kubectl exec deploy/feast-example -itc registry -- feast -c /feast-data/feast-credit-score-local-tutorial/feature_repo feature-views list"
"!kubectl exec deploy/feast-example -itc registry -- feast -c /feast-data/feast-credit-score-local-tutorial/feature_repo feature-views list\n",
"!kubectl exec deploy/feast-example -itc registry -- feast -c /feast-data/feast-credit-score-local-tutorial/feature_repo entities list"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Run test code inside the client Pod"
"## Train and test the model"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, we run the full test suite from the client folder."
"Install the required packages."
]
},
{
Expand Down Expand Up @@ -413,6 +428,13 @@
"!kubectl exec deploy/feast-example -itc registry -- bash -c 'pip install -r /feast-data/feast-credit-score-local-tutorial/requirements.txt'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Train and test the model."
]
},
{
"cell_type": "code",
"execution_count": 7,
Expand Down Expand Up @@ -448,12 +470,27 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In a new terminal, run the following command and leave it active -\n",
"## Interactive demo (using Streamlit)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In a new terminal, run the following command and leave it active.\n",
"\n",
"```bash\n",
"$ kubectl port-forward deploy/feast-example 8501:8501\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Start the Streamlit application"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -488,13 +525,6 @@
"\n",
"http://localhost:8501"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
16 changes: 8 additions & 8 deletions examples/operator-quickstart/03-Uninstall.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Uninstall deployment"
"## Uninstall the Operator and all Feast related objects"
]
},
{
Expand Down Expand Up @@ -47,6 +47,13 @@
"!kubectl delete -f ../../infra/feast-operator/dist/install.yaml"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ensure everything has been removed, or is in the process of being terminated."
]
},
{
"cell_type": "code",
"execution_count": 2,
Expand All @@ -65,13 +72,6 @@
"source": [
"!kubectl get all"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
5 changes: 2 additions & 3 deletions examples/operator-quickstart/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Install and run Feast with the Operator

The following notebooks will guide you through an end-to-end journey to install and validate a simple Feast feature store in a
Kind Kubernetes or OpenShift cluster:
The following notebooks will guide you through an end-to-end journey to install and validate a simple Feast feature store in a Kubernetes cluster:
* [01-Install.ipynb](./01-Install.ipynb): Install and configure the cluster with the Operator.
* [02-Demo.ipynb](./02-Demo.ipynb): In a kind/k8s cluster, validate the feature store with demo application.
* [02-Demo.ipynb](./02-Demo.ipynb): In a k8s cluster, validate the feature store with demo application.
* [03-Uninstall.ipynb](./03-Uninstall.ipynb): Clear the installed deployments.

0 comments on commit 24757c2

Please sign in to comment.