Skip to content

Commit

Permalink
Merge branch 'master' into job-service-helm
Browse files Browse the repository at this point in the history
Signed-off-by: Tsotne Tabidze <tsotnet@gmail.com>
  • Loading branch information
tsotnet committed Oct 23, 2020
2 parents b3aca8d + f0095d7 commit e6c0887
Show file tree
Hide file tree
Showing 30 changed files with 501 additions and 1,031 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/complete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,6 @@ jobs:
- name: Run integration tests
run: make test-java-integration

load-test:
needs: build-push-docker-images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Run load test
run: make test-load GIT_SHA=${GITHUB_SHA}
- uses: actions/upload-artifact@v2
with:
name: load-test-results
path: load-test-output/

tests-docker-compose:
needs:
- build-push-docker-images
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/feast/core/validators/Matchers.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class Matchers {
private static Pattern BIGQUERY_TABLE_REF_REGEX =
Pattern.compile("[a-zA-Z0-9-]+[:]+[a-zA-Z0-9_]+[.]+[a-zA-Z0-9_]*");
private static Pattern CLASS_PATH_REGEX =
Pattern.compile("[a-zA-Z_$][a-zA-Z0-9_$]*(\\.[a-zA-Z_$][a-zA-Z0-9_$]*)");
Pattern.compile("[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*$");
private static Pattern UPPER_SNAKE_CASE_REGEX = Pattern.compile("^[A-Z0-9]+(_[A-Z0-9]+)*$");
private static Pattern LOWER_SNAKE_CASE_REGEX = Pattern.compile("^[a-z0-9]+(_[a-z0-9]+)*$");
private static Pattern VALID_CHARACTERS_REGEX = Pattern.compile("^[a-zA-Z_][a-zA-Z0-9_]*$");
Expand Down
19 changes: 19 additions & 0 deletions core/src/test/java/feast/core/validators/MatchersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import static feast.core.validators.Matchers.checkLowerSnakeCase;
import static feast.core.validators.Matchers.checkUpperSnakeCase;
import static feast.core.validators.Matchers.checkValidClassPath;

import com.google.common.base.Strings;
import org.junit.Rule;
Expand Down Expand Up @@ -70,4 +71,22 @@ public void checkLowerSnakeCaseShouldThrowIllegalArgumentExceptionWithFieldForIn
String in = "Invalid_feature name";
checkLowerSnakeCase(in, "feature");
}

@Test
public void checkValidClassPathSuccess() {
checkValidClassPath("com.example.foo", "FeatureTable");
checkValidClassPath("com.example", "FeatureTable");
}

@Test
public void checkValidClassPathEmpty() {
exception.expect(IllegalArgumentException.class);
checkValidClassPath("", "FeatureTable");
}

@Test
public void checkValidClassPathDigits() {
exception.expect(IllegalArgumentException.class);
checkValidClassPath("123", "FeatureTable");
}
}
Binary file added docs/.gitbook/assets/feast-on-aws-1-.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/feast-on-aws-2-.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/feast-on-aws-3-.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
* [Introduction](README.md)
* [Why Feast?](why-feast.md)
* [Getting Started](getting-started/README.md)
* [Quickstart](getting-started/quickstart.md)
* [Deploying Feast](getting-started/deploying-feast/README.md)
* [Docker Compose](getting-started/deploying-feast/docker-compose.md)
* [Kubernetes \(GKE\)](getting-started/deploying-feast/kubernetes.md)
* [Kubernetes \(Amazon EKS\) with Terraform](getting-started/deploying-feast/kubernetes-amazon-eks-with-terraform.md)
* [Connecting to Feast](getting-started/connecting-to-feast-1/README.md)
* [Python SDK](getting-started/connecting-to-feast-1/python-sdk.md)
* [Feast CLI](getting-started/connecting-to-feast-1/connecting-to-feast.md)
Expand Down
7 changes: 0 additions & 7 deletions docs/getting-started/deploying-feast/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Deploying Feast

## Docker Compose

* Fastest way to get Feast up and running.
* Provides a pre-installed Jupyter Notebook with sample code.

{% page-ref page="docker-compose.md" %}

## Kubernetes \(GKE\)

* Recommended way to install Feast for production use.
Expand Down
130 changes: 0 additions & 130 deletions docs/getting-started/deploying-feast/docker-compose.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Kubernetes \(Amazon EKS\) with Terraform

### Overview

This guide will give walk-through of installing Feast on AWS using our [reference terraform config](https://github.com/feast-dev/feast/tree/master/infra/terraform/aws).

{% hint style="info" %}
The terraform config used here is a greenfield installation that doesn't assume anything about, and doesn't integrate with existing resources in your AWS account. It makes this an easy way to get started, but you will likely want to customize this setup before using Feast in production.
{% endhint %}

This terraform config will create the following resoures:

* Kubernetes cluster on Amazon EKS \(3x r3.large nodes\)
* Kafka managed by Amazon MSK \(2x kafka.t3.small nodes\)
* Postgres database for Feast metadata, using serverless Aurora \(min capacity: 2\)
* Redis cluster, using Amazon Elasticache \(1x cache.t2.micro\)
* Amazon EMR cluster to run Spark \(3x spot m4.xlarge\)
* Staging S3 bucket to store temporary data

![](../../.gitbook/assets/feast-on-aws-3-.png)

## 0. Requirements

* An AWS account and [credentials configured locally](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
* [terraform](https://www.terraform.io/) &gt;= 0.12 \(tested with 0.13.3\)
* [helm](https://helm.sh/docs/intro/install/) \(tested with v3.3.4\)

## 1. Configure terraform

Under`feast/infra/terraform/aws`create a `.tfvars` file. The name does not matter, let's call it `my_feast.tfvars`. You can see the full list of configuration variables in `variables.tf` . At very least we need to set `name_prefix` and AWS region:

{% code title="my\_feast.tfvars" %}
```typescript
name_prefix = "my-feast"
region = "us-east-1"
```
{% endcode %}

## 2. Apply

Once you're happy with the configuration you can init terraform and apply

```bash
$ cd feast/infra/terraform/aws
$ terraform init
$ terraform apply -var-file=my_feast.tfvars
```

This might take a while but in the end everything should succeed. You'll also see a kubectl config file created in this directory. Its name will start with `kubeconfig_` and end with a random suffix.

## 3. Connect to Feast using Jupyter

Once the pods are all running we can connect to the Jupyter notebook server running in the cluster.

To be able to connect to the remote Feast server we just set up, you need to forward a port from remote k8s cluster to your local machine. Replace `kubeconfig_XXXXXXX` below with the file name of the kubeconfig generated for you by terraform.

```bash
KUBECONFIG=kubeconfig_XXXXXXX kubectl port-forward \
$(kubectl get pod -o custom-columns=:metadata.name | grep jupyter) 8888:8888
```

```text
Forwarding from 127.0.0.1:8888 -> 8888
Forwarding from [::1]:8888 -> 8888
```

You should be able to connect at `localhost:8888` to the bundled Jupyter Notebook Server with example notebooks.

55 changes: 55 additions & 0 deletions docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Quickstart

## Overview

This guide will give a walkthrough on deploying Feast using Docker Compose, which allows the user to quickly explore the functionalities in Feast with minimal infrastructure setup. It includes a built in Jupyter Notebook Server that is preloaded with PySpark and Feast SDK, as well as Feast example notebooks to get you started.

## 0. Requirements

* [Docker Compose](https://docs.docker.com/compose/install/) should be installed.
* Optional dependancies:
* a [GCP service account](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) that has access to [Google Cloud Storage](https://cloud.google.com/storage).

## 1. Set up environment

Clone the latest stable version of the [Feast repository](https://github.com/gojek/feast/) and setup before we deploy:

```text
git clone https://github.com/feast-dev/feast.git
cd feast/infra/docker-compose
cp .env.sample .env
```

## 2. Start Feast Services

Start the Feast services. Make sure that the following ports are free on the host machines: 6565, 6566, 8888, 9094, 5432. Alternatively, change the port mapping to use a different port on the host.

```javascript
docker-compose up -d
```

{% hint style="info" %}
The Docker Compose deployment will take some time fully startup:

* During this time Feast Serving container may restart, which should be automatically corrected after Feast Core is up and ready.
* If container restarts do not stop after 10 minutes, check the docker compose log to see if there is any error that prevents Feast Core from starting successfully.
{% endhint %}

Once deployed, you should be able to connect at `localhost:8888` to the bundled Jupyter Notebook Server and follow the example notebooks:

{% embed url="http://localhost:8888/tree?" caption="" %}

## 3. Optional dependancies

### 3.1 Set up Google Cloud Platform

The example Jupyter notebook does not require any GCP dependancies by default. If you would like to modify the example such that a GCP service is required \(eg. Google Cloud Storage\), you would need to set up a [service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) that is associated with the notebook. Make sure that the service account has sufficient privileges to access the required GCP services.

Once the service account is created, download the associated JSON key file and copy the file to the path configured in `.env` , under `GCP_SERVICE_ACCOUNT` .

## 4. Further Reading

* [Feast Concepts](../concepts/overview.md)
* [Feast Examples/Tutorials](https://github.com/feast-dev/feast/tree/master/examples)
* [Configuring Feast Components](../reference/configuration-reference.md)

10 changes: 0 additions & 10 deletions examples/basic/README.md

This file was deleted.

Loading

0 comments on commit e6c0887

Please sign in to comment.