Skip to main content
Version: 0.83.14

Plan

The plan is a representation of what Kurtosis will do inside an enclave. It is central to the multi-phase run design of Kurtosis. Plans are built via Starlark by calling functions on the Plan object like add_service, remove_service, or upload_files.

You never construct a Plan object in Starlark. Instead, the run function of your main.star should have a variable called plan, and Kurtosis will inject the Plan object into it. You can then pass the object down to any functions that need it.

For example:

# ------ main.star ---------
some_library = import_module("github.com/some-org/some-library/lib.star")

def run(plan):
plan.print("Hello, world!")

some_library.do_something(plan)
caution

Any value returned by a Plan function (e.g. Plan.add_service, Plan.upload_files) is a future-reference to the actual value that will only exist at execution time. This means that you cannot run conditionals or manipulations on it in Starlark, at interpretation time!

Instead, do the manipulation you need at execution time, using something like Plan.run_sh or Plan.run_python.