Bradley Hurley
12/28/2021, 8:58 PMmicrok8s
for local development alongside localstack
. Ideally, this would allow us to port our existing prefect deployment to k8Kevin Kho
12/28/2021, 9:34 PMBradley Hurley
12/28/2021, 9:35 PMhelm repo add localstack-charts <https://localstack.github.io/helm-charts>
helm repo add prefecthq <https://prefecthq.github.io/server/>
helm repo update
helm install aws localstack-charts/localstack
helm list -o json
helm install --set prefectVersionTag=0.15.11-python3.9 --set serverVersionTag=core-0.15.11 --set agent.enabled=true prefect prefecthq/prefect-server
prefect backend server
kubectl port-forward service/prefect-ui 8080
kubectl port-forward service/prefect-apollo 4200
prefect server create-tenant --name default --slug default
prefect create project 'default'
Register Flow - python -m flow
flow.py
from prefect import Flow, task
@task(name="hello", log_stdout=True)
def hello():
print("Attempting To Say Hello")
def create_flow() -> Flow:
with Flow(name="say-hello") as flow:
hello_called = hello()
return flow
if __name__ == "__main__":
create_flow().register(project_name="default")
The flow fails:
Pod prefect-job-4917beb4--1-ndkbd failed.
Container 'flow' state: terminated
Exit Code:: 1
Reason: Error
Failed to load and execute Flow's environment: ModuleNotFoundError("No module named '/Users/bradley/'")
I've done a fair bit of poking around, but can't seem to get back on track.