Skip to content

Commit

Permalink
feat: add ready condition to gm
Browse files Browse the repository at this point in the history
  • Loading branch information
MSevey committed Jun 28, 2024
1 parent 61fa22f commit c3964af
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions main.star
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This Kurtosis package spins up a minimal GM rollup that connects to a local DA


def run(plan):
# TODO: this can be pulled into the local da repo and then imported here
plan.print("Adding Local DA service")
Expand Down Expand Up @@ -29,6 +30,7 @@ def run(plan):
)

plan.print("Adding GM service")
plan.print("NOTE: This can take a few minutes to start up...")
gm_start_cmd = [
"rollkit",
"start",
Expand All @@ -40,5 +42,32 @@ def run(plan):
config=ServiceConfig(
image="ghcr.io/rollkit/gm:1359143",
cmd=["/bin/sh", "-c", " ".join(gm_start_cmd)],
ports={
"jsonrpc": PortSpec(
number=26657,
transport_protocol="TCP",
application_protocol="http",
),
},
public_ports={
"jsonrpc": PortSpec(
number=26657,
transport_protocol="TCP",
application_protocol="http",
)
},
ready_conditions=ReadyCondition(
recipe=ExecRecipe(
command=["rollkit", "status"],
extract={
"output": "fromjson | .node_info.network",
},
),
field="extract.output",
assertion="==",
target_value="gm",
interval="1s",
timeout="5m",
),
),
)

0 comments on commit c3964af

Please sign in to comment.