Skip to content

Commit

Permalink
removed the script and used composed files
Browse files Browse the repository at this point in the history
Signed-off-by: Abdul Hameed <[email protected]>
  • Loading branch information
redhatHameed committed Sep 16, 2024
1 parent 896baf6 commit b2df9d4
Show file tree
Hide file tree
Showing 15 changed files with 121 additions and 129 deletions.
16 changes: 16 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Feast Examples

1. **[Quickstart Example](https://github.com/feast-dev/feast/tree/master/examples/quickstart)**: This is a step-by-step guide for getting started with Feast.

2. **[Java Demo](https://github.com/feast-dev/feast/tree/master/examples/java-demo)**: Demonstrates how to use Feast with Java feature server and deployed with Kubernetes.

3. **[Python Helm Demo](https://github.com/feast-dev/feast/tree/master/examples/python-helm-demo)**: Demonstrates Feast with Kubernetes using Helm charts and Python feature server.

4. **[RBAC Local](https://github.com/feast-dev/feast/tree/master/examples/rbac-local)**: Demonstrates using notebooks how configure and test Role-Based Access Control (RBAC) for securing access in Feast using OIDC authorization type with in a local environment.

5. **[RBAC Remote](https://github.com/feast-dev/feast/tree/master/examples/rbac-local)**: Demonstrates how to configure and test Role-Based Access Control (RBAC) for securing access in Feast using Kubernetes or OIDC Authentication type with in Kubernetes environment.

6. **[Remote Offline Store](https://github.com/feast-dev/feast/tree/master/examples/remote-offline-store)**: Demonstrates how to set up and use remote offline server.

7. **[Podman/Podman Compose_local](https://github.com/feast-dev/feast/tree/master/examples/podman_local)**: Demonstrates how to deploy Feast remote server components using Podman Compose locally.

72 changes: 72 additions & 0 deletions examples/podman_local/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

# Feast example using Podman and Podman Compose

This guide explains how to deploy Feast remote server components using Podman Compose locally and run an example using the client.

## Prerequisites

1. **Podman**: [Podman installation guide](https://podman.io/).
2. **Podman Compose**: [Podman Compose Installation guide](https://github.com/containers/podman-compose/tree/main?tab=readme-ov-file#installation]).
3. **Python 3.9+ environment**
4. **Feast CLI**

## Setup

### 1. **Feast Project Setup**

- The project [feature_repo](feature_repo) already created using `feast init` command

### 2. **Run the Podman Compose File**

- Use the [docker-compose.yml](docker-compose.yml) file to install and run the Feast feature servers (online, offline, and registry) on podman. The docker-compose file uses the `feastdev/feature-server:latest` image. Each respective service has specific port mappings and maps the volume from the `./feature_repo` configuration.
- To start the feature servers, run the following command:

```bash
podman-compose up -d
```

- This will launch the necessary containers for online, offline, and registry feature servers.

### 3. **Verify the Installation**

- Use the `podman ps` command to verify that the containers are running:

```bash
podman ps
```

Example output:

```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
61442d6d6ef3 docker.io/feastdev/feature-server:latest feast -c /feature... 2 minutes ago Up 2 minutes 0.0.0.0:6566->6566/tcp online-feature-server
1274c21716a6 docker.io/feastdev/feature-server:latest feast -c /feature... 2 minutes ago Up 2 minutes 0.0.0.0:8815->8815/tcp offline-feature-server
4e38ca8c39db docker.io/feastdev/feature-server:latest feast -c /feature... 2 minutes ago Up 2 minutes 0.0.0.0:6570->6570/tcp registry-feature-server
```

- Alternatively, you can verify the running containers through **Podman Desktop**:
![podman.png](podman.png)

### 4. **Run Feast Apply**

- To apply the feature store definitions to the remote registry, run the following command:

```bash
podman exec registry-feature-server feast -c /feature_repo apply
```

### 5. **Run Client Examples**

- The [client](client) folder contains example client-side configurations and code:
- [feature_store.yaml](client/feature_repo/feature_store.yaml): Configuration for the feature store.
- [test.py](client/feature_repo/test.py): Example Python script to interact with the Feast server.

### 6. **Cleanup**

- To stop and remove the running containers, run the following command:

```bash
podman-compose down
```

- This will stop all the feature server containers and clean up the environment.
File renamed without changes.
33 changes: 33 additions & 0 deletions examples/podman_local/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: '3.9'

x-defaults: &default-settings
image: feastdev/feature-server:latest
restart: unless-stopped

services:
online-feature-server:
<<: *default-settings
container_name: online-feature-server
command: feast -c /feature_repo serve -h 0.0.0.0
ports:
- "6566:6566"
volumes:
- ./feature_repo:/feature_repo

offline-feature-server:
<<: *default-settings
container_name: offline-feature-server
command: feast -c /feature_repo serve_offline -h 0.0.0.0
ports:
- "8815:8815"
volumes:
- ./feature_repo:/feature_repo

registry-feature-server:
<<: *default-settings
container_name: registry-feature-server
command: feast -c /feature_repo serve_registry
ports:
- "6570:6570"
volumes:
- ./feature_repo:/feature_repo
46 changes: 0 additions & 46 deletions examples/podman_local/my_project/README.md

This file was deleted.

83 changes: 0 additions & 83 deletions examples/podman_local/my_project/feast_podman.sh

This file was deleted.

Binary file not shown.
Binary file removed examples/podman_local/my_project/podman.png
Binary file not shown.
Binary file added examples/podman_local/podman.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b2df9d4

Please sign in to comment.