|
| 1 | +# Install Feast |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This guide will demonstrate installing Feast using [**Minikube**](install-feast.md#minikube)**.** This installation has no external dependencies. One downside is that this installation does not include a historical feature store. It is meant to get users up and running quickly. |
| 6 | + |
| 7 | +## Minikube |
| 8 | + |
| 9 | +### Overview |
| 10 | + |
| 11 | +This guide will install Feast into [Minikube](https://github.com/kubernetes/minikube). Once Feast is installed you will be able to: |
| 12 | + |
| 13 | +* Define and register features. |
| 14 | +* Load feature data from both batch and streaming sources. |
| 15 | +* Retrieve features for online serving. |
| 16 | + |
| 17 | +{% hint style="warning" %} |
| 18 | +This Minikube installation guide is for demonstration purposes only. It is not meant for production use, and does not install a historical feature store. |
| 19 | +{% endhint %} |
| 20 | + |
| 21 | +### 0. Requirements |
| 22 | + |
| 23 | +The following software should be installed prior to starting: |
| 24 | + |
| 25 | +1. [Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) should be installed. |
| 26 | +2. [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed and configured to work with Minikube. |
| 27 | +3. [Helm](https://helm.sh/3) \(2.16.0 or greater\). |
| 28 | + |
| 29 | +### 1. Set up Minikube |
| 30 | + |
| 31 | +a. Start Minikube. Note the minimum cpu and memory below: |
| 32 | + |
| 33 | +```text |
| 34 | +minikube start --cpus=3 --memory=4096 --kubernetes-version='v1.15.5' |
| 35 | +``` |
| 36 | + |
| 37 | +b. Set up your Feast environmental variables |
| 38 | + |
| 39 | +```text |
| 40 | +export FEAST_IP=$(minikube ip) |
| 41 | +export FEAST_CORE_URL=${FEAST_IP}:32090 |
| 42 | +export FEAST_SERVING_URL=${FEAST_IP}:32091 |
| 43 | +``` |
| 44 | + |
| 45 | +### 2. Install Feast with Helm |
| 46 | + |
| 47 | +a. Clone the [Feast repository](https://github.com/gojek/feast/) and navigate to the `charts` sub-directory: |
| 48 | + |
| 49 | +```text |
| 50 | +git clone https://github.com/gojek/feast.git && \ |
| 51 | +cd feast && export FEAST_HOME_DIR=$(pwd) && \ |
| 52 | +cd infra/charts/feast |
| 53 | +``` |
| 54 | + |
| 55 | +b. Copy the `values-demo.yaml` file for your installation: |
| 56 | + |
| 57 | +```text |
| 58 | +cp values-demo.yaml my-feast-values.yaml |
| 59 | +``` |
| 60 | + |
| 61 | +c. Update all occurrences of the domain `feast.example.com` inside of `my-feast-values.yaml` with your Minikube IP. This is to allow external access to the services in the cluster. You can find your Minikube IP by running the following command `minikube ip`, or simply replace the text from the command line: |
| 62 | + |
| 63 | +```text |
| 64 | +sed -i "s/feast.example.com/${FEAST_IP}/g" my-feast-values.yaml |
| 65 | +``` |
| 66 | + |
| 67 | +d. Install the Feast Helm chart: |
| 68 | + |
| 69 | +```text |
| 70 | +helm install --name feast -f my-feast-values.yaml . |
| 71 | +``` |
| 72 | + |
| 73 | +e. Ensure that the system comes online. This will take a few minutes |
| 74 | + |
| 75 | +```text |
| 76 | +watch kubectl get pods |
| 77 | +``` |
| 78 | + |
| 79 | +```text |
| 80 | +NAME READY STATUS RESTARTS AGE |
| 81 | +pod/feast-feast-core-666fd46db4-l58l6 1/1 Running 0 5m |
| 82 | +pod/feast-feast-serving-online-84d99ddcbd 1/1 Running 0 6m |
| 83 | +pod/feast-kafka-0 1/1 Running 0 3m |
| 84 | +pod/feast-kafka-1 1/1 Running 0 4m |
| 85 | +pod/feast-kafka-2 1/1 Running 0 4m |
| 86 | +pod/feast-postgresql-0 1/1 Running 0 5m |
| 87 | +pod/feast-redis-master-0 1/1 Running 0 5m |
| 88 | +pod/feast-zookeeper-0 1/1 Running 0 5m |
| 89 | +pod/feast-zookeeper-1 1/1 Running 0 5m |
| 90 | +pod/feast-zookeeper-2 1/1 Running 0 5m |
| 91 | +``` |
| 92 | + |
| 93 | +### 3. Connect to Feast with the Python SDK |
| 94 | + |
| 95 | +a. Install the Python SDK using pip: |
| 96 | + |
| 97 | +```text |
| 98 | +pip install -e ${FEAST_HOME_DIR}/sdk/python |
| 99 | +``` |
| 100 | + |
| 101 | +b. Configure the Feast Python SDK: |
| 102 | + |
| 103 | +```text |
| 104 | +feast config set core_url ${FEAST_CORE_URL} |
| 105 | +feast config set serving_url ${FEAST_SERVING_URL} |
| 106 | +``` |
| 107 | + |
| 108 | +c. Make sure that both Feast Core and Feast Serving are connected: |
| 109 | + |
| 110 | +```text |
| 111 | +feast version |
| 112 | +``` |
| 113 | + |
| 114 | +```text |
| 115 | +{ |
| 116 | + "sdk": { |
| 117 | + "version": "feast 0.3.0" |
| 118 | + }, |
| 119 | + "core": { |
| 120 | + "url": "192.168.99.100:32090", |
| 121 | + "version": "0.3", |
| 122 | + "status": "connected" |
| 123 | + }, |
| 124 | + "serving": { |
| 125 | + "url": "192.168.99.100:32091", |
| 126 | + "version": "0.3", |
| 127 | + "status": "connected" |
| 128 | + } |
| 129 | +} |
| 130 | +``` |
| 131 | + |
| 132 | +That's it! You can now start to use Feast! |
| 133 | + |
0 commit comments