diff --git a/deployments/compose/process-compose-dev-tooling.yml b/deployments/compose/process-compose-dev-tooling.yml new file mode 100644 index 0000000000..a68a29cfea --- /dev/null +++ b/deployments/compose/process-compose-dev-tooling.yml @@ -0,0 +1,25 @@ +--- +# A process-compose configuration for running a dev-centric debugging and introspection +# tooling for Penumbra, such as gRPC UI, for exploring protobuf interfaces. +version: "0.5" +log_level: info +is_strict: true + +processes: + # Run gRPC UI for interactive protobuf exploration in a web UI: http://localhost:8100 + grpcui: + command: grpcui -v -open-browser=false -port 8100 -plaintext localhost:8080 + readiness_probe: + http_get: + host: 127.0.0.1 + scheme: http + path: "/" + port: 8100 + initial_delay_seconds: 10 + period_seconds: 5 + failure_threshold: 3 + availability: + restart: exit_on_failure + depends_on: + pd: + condition: process_healthy diff --git a/flake.nix b/flake.nix index b9a2628ed1..dc1b7ee299 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,17 @@ vendorHash = "sha256-0iqI/Z8rqDyQ7JqSrsqA9kADqF6qZy8NxTDNjAYYHts="; }; + # Build grpcui from source, for Reflection v1 support. + # https://github.com/fullstorydev/grpcui/issues/322 + # To update the grpcui hash values, run: + # nix-prefetch-git --url https://github.com/fullstorydev/grpcui --rev 483f037ec98b89200353c696d990324318f8df98 + grpcUiRelease = { + version = "1.4.2-pre.1"; + sha256 = "sha256-3vjJNa1bXoMGZXPRyVqhxYZPX5FDp8Efy+w6gdx0pXE="; + vendorHash = "sha256-j7ZJeO9vhjOoR8aOOJymDM6D7mPAJQoD4O6AyAsErRY="; + rev = "483f037ec98b89200353c696d990324318f8df98"; + }; + # Set up for Rust builds, pinned to the Rust toolchain version in the Penumbra repository overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; @@ -91,6 +102,25 @@ license = licenses.asl20; }; }).overrideAttrs (_: { doCheck = false; }); # Disable tests to improve build times + + # grpcui + grpcui = (buildGoModule rec { + pname = "grpcui"; + version = grpcUiRelease.version; + subPackages = [ "cmd/grpcui" ]; + src = fetchFromGitHub { + owner = "fullstorydev"; + repo = "grpcui"; + rev = "${grpcUiRelease.rev}"; + hash = grpcUiRelease.sha256; + }; + vendorHash = grpcUiRelease.vendorHash; + meta = { + description = "An interactive web UI for gRPC, along the lines of postman"; + homepage = "https://github.com/fullstorydev/grpcui"; + license = licenses.mit; + }; + }).overrideAttrs (_: { doCheck = false; }); # Disable tests to improve build times in rec { packages = { inherit penumbra cometbft; }; apps = { @@ -117,6 +147,7 @@ cometbft grafana grpcurl + grpcui just mdbook mdbook-katex diff --git a/justfile b/justfile index 818449c776..e11ac43fdf 100644 --- a/justfile +++ b/justfile @@ -8,7 +8,8 @@ dev: ./deployments/scripts/check-nix-shell && \ ./deployments/scripts/run-local-devnet.sh \ --config ./deployments/compose/process-compose-postgres.yml \ - --config ./deployments/compose/process-compose-metrics.yml + --config ./deployments/compose/process-compose-metrics.yml \ + --config ./deployments/compose/process-compose-dev-tooling.yml # Formats the rust files in the project. fmt: