From 98b2e7063617dd07a1db0dada455e78d184ee74c Mon Sep 17 00:00:00 2001 From: Tommy Hughes Date: Wed, 11 Dec 2024 14:24:29 -0600 Subject: [PATCH] docs Signed-off-by: Tommy Hughes --- ...Client-Openshift.ipynb => 02-Client.ipynb} | 8 +- .../operator-quickstart/03-Uninstall.ipynb | 3 +- examples/operator-quickstart/README.md | 3 +- .../operator-quickstart/client-openshift.yaml | 103 ------------------ examples/operator-quickstart/client.yaml | 11 +- examples/operator-quickstart/feast.yaml | 4 + examples/operator-quickstart/postgres.yaml | 1 - 7 files changed, 18 insertions(+), 115 deletions(-) rename examples/operator-quickstart/{02-Client-Openshift.ipynb => 02-Client.ipynb} (85%) delete mode 100644 examples/operator-quickstart/client-openshift.yaml diff --git a/examples/operator-quickstart/02-Client-Openshift.ipynb b/examples/operator-quickstart/02-Client.ipynb similarity index 85% rename from examples/operator-quickstart/02-Client-Openshift.ipynb rename to examples/operator-quickstart/02-Client.ipynb index 32ec59e1f3..aa64cbb15e 100644 --- a/examples/operator-quickstart/02-Client-Openshift.ipynb +++ b/examples/operator-quickstart/02-Client.ipynb @@ -4,9 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Run a test client in Openshift\n", - "\n", - "Running the Feast Operator in OpenShift provides the added benefit of automated TLS via [service serving certificates](https://docs.openshift.com/container-platform/4.17/security/certificates/service-serving-certificate.html), which will be used in this client deployment." + "# Run a test client" ] }, { @@ -27,7 +25,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Then we create the client `Deployment` to apply the definitions, according to the [client-openshift.yaml](./client-openshift.yaml) manifest" + "Then we create the client `Deployment` to apply the definitions, according to the [client.yaml](./client.yaml) manifest" ] }, { @@ -44,7 +42,7 @@ "metadata": {}, "outputs": [], "source": [ - "!kubectl apply -f client-openshift.yaml" + "!kubectl apply -f client.yaml" ] }, { diff --git a/examples/operator-quickstart/03-Uninstall.ipynb b/examples/operator-quickstart/03-Uninstall.ipynb index 5a14d18e50..56219d4c8a 100644 --- a/examples/operator-quickstart/03-Uninstall.ipynb +++ b/examples/operator-quickstart/03-Uninstall.ipynb @@ -14,10 +14,9 @@ "outputs": [], "source": [ "!kubectl delete -f client.yaml\n", - "!kubectl delete -f client-openshift.yaml\n", "!kubectl delete -f feast.yaml\n", "!kubectl delete -f postgres.yaml\n", - "!make -C ../../infra/feast-operator undeploy" + "!kubectl delete -f ../../infra/feast-operator/dist/install.yaml" ] }, { diff --git a/examples/operator-quickstart/README.md b/examples/operator-quickstart/README.md index 4b8bb948ff..47225dcd9e 100644 --- a/examples/operator-quickstart/README.md +++ b/examples/operator-quickstart/README.md @@ -3,6 +3,5 @@ The following notebooks will guide you through an end-to-end journey to install and validate a simple Feast feature store in a Kind Kubernetes or OpenShift cluster: * [01-Install.ipynb](./01-Install.ipynb): Install and configure the cluster with the Operator. -* [02a-Client.ipynb](./02-Client.ipynb): In a kind/k8s cluster, validate the feature store with a remote test application. -* [02b-Client-OpenShift.ipynb](./02-Client-OpenShift.ipynb): In an OpenShift cluster, validate the feature store with a remote test application. +* [02-Client.ipynb](./02-Client.ipynb): In a kind/k8s cluster, validate the feature store with a remote test application. * [03-Uninstall.ipynb](./03-Uninstall.ipynb): Clear the installed deployments. diff --git a/examples/operator-quickstart/client-openshift.yaml b/examples/operator-quickstart/client-openshift.yaml deleted file mode 100644 index d4bb6fa971..0000000000 --- a/examples/operator-quickstart/client-openshift.yaml +++ /dev/null @@ -1,103 +0,0 @@ ---- -kind: ServiceAccount -apiVersion: v1 -metadata: - name: feast-example-client - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: client -spec: - replicas: 1 - selector: - matchLabels: - app: client - template: - metadata: - labels: - app: client - spec: - serviceAccountName: feast-example-client - initContainers: - - name: init-registry - command: - - sh - - '-c' - - 'until grpcurl -H "authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" -insecure -d '''' -format text feast-example-registry.feast.svc.cluster.local:443 grpc.health.v1.Health/Check; do echo waiting for registry; sleep 2; done' - image: 'fullstorydev/grpcurl:v1.9.1-alpine' - - name: feast-apply - image: 'feastdev/feature-server:0.42.0' - 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:mysecretpassword@127.0.0.1:55001/postgresql+psycopg:\/\/feast:feast@postgres.feast.svc.cluster.local: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: 'feastdev/feature-server:0.42.0' - workingDir: /feast-init/sample/feature_repo - command: ["sleep", "infinity"] - volumeMounts: - - name: client-feature-store-config - mountPath: /feast-client - readOnly: true - - name: online-tls - readOnly: true - mountPath: /tls/online/ - - name: registry-tls - readOnly: true - mountPath: /tls/registry/ - - name: shared-data - mountPath: /feast-init - volumes: - - name: client-feature-store-config - configMap: - name: feast-example-client - - name: online-tls - secret: - secretName: feast-example-online-tls - - name: registry-tls - secret: - secretName: feast-example-registry-tls - - name: shared-data - emptyDir: {} diff --git a/examples/operator-quickstart/client.yaml b/examples/operator-quickstart/client.yaml index aa9eacbae9..459af04082 100644 --- a/examples/operator-quickstart/client.yaml +++ b/examples/operator-quickstart/client.yaml @@ -1,3 +1,10 @@ +--- +kind: ServiceAccount +apiVersion: v1 +metadata: + name: feast-example-client + +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -12,12 +19,13 @@ spec: labels: app: client spec: + serviceAccountName: feast-example-client 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' + - 'until grpcurl -H "authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" -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: 'feastdev/feature-server:0.42.0' @@ -67,7 +75,6 @@ spec: containers: - name: client image: 'feastdev/feature-server:0.42.0' - imagePullPolicy: Always workingDir: /feast-init/sample/feature_repo command: ["sleep", "infinity"] volumeMounts: diff --git a/examples/operator-quickstart/feast.yaml b/examples/operator-quickstart/feast.yaml index db2f33df5e..d9590a18ab 100644 --- a/examples/operator-quickstart/feast.yaml +++ b/examples/operator-quickstart/feast.yaml @@ -72,6 +72,8 @@ spec: type: postgres secretRef: name: feast-postgresql + tls: + disable: true registry: local: env: @@ -95,3 +97,5 @@ spec: type: sql secretRef: name: feast-postgresql + tls: + disable: true diff --git a/examples/operator-quickstart/postgres.yaml b/examples/operator-quickstart/postgres.yaml index 2151a3c6e0..3a89150b0f 100644 --- a/examples/operator-quickstart/postgres.yaml +++ b/examples/operator-quickstart/postgres.yaml @@ -42,7 +42,6 @@ spec: containers: - name: postgres image: 'postgres:16-alpine' - imagePullPolicy: IfNotPresent ports: - containerPort: 5432 envFrom: