Repository navigation
feat(tools): let components launch admin tooling, starting with StackPort for LocalStack - #72
Merged
Merged
Conversation
importRestApi minted a fresh id on every start, so anything that had recorded an id (an Orbital registry selection, an env variable pasted into a config file) broke each time the stack restarted. Create the API first with LocalStack's _custom_id_ tag, defaulting the id to the declared name in lower case, then import the spec into it with putRestApi. An explicit apiId can be given. Also documents that response schemas must be named models: API Gateway drops inline schemas on import, and the export then has operations with no response schema. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011c7t8dqC37eQzTt9o44x9v
…Port for LocalStack
Components can now offer tools - typically a browser / admin console for the
thing they run - that are launched on demand from the management UI.
- ProvidesTools: a component describes each tool as a container spec (image,
env, port, readiness path). It fills in the coordinates and credentials,
since it's the one that knows them.
- ToolRunner (owned by StackRunner) launches tools on the Nebula network,
maps the port, and stops them when their component stops or the stack
shuts down. Tool logs appear in the stack's logs.
- S3 and API Gateway offer StackPort (davireis/stackport:0.4.4), pointed at
their LocalStack container.
- Admin API: POST /api/stacks/{id}/components/{componentId}/tools/{toolId}/launch
and /stop. The admin snapshot includes each running component's tools.
- UI: a Tools menu on each component, plus a Tools section in the expanded
panel. The URL is built from the host the UI was loaded from.
Tools reach their component by its container IP (uniqueNetworkHost), not the
network alias: stacks share a network and can reuse component names, so an
alias like `s3` can resolve to another stack's container.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for orbital-nebula ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Components can now offer tools: a browser or admin console for the thing they run, launched on demand from the management UI. The first one is StackPort for the LocalStack-backed components (S3 and API Gateway).
On a running component, Tools → Launch starts the tool. Once it's up, Open opens it in a new tab.
How it works
ProvidesTools(nebula-dsl): a component describes each tool as a container spec: image, env, port and readiness path. The component fills in the coordinates and credentials because it knows them. Nothing in the runtime is AWS-specific. Kafka (kafka-ui), SQL (pgweb/Adminer) and Mongo (mongo-express) could use the same contract.ToolRunner(owned byStackRunner):davireis/stackport:0.4.4and pointed at the component's LocalStack container, using that container's credentials and region.POST /api/stacks/{id}/components/{componentId}/tools/{toolId}/launchreturns straight away with the toolStarting.POST /api/stacks/{id}/components/{componentId}/tools/{toolId}/stop.AdminStackViewgainstools: each running component's tools and their state./stacksAPI is unchanged.Network alias collision
Stacks share one Docker network, and components use their name as their network alias. Two stacks that each have an
s3component both answer tos3. In testing, StackPort showed the other stack's buckets. Tools now reach their component by its IP on the network, through a newuniqueNetworkHosthelper. Container names didn't work: Docker's generated names contain underscores, which the AWS SDK rejects in endpoint URLs.The same collision still affects NETWORK-mode consumers (Orbital in compose is given
s3:4566). That predates this PR and isn't fixed here.Also included
070017c feat(apigateway): give each REST API a stable id across stack restartswas committed after #71 merged and was never pushed, so it's on this branch too.Test plan
ComponentToolsTest(new, runs against real containers):s3component, StackPort shows only its own stack's bucketsS3ExecutorTest,ApiGatewayExecutorTest,StackRunnerResubmissionTest,StackStartFailureTestandNebulaServerTestpass🤖 Generated with Claude Code