-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tommy Hughes <[email protected]>
- Loading branch information
1 parent
d921b92
commit 40437a7
Showing
5 changed files
with
96 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: client | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: client | ||
template: | ||
metadata: | ||
labels: | ||
app: client | ||
spec: | ||
initContainers: | ||
- name: init-registry | ||
command: | ||
- sh | ||
- '-c' | ||
- 'until grpcurl -plaintext -d '''' -format text feast-example-registry.feast.svc.cluster.local:80 grpc.health.v1.Health/Check; do echo waiting for registry; sleep 2; done' | ||
image: 'fullstorydev/grpcurl:v1.9.1-alpine' | ||
- name: feast-apply | ||
image: 'quay.io/tchughesiv/feature-server:0.41.0-dev' | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- | | ||
echo "Starting feast initialization job..."; | ||
cd /feast-init; | ||
echo 'from feast.repo_operations import init_repo | ||
from unittest import mock | ||
from feast.templates.postgres.bootstrap import bootstrap | ||
project_directory = "sample" | ||
template = "postgres" | ||
with mock.patch("click.prompt", side_effect=["postgres.feast.svc.cluster.local", "5432", "feast", "public", "feast", "feast"]): | ||
with mock.patch("click.confirm", side_effect=[True]): | ||
init_repo(project_directory, template)' > postgres-apply.py; | ||
python3 postgres-apply.py; | ||
rm postgres-apply.py; | ||
cd /feast-init/sample/feature_repo; | ||
sed -i 's/postgresql:\/\/postgres:[email protected]:55001/postgresql+psycopg:\/\/feast:[email protected]:5432/' feature_store.yaml; | ||
sed -i 's/entity_key_serialization_version: 2/entity_key_serialization_version: 3/' feature_store.yaml; | ||
sed -i 's/subprocess.run/# subprocess.run/' test_workflow.py; | ||
sed -i 's/print("\\n--- Run feast/# print("\\n--- Run feast/' test_workflow.py; | ||
sed -i 's/print("\\n--- Load features/# print("\\n--- Load features/' test_workflow.py; | ||
sed -i 's/store.materialize_incremental/# store.materialize_incremental/' test_workflow.py; | ||
sed -i 's/store.push/# store.push/' test_workflow.py; | ||
# cat feature_store.yaml; | ||
echo ""; | ||
echo "Executing feast apply..."; | ||
feast apply; | ||
CURRENT_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S"); | ||
feast materialize-incremental $CURRENT_TIME; | ||
cp -f /feast-client/feature_store.yaml .; | ||
volumeMounts: | ||
- name: client-feature-store-config | ||
mountPath: /feast-client | ||
readOnly: true | ||
- name: shared-data | ||
mountPath: /feast-init | ||
containers: | ||
- name: client | ||
image: 'quay.io/tchughesiv/feature-server:0.41.0-dev' | ||
imagePullPolicy: Always | ||
workingDir: /feast-init/sample/feature_repo | ||
command: ["sleep", "infinity"] | ||
volumeMounts: | ||
- name: client-feature-store-config | ||
mountPath: /feast-client | ||
readOnly: true | ||
- name: shared-data | ||
mountPath: /feast-init | ||
volumes: | ||
- name: client-feature-store-config | ||
configMap: | ||
name: feast-example-client | ||
- name: shared-data | ||
emptyDir: {} |