From 1354fdb81449ea8cc7419bbc33c0a6dab6647853 Mon Sep 17 00:00:00 2001 From: Simon Shillaker Date: Fri, 4 Mar 2022 15:59:36 +0100 Subject: [PATCH 1/2] Mount k8s config in cpp container in k8s setup --- docker-compose-k8s.yml | 17 ++++++++--------- docs/source/kubernetes.md | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/docker-compose-k8s.yml b/docker-compose-k8s.yml index d64b716b5..967d72831 100644 --- a/docker-compose-k8s.yml +++ b/docker-compose-k8s.yml @@ -10,9 +10,11 @@ services: environment: - LD_LIBRARY_PATH=/build/faasm/third-party/lib:/usr/local/lib volumes: + - ./faasm.ini:/root/.config/faasm.ini - ./:/usr/local/code/faasm/ - - ./dev/faasm/build:/build/faasm/ - - ./dev/faasm-local:/usr/local/faasm + - ${FAASM_BUILD_DIR}:${FAASM_BUILD_MOUNT} + - ./dev/faasm-local/:${FAASM_LOCAL_MOUNT} + - ${CONAN_CACHE_MOUNT_SOURCE}:/root/.conan cpp-cli: image: ${CPP_CLI_IMAGE} @@ -20,12 +22,10 @@ services: network_mode: host stdin_open: true tty: true - environment: - - LOG_LEVEL=debug volumes: + - ./faasm.ini:/root/.config/faasm.ini - ./clients/cpp:/code/cpp - - ./dev/cpp/build:/build/cpp - - ./dev/faasm-local:/usr/local/faasm + - ./dev/faasm-local/:${FAASM_LOCAL_MOUNT} python-cli: image: ${PYTHON_CLI_IMAGE} @@ -33,8 +33,7 @@ services: network_mode: host stdin_open: true tty: true - environment: - - LOG_LEVEL=debug volumes: + - ./faasm.ini:/root/.config/faasm.ini - ./clients/python:/code/python - - ./dev/faasm-local:/usr/local/faasm + - ./dev/faasm-local/:${FAASM_LOCAL_MOUNT} diff --git a/docs/source/kubernetes.md b/docs/source/kubernetes.md index 94415e97b..f43cacced 100644 --- a/docs/source/kubernetes.md +++ b/docs/source/kubernetes.md @@ -77,10 +77,10 @@ docker-compose -f docker-compose-k8s.yml run cpp-cli /bin/bash # Compile and upload a function inv func demo hello -inv func.upload demo hello --host= +inv func.upload demo hello # Invoke the function -inv func.invoke demo hello --host= --port= +inv func.invoke demo hello ``` # Troubleshooting From af5549ff1314790c3e1a9fbba9e318b16b88e7f8 Mon Sep 17 00:00:00 2001 From: Simon Shillaker Date: Fri, 4 Mar 2022 18:06:01 +0100 Subject: [PATCH 2/2] Fix redis workers task --- faasmcli/faasmcli/tasks/call.py | 2 +- faasmcli/faasmcli/tasks/redis.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/faasmcli/faasmcli/tasks/call.py b/faasmcli/faasmcli/tasks/call.py index 03dea99bb..e31952cf2 100644 --- a/faasmcli/faasmcli/tasks/call.py +++ b/faasmcli/faasmcli/tasks/call.py @@ -74,7 +74,7 @@ def status(ctx, call_id=None): @task -def exec_graph(ctx, call_id=None, headless=True, output_file=None): +def exec_graph(ctx, call_id=None, headless=False, output_file=None): """ Get the execution graph for the given call ID """ diff --git a/faasmcli/faasmcli/tasks/redis.py b/faasmcli/faasmcli/tasks/redis.py index 7f0d3d4b1..a1e109a4f 100644 --- a/faasmcli/faasmcli/tasks/redis.py +++ b/faasmcli/faasmcli/tasks/redis.py @@ -45,7 +45,7 @@ def all_workers(ctx, local=False, docker=False, knative=True): """ List all available Faasm instances """ - _do_redis_command("smembers available_faaslets", local, docker, knative) + _do_redis_command("smembers available_hosts", local, docker, knative) @task