Skip to content

Commit

Permalink
feat: deployment using ImportSerializer
Browse files Browse the repository at this point in the history
currently failing because of PrefectHQ/prefect#5984
  • Loading branch information
tekumara committed Jul 9, 2022
1 parent 33b6f97 commit 4b45d3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ kubes-flow: $(venv)
$(venv)/bin/prefect deployment run kubes-flow/kubes-deployment-orion-packager
$(venv)/bin/prefect deployment inspect kubes-flow/kubes-deployment-file-packager
$(venv)/bin/prefect deployment run kubes-flow/kubes-deployment-file-packager
$(venv)/bin/prefect deployment inspect kubes-flow/kubes-deployment-orion-packager-import
$(venv)/bin/prefect deployment run kubes-flow/kubes-deployment-orion-packager-import
$(venv)/bin/prefect flow-run ls
@echo Visit http://localhost:4200

Expand Down
11 changes: 11 additions & 0 deletions flows/kubes_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,14 @@ def kubes_flow() -> None:
),
packager=FilePackager(filesystem=RemoteFileSystem(basepath="s3://minio-flows/")),
)

# use the default OrionPackager to store the flow's import path as a block in the database.
# The flow is already stored inside the docker image and so can be imported.
Deployment(
name="kubes-deployment-orion-packager-import",
flow=kubes_flow,
flow_runner=KubernetesFlowRunner(
image="orion-registry:5000/flow:latest",
),
packager=OrionPackager(serializer=ImportSerializer()),
)

0 comments on commit 4b45d3b

Please sign in to comment.