From a7061e64cb2749416788b1e36ed2510fc7a1d536 Mon Sep 17 00:00:00 2001 From: DK Date: Sat, 11 Nov 2023 09:35:24 -0800 Subject: [PATCH 1/4] relayer+appgateserver --- Tiltfile | 21 ++++++++++++++++++- localnet/kubernetes/values-appgateserver.yaml | 2 ++ localnet/kubernetes/values-relayer.yaml | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 localnet/kubernetes/values-appgateserver.yaml create mode 100644 localnet/kubernetes/values-relayer.yaml diff --git a/Tiltfile b/Tiltfile index 1333a406e..62684867d 100644 --- a/Tiltfile +++ b/Tiltfile @@ -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"}, @@ -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( @@ -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"]) diff --git a/localnet/kubernetes/values-appgateserver.yaml b/localnet/kubernetes/values-appgateserver.yaml new file mode 100644 index 000000000..85b34fd1d --- /dev/null +++ b/localnet/kubernetes/values-appgateserver.yaml @@ -0,0 +1,2 @@ +appgateserver: + enable: true \ No newline at end of file diff --git a/localnet/kubernetes/values-relayer.yaml b/localnet/kubernetes/values-relayer.yaml new file mode 100644 index 000000000..74f6fdb5f --- /dev/null +++ b/localnet/kubernetes/values-relayer.yaml @@ -0,0 +1,2 @@ +relayer: + enable: true \ No newline at end of file From 1831575085eef41a9471f0d7828e56441c830148 Mon Sep 17 00:00:00 2001 From: DK Date: Tue, 14 Nov 2023 15:10:47 -0800 Subject: [PATCH 2/4] switch to the other chart --- Tiltfile | 24 ++++++++++++------------ localnet/kubernetes/values-relayer.yaml | 2 -- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Tiltfile b/Tiltfile index 62684867d..442e702f4 100644 --- a/Tiltfile +++ b/Tiltfile @@ -7,7 +7,7 @@ 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}, + "relayminers": {"count": 1}, "gateways": {"count": 1}, "appgateservers": {"count": 1}, # By default, we use the `helm_repo` function below to point to the remote repository @@ -26,15 +26,15 @@ if (localnet_config_file != localnet_config) or ( # Configure helm chart reference. If using a local repo, set the path to the local repo; otherwise, use our own helm repo. helm_repo("pokt-network", "https://pokt-network.github.io/helm-charts/") -sequencer_chart = "pokt-network/poktroll-sequencer" -poktroll_chart = "pokt-network/poktroll" +chart_prefix = "pokt-network/" if localnet_config["helm_chart_local_repo"]["enabled"]: helm_chart_local_repo = localnet_config["helm_chart_local_repo"]["path"] hot_reload_dirs.append(helm_chart_local_repo) print("Using local helm chart repo " + helm_chart_local_repo) + chart_prefix = helm_chart_local_repo + "/charts/" - sequencer_chart = helm_chart_local_repo + "/charts/poktroll-sequencer" - poktroll_chart = helm_chart_local_repo + "/charts/poktroll" + # sequencer_chart = helm_chart_local_repo + "/charts/poktroll-sequencer" + # poktroll_chart = helm_chart_local_repo + "/charts/poktroll" # Import files into Kubernetes ConfigMap @@ -115,21 +115,21 @@ k8s_yaml( ["localnet/kubernetes/celestia-rollkit.yaml", "localnet/kubernetes/anvil.yaml"] ) -# Run pocket-specific nodes (sequencer, relayers, etc...) +# Run pocket-specific nodes (sequencer, relayminers, etc...) helm_resource( "sequencer", - sequencer_chart, + chart_prefix + "poktroll-sequencer", flags=["--values=./localnet/kubernetes/values-common.yaml"], image_deps=["poktrolld"], image_keys=[("image.repository", "image.tag")], ) helm_resource( - "relayers", - poktroll_chart, + "relayminers", + chart_prefix + "relayminer", flags=[ "--values=./localnet/kubernetes/values-common.yaml", - "--values=./localnet/kubernetes/values-relayer.yaml", - "--set=replicaCount=" + str(localnet_config["relayers"]["count"]), + "--values=./localnet/kubernetes/values-relayminer.yaml", + "--set=replicaCount=" + str(localnet_config["relayminers"]["count"]), ], image_deps=["poktrolld"], image_keys=[("image.repository", "image.tag")], @@ -159,7 +159,7 @@ k8s_resource( port_forwards=["36657", "40004"], ) k8s_resource( - "relayers", + "relayminers", labels=["blockchains"], resource_deps=["sequencer"], port_forwards=["8545", "8546", "40005"], diff --git a/localnet/kubernetes/values-relayer.yaml b/localnet/kubernetes/values-relayer.yaml index 74f6fdb5f..e69de29bb 100644 --- a/localnet/kubernetes/values-relayer.yaml +++ b/localnet/kubernetes/values-relayer.yaml @@ -1,2 +0,0 @@ -relayer: - enable: true \ No newline at end of file From 8f8d06884e04dec15157576d90c21e77308c5968 Mon Sep 17 00:00:00 2001 From: DK Date: Tue, 14 Nov 2023 16:21:57 -0800 Subject: [PATCH 3/4] cleanup --- Dockerfile.dev | 2 ++ Tiltfile | 8 ++------ localnet/kubernetes/values-appgateserver.yaml | 4 ++-- localnet/kubernetes/values-relayer.yaml | 0 localnet/kubernetes/values-relayminer.yaml | 2 ++ 5 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 localnet/kubernetes/values-relayer.yaml create mode 100644 localnet/kubernetes/values-relayminer.yaml diff --git a/Dockerfile.dev b/Dockerfile.dev index 2d10955e0..87b6d5198 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -19,5 +19,7 @@ RUN mv /poktroll/bin/poktrolld /usr/bin/poktrolld EXPOSE 8545 EXPOSE 8546 +EXPOSE 8547 +EXPOSE 8548 ENTRYPOINT ["ignite"] diff --git a/Tiltfile b/Tiltfile index 442e702f4..95e8c9a6b 100644 --- a/Tiltfile +++ b/Tiltfile @@ -33,10 +33,6 @@ if localnet_config["helm_chart_local_repo"]["enabled"]: print("Using local helm chart repo " + helm_chart_local_repo) chart_prefix = helm_chart_local_repo + "/charts/" - # sequencer_chart = helm_chart_local_repo + "/charts/poktroll-sequencer" - # poktroll_chart = helm_chart_local_repo + "/charts/poktroll" - - # Import files into Kubernetes ConfigMap def read_files_from_directory(directory): files = listdir(directory) @@ -136,7 +132,7 @@ helm_resource( ) helm_resource( "appgateservers", - poktroll_chart, + chart_prefix + "appgate-server", flags=[ "--values=./localnet/kubernetes/values-common.yaml", "--values=./localnet/kubernetes/values-appgateserver.yaml", @@ -162,7 +158,7 @@ k8s_resource( "relayminers", labels=["blockchains"], resource_deps=["sequencer"], - port_forwards=["8545", "8546", "40005"], + port_forwards=["8548", "40005"], ) k8s_resource( "appgateservers", diff --git a/localnet/kubernetes/values-appgateserver.yaml b/localnet/kubernetes/values-appgateserver.yaml index 85b34fd1d..cefc1887d 100644 --- a/localnet/kubernetes/values-appgateserver.yaml +++ b/localnet/kubernetes/values-appgateserver.yaml @@ -1,2 +1,2 @@ -appgateserver: - enable: true \ No newline at end of file +pocket: + node: sequencer-poktroll-sequencer \ No newline at end of file diff --git a/localnet/kubernetes/values-relayer.yaml b/localnet/kubernetes/values-relayer.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/localnet/kubernetes/values-relayminer.yaml b/localnet/kubernetes/values-relayminer.yaml new file mode 100644 index 000000000..cefc1887d --- /dev/null +++ b/localnet/kubernetes/values-relayminer.yaml @@ -0,0 +1,2 @@ +pocket: + node: sequencer-poktroll-sequencer \ No newline at end of file From 74df6da23102aa6413db47873711467acd8a0d2c Mon Sep 17 00:00:00 2001 From: Dima Kniazev Date: Wed, 15 Nov 2023 12:24:53 -0800 Subject: [PATCH 4/4] Update Dockerfile.dev Co-authored-by: Daniel Olshansky --- Dockerfile.dev | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile.dev b/Dockerfile.dev index eb0af54d5..0c4fe64df 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -17,6 +17,7 @@ WORKDIR /poktroll RUN mv /poktroll/bin/ignite /usr/bin/ && mv /poktroll/bin/poktrolld /usr/bin/ +# TODO_TECHDEBT(@okdas): Ports are not documented as they will soon be changed with a document to follow EXPOSE 8545 EXPOSE 8546 EXPOSE 8547