examples/operator-quickstart/01-Install.ipynb
Provide a reference implementation of a runbook to deploy a Feast environment on a Kubernetes cluster using the Feast Operator.
The following commands install and configure all the prerequisites on a MacOS environment. You can find the equivalent instructions on the offical documentation pages:
kubectl cli.brew install colima kubectl
colima start -r containerd -k -m 3 -d 100 -c 2 --cpu-type max -a x86_64
colima list
!kubectl create ns feast
!kubectl config set-context --current --namespace feast
Validate the cluster setup:
!kubectl get ns feast
The primary objective of this runbook is to guide the deployment of Feast services on a Kubernetes cluster, using the postgres template to set up a basic feature store.
In this notebook, we will deploy a distributed topology of Feast services, which includes:
Registry Server: Handles metadata storage for feature definitions.Online Store Server: Uses the Registry Server to query metadata and is responsible for low-latency serving of features.Offline Store Server: Uses the Registry Server to query metadata and provides access to batch data for historical feature retrieval.Each service is backed by a PostgreSQL database, which is also deployed within the same cluster.
Apply the included postgres & redis deployments to run simple databases.
!kubectl apply -f postgres.yaml -f redis.yaml
!kubectl wait --for=condition=available --timeout=5m deployment/redis
!kubectl wait --for=condition=available --timeout=5m deployment/postgres
!kubectl get all
## Use this install command from a release branch (e.g. 'v0.43-branch')
!kubectl apply -f ../../infra/feast-operator/dist/install.yaml
## OR, for the latest code/builds, use one the following commands from the 'master' branch
# !make -C ../../infra/feast-operator install deploy IMG=quay.io/feastdev-ci/feast-operator:develop FS_IMG=quay.io/feastdev-ci/feature-server:develop
# !make -C ../../infra/feast-operator install deploy IMG=quay.io/feastdev-ci/feast-operator:$(git rev-parse HEAD) FS_IMG=quay.io/feastdev-ci/feature-server:$(git rev-parse HEAD)
!kubectl wait --for=condition=available --timeout=5m deployment/feast-operator-controller-manager -n feast-operator-system
Next, we'll use the running Feast Operator to install the feast services. Apply the included reference deployment to install and configure Feast.
!kubectl apply -f feast.yaml
Validate the deployment status.
!kubectl get all
!kubectl wait --for=condition=available --timeout=8m deployment/feast-example
Validate that the FeatureStore CR is in a Ready state.
!kubectl get feast
Verify that the DB includes the expected tables.
!kubectl exec deploy/postgres -- psql -h localhost -U feast feast -c '\dt'
Finally, let's verify the feast version.
!kubectl exec deployment/feast-example -itc online -- feast version