diff --git a/examples/operator-quickstart/01-Install.ipynb b/examples/operator-quickstart/01-Install.ipynb index 4391677756..8b6c5880c0 100644 --- a/examples/operator-quickstart/01-Install.ipynb +++ b/examples/operator-quickstart/01-Install.ipynb @@ -45,9 +45,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Error from server (AlreadyExists): namespaces \"feast\" already exists\n", + "Context \"feast/api-cluster-gkgh6-gkgh6-sandbox2789-opentlc-com:6443/admin\" modified.\n" + ] + } + ], "source": [ "!kubectl create ns feast\n", "!kubectl config set-context --current --namespace feast" @@ -62,9 +71,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "NAME STATUS AGE\n", + "feast Active 13d\n" + ] + } + ], "source": [ "!kubectl get ns feast" ] @@ -95,19 +113,68 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "secret/postgres-secret configured\n", + "persistentvolumeclaim/postgres-volume-claim unchanged\n", + "deployment.apps/postgres unchanged\n", + "service/postgres unchanged\n", + "deployment.apps/redis created\n", + "service/redis unchanged\n", + "deployment.apps/postgres condition met\n", + "deployment.apps/redis condition met\n" + ] + } + ], "source": [ - "!kubectl apply -f postgres.yaml\n", - "!kubectl wait --for=condition=available deployment/postgres --timeout=2m" + "!kubectl apply -f postgres.yaml -f redis.yaml\n", + "!kubectl wait --for=condition=available deployment/postgres --timeout=2m\n", + "!kubectl wait --for=condition=available deployment/redis --timeout=2m" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[33;1mWarning:\u001b[0m apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+\n", + "NAME READY STATUS RESTARTS AGE\n", + "pod/feast-example-796d979987-2szq2 3/3 Running 0 10m\n", + "pod/postgres-cc5d584c7-bprkn 1/1 Running 0 14m\n", + "pod/redis-574b9b57-4spxb 1/1 Running 0 10s\n", + "\n", + "NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\n", + "service/feast-example-offline ClusterIP 172.30.115.80 443/TCP 13m\n", + "service/feast-example-online ClusterIP 172.30.128.110 443/TCP 13m\n", + "service/feast-example-registry ClusterIP 172.30.155.109 443/TCP 13m\n", + "service/postgres ClusterIP 172.30.136.162 5432/TCP 6d19h\n", + "service/redis ClusterIP 172.30.214.94 6379/TCP 6d19h\n", + "\n", + "NAME READY UP-TO-DATE AVAILABLE AGE\n", + "deployment.apps/feast-example 1/1 1 1 13m\n", + "deployment.apps/postgres 1/1 1 1 14m\n", + "deployment.apps/redis 1/1 1 1 10s\n", + "\n", + "NAME DESIRED CURRENT READY AGE\n", + "replicaset.apps/feast-example-6889f77987 0 0 0 13m\n", + "replicaset.apps/feast-example-796d979987 1 1 1 10m\n", + "replicaset.apps/postgres-cc5d584c7 1 1 1 14m\n", + "replicaset.apps/redis-574b9b57 1 1 1 10s\n", + "\n", + "NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD\n", + "route.route.openshift.io/feast-example-client feast-example-client-feast.apps.cluster-gkgh6.gkgh6.sandbox2789.opentlc.com feast-example-client 8501 None\n" + ] + } + ], "source": [ "!kubectl get all" ] @@ -140,9 +207,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "secret/feast-data-stores configured\n", + "featurestore.feast.dev/example unchanged\n" + ] + } + ], "source": [ "!kubectl apply -f feast.yaml" ] @@ -157,15 +233,50 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "NAME STATUS AGE\n", + "example Ready 13m\n", + "\u001b[33;1mWarning:\u001b[0m apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+\n", + "NAME READY STATUS RESTARTS AGE\n", + "pod/feast-example-796d979987-2szq2 3/3 Terminating 0 11m\n", + "pod/feast-example-796d979987-c8tpj 0/3 PodInitializing 0 13s\n", + "pod/postgres-cc5d584c7-bprkn 1/1 Running 0 15m\n", + "pod/redis-574b9b57-4spxb 1/1 Running 0 46s\n", + "\n", + "NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\n", + "service/feast-example-offline ClusterIP 172.30.115.80 443/TCP 13m\n", + "service/feast-example-online ClusterIP 172.30.128.110 443/TCP 13m\n", + "service/feast-example-registry ClusterIP 172.30.155.109 443/TCP 13m\n", + "service/postgres ClusterIP 172.30.136.162 5432/TCP 6d19h\n", + "service/redis ClusterIP 172.30.214.94 6379/TCP 6d19h\n", + "\n", + "NAME READY UP-TO-DATE AVAILABLE AGE\n", + "deployment.apps/feast-example 0/1 1 0 13m\n", + "deployment.apps/postgres 1/1 1 1 15m\n", + "deployment.apps/redis 1/1 1 1 46s\n", + "\n", + "NAME DESIRED CURRENT READY AGE\n", + "replicaset.apps/feast-example-6889f77987 0 0 0 13m\n", + "replicaset.apps/feast-example-796d979987 1 1 0 11m\n", + "replicaset.apps/postgres-cc5d584c7 1 1 1 15m\n", + "replicaset.apps/redis-574b9b57 1 1 1 46s\n", + "\n", + "NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD\n", + "route.route.openshift.io/feast-example-client feast-example-client-feast.apps.cluster-gkgh6.gkgh6.sandbox2789.opentlc.com feast-example-client 8501 None\n", + "deployment.apps/feast-example condition met\n" + ] + } + ], "source": [ "!kubectl get feast\n", "!kubectl get all\n", - "!kubectl wait --for=condition=available deployment/feast-example-registry --timeout=2m\n", - "!kubectl wait --for=condition=available deployment/feast-example-offline --timeout=2m\n", - "!kubectl wait --for=condition=available deployment/feast-example-online --timeout=2m" + "!kubectl wait --for=condition=available deployment/feast-example" ] }, { @@ -177,29 +288,101 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "project: credit_scoring_local\n", + "provider: local\n", + "offline_store:\n", + " type: duckdb\n", + "online_store:\n", + " type: redis\n", + " connection_string: redis.feast.svc.cluster.local:6379\n", + "registry:\n", + " path: postgresql+psycopg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres.feast.svc.cluster.local:5432/${POSTGRES_DB}\n", + " registry_type: sql\n", + " cache_ttl_seconds: 60\n", + " sqlalchemy_config_kwargs:\n", + " echo: false\n", + " pool_pre_ping: true\n", + "auth:\n", + " type: no_auth\n", + "entity_key_serialization_version: 3\n" + ] + } + ], "source": [ - "!kubectl get deploy feast-example-online -o jsonpath='{.spec.template.spec.containers[*].env[?(@.name==\"FEATURE_STORE_YAML_BASE64\")].value}' | base64 -d" + "!kubectl exec deploy/feast-example -c online -- cat /feast-data/credit_scoring_local/feature_repo/feature_store.yaml" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "project: credit_scoring_local\n", + "provider: local\n", + "offline_store:\n", + " type: duckdb\n", + "online_store:\n", + " type: redis\n", + " connection_string: redis.feast.svc.cluster.local:6379\n", + "registry:\n", + " path: postgresql+psycopg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres.feast.svc.cluster.local:5432/${POSTGRES_DB}\n", + " registry_type: sql\n", + " cache_ttl_seconds: 60\n", + " sqlalchemy_config_kwargs:\n", + " echo: false\n", + " pool_pre_ping: true\n", + "auth:\n", + " type: no_auth\n", + "entity_key_serialization_version: 3\n" + ] + } + ], "source": [ - "!kubectl get deploy feast-example-offline -o jsonpath='{.spec.template.spec.containers[*].env[?(@.name==\"FEATURE_STORE_YAML_BASE64\")].value}' | base64 -d" + "!kubectl exec deploy/feast-example -c offline -- cat /feast-data/credit_scoring_local/feature_repo/feature_store.yaml" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "project: credit_scoring_local\n", + "provider: local\n", + "offline_store:\n", + " type: duckdb\n", + "online_store:\n", + " type: redis\n", + " connection_string: redis.feast.svc.cluster.local:6379\n", + "registry:\n", + " path: postgresql+psycopg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres.feast.svc.cluster.local:5432/${POSTGRES_DB}\n", + " registry_type: sql\n", + " cache_ttl_seconds: 60\n", + " sqlalchemy_config_kwargs:\n", + " echo: false\n", + " pool_pre_ping: true\n", + "auth:\n", + " type: no_auth\n", + "entity_key_serialization_version: 3\n" + ] + } + ], "source": [ - "!kubectl get deploy feast-example-registry -o jsonpath='{.spec.template.spec.containers[*].env[?(@.name==\"FEATURE_STORE_YAML_BASE64\")].value}' | base64 -d" + "!kubectl exec deploy/feast-example -c registry -- cat /feast-data/credit_scoring_local/feature_repo/feature_store.yaml" ] }, { @@ -211,9 +394,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "project: credit_scoring_local\n", + "provider: local\n", + "offline_store:\n", + " host: feast-example-offline.feast.svc.cluster.local\n", + " type: remote\n", + " port: 443\n", + " scheme: https\n", + " cert: /tls/offline/tls.crt\n", + "online_store:\n", + " path: https://feast-example-online.feast.svc.cluster.local:443\n", + " type: remote\n", + " cert: /tls/online/tls.crt\n", + "registry:\n", + " path: feast-example-registry.feast.svc.cluster.local:443\n", + " registry_type: remote\n", + " cert: /tls/registry/tls.crt\n", + "auth:\n", + " type: no_auth\n", + "entity_key_serialization_version: 3\n" + ] + } + ], "source": [ "!kubectl get cm feast-example-client -o jsonpath='{.data.feature_store\\.yaml}'" ] @@ -227,9 +436,33 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " List of relations\n", + " Schema | Name | Type | Owner \n", + "--------+-------------------------+-------+-------\n", + " public | data_sources | table | feast\n", + " public | entities | table | feast\n", + " public | feast_metadata | table | feast\n", + " public | feature_services | table | feast\n", + " public | feature_views | table | feast\n", + " public | managed_infra | table | feast\n", + " public | on_demand_feature_views | table | feast\n", + " public | permissions | table | feast\n", + " public | projects | table | feast\n", + " public | saved_datasets | table | feast\n", + " public | stream_feature_views | table | feast\n", + " public | validation_references | table | feast\n", + "(12 rows)\n", + "\n" + ] + } + ], "source": [ "!kubectl exec deploy/postgres -- psql -h localhost -U feast feast -c '\\dt'" ] @@ -245,11 +478,19 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Feast SDK Version: \"0.42.0\"\n" + ] + } + ], "source": [ - "!kubectl exec deployment/feast-example-registry -- feast version\n", - "!kubectl exec deployment/feast-example-offline -- feast version\n", - "!kubectl exec deployment/feast-example-online -- feast version" + "!kubectl exec deployment/feast-example -c online -- feast version\n", + "!kubectl exec deployment/feast-example -c offline -- feast version\n", + "!kubectl exec deployment/feast-example -c registry -- feast version" ] }, { @@ -274,7 +515,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.4" + "version": "3.11.11" } }, "nbformat": 4, diff --git a/examples/operator-quickstart/02-Client.ipynb b/examples/operator-quickstart/02-Client.ipynb index c3d5a1b0e8..b075c8fc5d 100644 --- a/examples/operator-quickstart/02-Client.ipynb +++ b/examples/operator-quickstart/02-Client.ipynb @@ -383,7 +383,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.4" + "version": "3.11.11" } }, "nbformat": 4, diff --git a/examples/operator-quickstart/feast.yaml b/examples/operator-quickstart/feast.yaml index 6e54ceee01..a16765a09c 100644 --- a/examples/operator-quickstart/feast.yaml +++ b/examples/operator-quickstart/feast.yaml @@ -4,13 +4,6 @@ kind: Secret metadata: name: feast-data-stores stringData: - postgres: | - host: postgres.feast.svc.cluster.local - port: 5432 - database: ${POSTGRES_DB} - db_schema: public - user: ${POSTGRES_USER} - password: ${POSTGRES_PASSWORD} redis: | connection_string: redis.feast.svc.cluster.local:6379 sql: | @@ -29,18 +22,58 @@ spec: feastProject: credit_scoring_local services: offlineStore: - tls: - disable: true + persistence: + file: + type: duckdb + env: + - name: POSTGRES_DB + valueFrom: + secretKeyRef: + name: postgres-secret + key: POSTGRES_DB + - name: POSTGRES_USER + valueFrom: + secretKeyRef: + name: postgres-secret + key: POSTGRES_USER + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + name: postgres-secret + key: POSTGRES_PASSWORD + image: quay.io/tchughesiv/feature-server:0.42.0 + imagePullPolicy: Always onlineStore: persistence: store: type: redis secretRef: name: feast-data-stores - tls: - disable: true + env: + - name: POSTGRES_DB + valueFrom: + secretKeyRef: + name: postgres-secret + key: POSTGRES_DB + - name: POSTGRES_USER + valueFrom: + secretKeyRef: + name: postgres-secret + key: POSTGRES_USER + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + name: postgres-secret + key: POSTGRES_PASSWORD + image: quay.io/tchughesiv/feature-server:0.42.0 + imagePullPolicy: Always registry: local: + persistence: + store: + type: sql + secretRef: + name: feast-data-stores env: - name: POSTGRES_DB valueFrom: @@ -57,10 +90,5 @@ spec: secretKeyRef: name: postgres-secret key: POSTGRES_PASSWORD - persistence: - store: - type: sql - secretRef: - name: feast-data-stores - tls: - disable: true + image: quay.io/tchughesiv/feature-server:0.42.0 + imagePullPolicy: Always