Skip to content

Commit

Permalink
relayer+appgateserver
Browse files Browse the repository at this point in the history
  • Loading branch information
okdas committed Nov 11, 2023
1 parent 81a808a commit a7061e6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ load("ext://restart_process", "docker_build_with_restart")
load("ext://helm_resource", "helm_resource", "helm_repo")

# A list of directories where changes trigger a hot-reload of the sequencer
hot_reload_dirs = ["app", "cmd", "tools", "x"]
hot_reload_dirs = ["app", "cmd", "tools", "x", "pkg"]

# Create a localnet config file from defaults, and if a default configuration doesn't exist, populate it with default values
localnet_config_path = "localnet_config.yaml"
localnet_config_defaults = {
"relayers": {"count": 1},
"gateways": {"count": 1},
"appgateservers": {"count": 1},
# By default, we use the `helm_repo` function below to point to the remote repository
# but can update it to the locally cloned repo for testing & development
"helm_chart_local_repo": {"enabled": False, "path": "../helm-charts"},
Expand Down Expand Up @@ -127,11 +128,23 @@ helm_resource(
poktroll_chart,
flags=[
"--values=./localnet/kubernetes/values-common.yaml",
"--values=./localnet/kubernetes/values-relayer.yaml",
"--set=replicaCount=" + str(localnet_config["relayers"]["count"]),
],
image_deps=["poktrolld"],
image_keys=[("image.repository", "image.tag")],
)
helm_resource(
"appgateservers",
poktroll_chart,
flags=[
"--values=./localnet/kubernetes/values-common.yaml",
"--values=./localnet/kubernetes/values-appgateserver.yaml",
"--set=replicaCount=" + str(localnet_config["appgateservers"]["count"]),
],
image_deps=["poktrolld"],
image_keys=[("image.repository", "image.tag")],
)

# Configure tilt resources (tilt labels and port forwards) for all of the nodes above
k8s_resource(
Expand All @@ -151,4 +164,10 @@ k8s_resource(
resource_deps=["sequencer"],
port_forwards=["8545", "8546", "40005"],
)
k8s_resource(
"appgateservers",
labels=["blockchains"],
resource_deps=["sequencer"],
port_forwards=["42069", "40006"],
)
k8s_resource("anvil", labels=["blockchains"], port_forwards=["8547"])
2 changes: 2 additions & 0 deletions localnet/kubernetes/values-appgateserver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
appgateserver:
enable: true
2 changes: 2 additions & 0 deletions localnet/kubernetes/values-relayer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
relayer:
enable: true

0 comments on commit a7061e6

Please sign in to comment.