Hello, I’m new to Prefect and I need some help getting started. I’m currently struggling with two is...
m

Mia

over 3 years ago
Hello, I’m new to Prefect and I need some help getting started. I’m currently struggling with two issues: 1. I’m setting up Prefect server on EKS using Helm. After
helm upgrade
ran successfully, I get commands such as
1 Run the following command to get the UI URL:

  UI_HOST=$( \
    kubectl get svc \
    --namespace prefect \
    --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}" \
    prefect-server-ui \
  ) \
  && echo "UI available at: http://$UI_HOST:8080"...
when I run the above command, I get an error saying
error: error executing template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}": template: output:1:10: executing "output" at <index .status.loadBalancer.ingress 0>: error calling index: index of untyped nil
Then I have to run
kubectl port-forward <name of the service> <port>:<port>
to get ui and apollo servers running. Is there a way to run this without port forwarding? 2. I’m trying to run a hello world example flow on prefect server on my EKS cluster. I tried to trigger it from my command line by creating a project and running
prefect register --project test-project -p hello/
. The registering seem to run successfully but I don’t see the flow on the ui. I’m also not able to manually create flow project using ui. Am I interacting with two different prefect engine here? How do I register prefect flow so that it is running on my prefect server on EKS cluster?
<@ULVA73B9P> I am using Prefect 3 locally using docker to run the server, and then for each flow, we...
c

Chris Drumgoole

10 months ago
@Marvin I am using Prefect 3 locally using docker to run the server, and then for each flow, we deplpoy to docker (local). It was working before but now it's not after rebooting my machine. I think it's due to the DOCKER_HOST env variable (whcih is not set currently). I am on MacOS and Docker Desktop is running. Flow deploy co
ctos_monitoring_list_flow.deploy(
            name=config["name"],
            work_pool_name="local-docker-work-pool",
            work_queue_name="ctos-monitoring-list-queue",
            image=DockerImage(
                name="prefecthq/prefect", tag="3-latest", dockerfile="Dockerfile.worker"
            ),
            parameters=config["params"],
            cron=config["schedule"],
            job_variables={"networks": ["dmp_default", "dmp-etl-prefect_default"]},
            push=False,
            build=True,
        )
Error when trying to deploy:
The above exception was the direct cause of the following exception:

...
  File "/Users/cdrum/Development/alternatives/dmp-etl-prefect/dmp-etl-venv/lib/python3.13/site-packages/prefect/utilities/dockerutils.py", line 166, in build_image
    with docker_client() as client:
         ~~~~~~~~~~~~~^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/Users/cdrum/Development/alternatives/dmp-etl-prefect/dmp-etl-venv/lib/python3.13/site-packages/prefect/utilities/dockerutils.py", line 115, in docker_client
    raise RuntimeError(
        "This error is often thrown because Docker is not running. Please ensure Docker is running."
    ) from exc
RuntimeError: This error is often thrown because Docker is not running. Please ensure Docker is running.