Skip to content

Commit e6c0887

Browse files
committed
Merge branch 'master' into job-service-helm
Signed-off-by: Tsotne Tabidze <tsotnet@gmail.com>
2 parents b3aca8d + f0095d7 commit e6c0887

File tree

30 files changed

+501
-1031
lines changed

30 files changed

+501
-1031
lines changed

.github/workflows/complete.yml

-15
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,6 @@ jobs:
127127
- name: Run integration tests
128128
run: make test-java-integration
129129

130-
load-test:
131-
needs: build-push-docker-images
132-
runs-on: ubuntu-latest
133-
steps:
134-
- uses: actions/checkout@v2
135-
- uses: actions/setup-python@v2
136-
with:
137-
python-version: '3.7'
138-
- name: Run load test
139-
run: make test-load GIT_SHA=${GITHUB_SHA}
140-
- uses: actions/upload-artifact@v2
141-
with:
142-
name: load-test-results
143-
path: load-test-output/
144-
145130
tests-docker-compose:
146131
needs:
147132
- build-push-docker-images

core/src/main/java/feast/core/validators/Matchers.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class Matchers {
2525
private static Pattern BIGQUERY_TABLE_REF_REGEX =
2626
Pattern.compile("[a-zA-Z0-9-]+[:]+[a-zA-Z0-9_]+[.]+[a-zA-Z0-9_]*");
2727
private static Pattern CLASS_PATH_REGEX =
28-
Pattern.compile("[a-zA-Z_$][a-zA-Z0-9_$]*(\\.[a-zA-Z_$][a-zA-Z0-9_$]*)");
28+
Pattern.compile("[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*$");
2929
private static Pattern UPPER_SNAKE_CASE_REGEX = Pattern.compile("^[A-Z0-9]+(_[A-Z0-9]+)*$");
3030
private static Pattern LOWER_SNAKE_CASE_REGEX = Pattern.compile("^[a-z0-9]+(_[a-z0-9]+)*$");
3131
private static Pattern VALID_CHARACTERS_REGEX = Pattern.compile("^[a-zA-Z_][a-zA-Z0-9_]*$");

core/src/test/java/feast/core/validators/MatchersTest.java

+19
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import static feast.core.validators.Matchers.checkLowerSnakeCase;
2020
import static feast.core.validators.Matchers.checkUpperSnakeCase;
21+
import static feast.core.validators.Matchers.checkValidClassPath;
2122

2223
import com.google.common.base.Strings;
2324
import org.junit.Rule;
@@ -70,4 +71,22 @@ public void checkLowerSnakeCaseShouldThrowIllegalArgumentExceptionWithFieldForIn
7071
String in = "Invalid_feature name";
7172
checkLowerSnakeCase(in, "feature");
7273
}
74+
75+
@Test
76+
public void checkValidClassPathSuccess() {
77+
checkValidClassPath("com.example.foo", "FeatureTable");
78+
checkValidClassPath("com.example", "FeatureTable");
79+
}
80+
81+
@Test
82+
public void checkValidClassPathEmpty() {
83+
exception.expect(IllegalArgumentException.class);
84+
checkValidClassPath("", "FeatureTable");
85+
}
86+
87+
@Test
88+
public void checkValidClassPathDigits() {
89+
exception.expect(IllegalArgumentException.class);
90+
checkValidClassPath("123", "FeatureTable");
91+
}
7392
}
60 KB
Loading
69.2 KB
Loading
63.7 KB
Loading

docs/SUMMARY.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
* [Introduction](README.md)
44
* [Why Feast?](why-feast.md)
55
* [Getting Started](getting-started/README.md)
6+
* [Quickstart](getting-started/quickstart.md)
67
* [Deploying Feast](getting-started/deploying-feast/README.md)
7-
* [Docker Compose](getting-started/deploying-feast/docker-compose.md)
88
* [Kubernetes \(GKE\)](getting-started/deploying-feast/kubernetes.md)
9+
* [Kubernetes \(Amazon EKS\) with Terraform](getting-started/deploying-feast/kubernetes-amazon-eks-with-terraform.md)
910
* [Connecting to Feast](getting-started/connecting-to-feast-1/README.md)
1011
* [Python SDK](getting-started/connecting-to-feast-1/python-sdk.md)
1112
* [Feast CLI](getting-started/connecting-to-feast-1/connecting-to-feast.md)

docs/getting-started/deploying-feast/README.md

-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Deploying Feast
22

3-
## Docker Compose
4-
5-
* Fastest way to get Feast up and running.
6-
* Provides a pre-installed Jupyter Notebook with sample code.
7-
8-
{% page-ref page="docker-compose.md" %}
9-
103
## Kubernetes \(GKE\)
114

125
* Recommended way to install Feast for production use.

docs/getting-started/deploying-feast/docker-compose.md

-130
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Kubernetes \(Amazon EKS\) with Terraform
2+
3+
### Overview
4+
5+
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).
6+
7+
{% hint style="info" %}
8+
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.
9+
{% endhint %}
10+
11+
This terraform config will create the following resoures:
12+
13+
* Kubernetes cluster on Amazon EKS \(3x r3.large nodes\)
14+
* Kafka managed by Amazon MSK \(2x kafka.t3.small nodes\)
15+
* Postgres database for Feast metadata, using serverless Aurora \(min capacity: 2\)
16+
* Redis cluster, using Amazon Elasticache \(1x cache.t2.micro\)
17+
* Amazon EMR cluster to run Spark \(3x spot m4.xlarge\)
18+
* Staging S3 bucket to store temporary data
19+
20+
![](../../.gitbook/assets/feast-on-aws-3-.png)
21+
22+
## 0. Requirements
23+
24+
* An AWS account and [credentials configured locally](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
25+
* [terraform](https://www.terraform.io/) &gt;= 0.12 \(tested with 0.13.3\)
26+
* [helm](https://helm.sh/docs/intro/install/) \(tested with v3.3.4\)
27+
28+
## 1. Configure terraform
29+
30+
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:
31+
32+
{% code title="my\_feast.tfvars" %}
33+
```typescript
34+
name_prefix = "my-feast"
35+
region = "us-east-1"
36+
```
37+
{% endcode %}
38+
39+
## 2. Apply
40+
41+
Once you're happy with the configuration you can init terraform and apply
42+
43+
```bash
44+
$ cd feast/infra/terraform/aws
45+
$ terraform init
46+
$ terraform apply -var-file=my_feast.tfvars
47+
```
48+
49+
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.
50+
51+
## 3. Connect to Feast using Jupyter
52+
53+
Once the pods are all running we can connect to the Jupyter notebook server running in the cluster.
54+
55+
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.
56+
57+
```bash
58+
KUBECONFIG=kubeconfig_XXXXXXX kubectl port-forward \
59+
$(kubectl get pod -o custom-columns=:metadata.name | grep jupyter) 8888:8888
60+
```
61+
62+
```text
63+
Forwarding from 127.0.0.1:8888 -> 8888
64+
Forwarding from [::1]:8888 -> 8888
65+
```
66+
67+
You should be able to connect at `localhost:8888` to the bundled Jupyter Notebook Server with example notebooks.
68+

docs/getting-started/quickstart.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Quickstart
2+
3+
## Overview
4+
5+
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.
6+
7+
## 0. Requirements
8+
9+
* [Docker Compose](https://docs.docker.com/compose/install/) should be installed.
10+
* Optional dependancies:
11+
* 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).
12+
13+
## 1. Set up environment
14+
15+
Clone the latest stable version of the [Feast repository](https://github.com/gojek/feast/) and setup before we deploy:
16+
17+
```text
18+
git clone https://github.com/feast-dev/feast.git
19+
cd feast/infra/docker-compose
20+
cp .env.sample .env
21+
```
22+
23+
## 2. Start Feast Services
24+
25+
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.
26+
27+
```javascript
28+
docker-compose up -d
29+
```
30+
31+
{% hint style="info" %}
32+
The Docker Compose deployment will take some time fully startup:
33+
34+
* During this time Feast Serving container may restart, which should be automatically corrected after Feast Core is up and ready.
35+
* 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.
36+
{% endhint %}
37+
38+
Once deployed, you should be able to connect at `localhost:8888` to the bundled Jupyter Notebook Server and follow the example notebooks:
39+
40+
{% embed url="http://localhost:8888/tree?" caption="" %}
41+
42+
## 3. Optional dependancies
43+
44+
### 3.1 Set up Google Cloud Platform
45+
46+
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.
47+
48+
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` .
49+
50+
## 4. Further Reading
51+
52+
* [Feast Concepts](../concepts/overview.md)
53+
* [Feast Examples/Tutorials](https://github.com/feast-dev/feast/tree/master/examples)
54+
* [Configuring Feast Components](../reference/configuration-reference.md)
55+

examples/basic/README.md

-10
This file was deleted.

0 commit comments

Comments
 (0)