Skip to content

Commit

Permalink
Update docker-compose for Feast 0.8 (#1078)
Browse files Browse the repository at this point in the history
Signed-off-by: Khor Shu Heng <khor.heng@gojek.com>

Co-authored-by: Khor Shu Heng <khor.heng@gojek.com>
  • Loading branch information
khorshuheng and khorshuheng authored Oct 21, 2020
1 parent 54b0104 commit a38177e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 94 deletions.
5 changes: 1 addition & 4 deletions infra/docker-compose/.env.sample
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
COMPOSE_PROJECT_NAME=feast
FEAST_VERSION=develop
GCP_SERVICE_ACCOUNT=./gcp-service-accounts/key.json
FEAST_CORE_CONFIG=./core/core.yml
FEAST_JOB_CONTROLLER_CONFIG=./jobcontroller/jobcontroller.yml
FEAST_HISTORICAL_SERVING_CONFIG=./serving/historical-serving.yml
FEAST_HISTORICAL_SERVING_ENABLED=false
FEAST_ONLINE_SERVING_CONFIG=./serving/online-serving.yml
GCP_SERVICE_ACCOUNT=./gcp-service-accounts/placeholder.json
11 changes: 5 additions & 6 deletions infra/docker-compose/core/core.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
feast:
stream:
type: kafka
options:
topic: feast-features
bootstrapServers: "kafka:9092,localhost:9094"
spring:
datasource:
url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_DATABASE:postgres}
username: ${DB_USERNAME:postgres}
password: ${DB_PASSWORD:password}
44 changes: 7 additions & 37 deletions infra/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ services:
image: gcr.io/kf-feast/feast-core:${FEAST_VERSION}
volumes:
- ${FEAST_CORE_CONFIG}:/etc/feast/application.yml
- ${GCP_SERVICE_ACCOUNT}:/etc/gcloud/service-accounts/key.json
environment:
DB_HOST: db
GOOGLE_APPLICATION_CREDENTIALS: /etc/gcloud/service-accounts/key.json
restart: on-failure
depends_on:
- db
- kafka
ports:
- 6565:6565
command:
Expand All @@ -21,23 +18,6 @@ services:
- /opt/feast/feast-core.jar
- --spring.config.location=classpath:/application.yml,file:/etc/feast/application.yml

jobcontroller:
image: gcr.io/kf-feast/feast-jobcontroller:${FEAST_VERSION}
volumes:
- ${FEAST_JOB_CONTROLLER_CONFIG}:/etc/feast/application.yml
- ${GCP_SERVICE_ACCOUNT}:/etc/gcloud/service-accounts/key.json
environment:
GOOGLE_APPLICATION_CREDENTIALS: /etc/gcloud/service-accounts/key.json
depends_on:
- kafka
ports:
- 6570:6570
command:
- java
- -jar
- /opt/feast/feast-job-controller.jar
- --spring.config.location=classpath:/application.yml,file:/etc/feast/application.yml

jupyter:
image: gcr.io/kf-feast/feast-jupyter:${FEAST_VERSION}
volumes:
Expand All @@ -47,7 +27,12 @@ services:
environment:
FEAST_CORE_URL: core:6565
FEAST_ONLINE_SERVING_URL: online_serving:6566
FEAST_HISTORICAL_SERVING_URL: historical_serving:6567
FEAST_SPARK_LAUNCHER: standalone
FEAST_SPARK_STANDALONE_MASTER: local
FEAST_SPARK_HOME: /usr/local/spark
FEAST_SPARK_STAGING_LOCATION: file:///tmp/staging
FEAST_HISTORICAL_FEATURE_OUTPUT_LOCATION: file:///tmp/historical_feature_output
FEAST_HISTORICAL_FEATURE_OUTPUT_FORMAT: parquet
GOOGLE_APPLICATION_CREDENTIALS: /etc/gcloud/service-accounts/key.json
ports:
- 8888:8888
Expand Down Expand Up @@ -85,6 +70,7 @@ services:
volumes:
- ${FEAST_ONLINE_SERVING_CONFIG}:/etc/feast/application.yml
depends_on:
- core
- redis
ports:
- 6566:6566
Expand All @@ -95,22 +81,6 @@ services:
- /opt/feast/feast-serving.jar
- --spring.config.location=classpath:/application.yml,file:/etc/feast/application.yml

historical_serving:
image: gcr.io/kf-feast/feast-serving:${FEAST_VERSION}
volumes:
- ${FEAST_HISTORICAL_SERVING_CONFIG}:/etc/feast/application.yml
- ${GCP_SERVICE_ACCOUNT}:/etc/gcloud/service-accounts/key.json
depends_on:
- redis
ports:
- 6567:6567
restart: on-failure
environment:
GOOGLE_APPLICATION_CREDENTIALS: /etc/gcloud/service-accounts/key.json
command: >
bash -c "if [ $FEAST_HISTORICAL_SERVING_ENABLED != "true" ]; then echo \"Feast historical serving is disabled\"; sleep 10; exit 1; fi
&& java -Xms1024m -Xmx1024m -jar /opt/feast/feast-serving.jar --spring.config.location=classpath:/application.yml,file:/etc/feast/application.yml"
redis:
image: redis:5-alpine
ports:
Expand Down
16 changes: 0 additions & 16 deletions infra/docker-compose/jobcontroller/jobcontroller.yml

This file was deleted.

25 changes: 0 additions & 25 deletions infra/docker-compose/serving/historical-serving.yml

This file was deleted.

6 changes: 0 additions & 6 deletions infra/scripts/test-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ export FEAST_CORE_CONTAINER_IP_ADDRESS=$(docker inspect -f '{{range .NetworkSett
# Wait for Feast Core to be ready
${PROJECT_ROOT_DIR}/infra/scripts/wait-for-it.sh ${FEAST_CORE_CONTAINER_IP_ADDRESS}:6565 --timeout=120

# Get Feast Job Controller container IP address
export FEAST_JOB_CONTROLLER_CONTAINER_IP_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' feast_jobcontroller_1)

# Wait for Feast Job Controller to be ready
"${PROJECT_ROOT_DIR}"/infra/scripts/wait-for-it.sh ${FEAST_JOB_CONTROLLER_CONTAINER_IP_ADDRESS}:6570 --timeout=120

# Get Feast Online Serving container IP address
export FEAST_ONLINE_SERVING_CONTAINER_IP_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' feast_online_serving_1)

Expand Down

0 comments on commit a38177e

Please sign in to comment.