|
| 1 | +# Feast Installation Quickstart Guide |
| 2 | + |
| 3 | +This is a quickstart guide for Feast administrators setting up a Feast |
| 4 | +deployment for the first time. |
| 5 | + |
| 6 | +Feast is meant to run on Kubernetes, and currently requires managed |
| 7 | +services from GCP for certain operations |
| 8 | +* Dataflow (for loading feature data into Feast) |
| 9 | +* BigQuery (to act as feature warehouse) |
| 10 | +* Pub/Sub (for event data) |
| 11 | +* Cloud Storage (for staging data and logs) |
| 12 | + |
| 13 | +This guide will assume that users are using GKE (Google Container |
| 14 | +Engine), and that these managed services are available. In addition, |
| 15 | +Redis will be used for the feature serving database. |
| 16 | + |
| 17 | +## Prerequisites |
| 18 | + |
| 19 | +* Kubernetes cluster |
| 20 | + * The user should have a GKE cluster provisioned, with `kubectl` set |
| 21 | + up to access this cluster |
| 22 | + * This cluster should have the right scopes to start jobs on |
| 23 | + Dataflow and to modify BigQuery datasets and tables. The simplest |
| 24 | + way to set this up is by setting the scope to `cloud-platform` when |
| 25 | + provisioning the Kubernetes cluster. |
| 26 | +* [Helm](https://helm.sh/) |
| 27 | + * Helm should be installed locally and Tiller should be installed |
| 28 | + within this cluster. As noted |
| 29 | + [here](https://medium.com/google-cloud/helm-on-gke-cluster-quick-hands-on-guide-ecffad94b0), |
| 30 | + make sure you have the cluster-admin role attached to the Helm |
| 31 | + service account. |
| 32 | +* Feast repository |
| 33 | + * You have cloned the [Feast |
| 34 | + repository](https://github.com/gojek/feast/) and your command line |
| 35 | + is active in the root of the repository |
| 36 | + |
| 37 | +## Set up the environment |
| 38 | + |
| 39 | +Set the following environmental variables before beginning the installation |
| 40 | + |
| 41 | +```sh |
| 42 | +GCP_PROJECT=my-feast-project |
| 43 | +FEAST_CLUSTER=feast |
| 44 | +FEAST_REPO=$(pwd) |
| 45 | +FEAST_VERSION=0.1.0 |
| 46 | +FEAST_STORAGE_BUCKET=gs://${PROJECT}-feast |
| 47 | +``` |
| 48 | + |
| 49 | +Ensure that your `kubectl` context is set to the correct cluster |
| 50 | + |
| 51 | +```sh |
| 52 | +gcloud container clusters get-credentials "${FEAST_CLUSTER}" --project "${GCP_PROJECT}" |
| 53 | +``` |
| 54 | + |
| 55 | +Create a storage bucket for Feast to stage data |
| 56 | + |
| 57 | +```sh |
| 58 | +gsutil mb "${FEAST_STORAGE_BUCKET}" |
| 59 | +``` |
| 60 | + |
| 61 | +## Install Feast using Helm |
| 62 | + |
| 63 | +Create a copy of the Helm `values.yaml` file. This file will need to |
| 64 | +be configured with the specifics of your environment. |
| 65 | + |
| 66 | +```sh |
| 67 | +cp charts/feast/values.yaml . |
| 68 | +``` |
| 69 | + |
| 70 | +Keys that likely need to be changed based on the user’s environment are |
| 71 | +* `core.projectId` - your GCP project |
| 72 | +* `core.image.tag` - the current Feast version |
| 73 | +* `serving.image.tag` - the current Feast version |
| 74 | +* `core.jobs.*` |
| 75 | + * `DataflowRunner` or `DirectRunner` or `FlinkRunner` settings for Beam |
| 76 | + * Note: `DirectRunner` should not be used in production it is for testing only. |
| 77 | + |
| 78 | +See the [documentation page](#) for the complete list of options. |
| 79 | + |
| 80 | +You can update `values.yaml` directly, or specify overrides on the Helm command line: |
| 81 | + |
| 82 | +```sh |
| 83 | +helm install --name feast charts/dist/feast-${FEAST_VERSION}.tgz \ |
| 84 | +--set core.projectId=${GCP_PROJECT} \ |
| 85 | +--set core.image.tag=${FEAST_VERSION} \ |
| 86 | +--set serving.image.tag=${FEAST_VERSION} |
| 87 | +``` |
0 commit comments