feat(test-lab): add IPFS devnet - #3453
Open
Alenar wants to merge 31 commits into
Open
Conversation
use absolute script directory paths and fix version file lookup
…tput directory if missing
Alenar
temporarily deployed
to
testing-2-preview
August 3, 2026 18:31 — with
GitHub Actions
Inactive
There was a problem hiding this comment.
Pull request overview
This PR adds a new Bash-based ipfs-devnet tool under mithril-test-lab/ to create and manage a local private Kubo/IPFS swarm for development and testing (matching the need from issue #3434).
Changes:
- Added an
ipfs-devnet.shentrypoint plus command scripts to initialize, start/stop, log, and query a multi-node private Kubo swarm. - Added helpers to download a platform-appropriate Kubo binary and generate self-contained management scripts into the swarm directory.
- Updated Cardano devnet mkfiles scripts to use an absolute
SCRIPT_DIRECTORYand readVERSIONreliably.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| mithril-test-lab/ipfs-devnet/VERSION | Introduces versioning for the new IPFS devnet tool. |
| mithril-test-lab/ipfs-devnet/README.md | Documents installation, commands, and usage examples for the IPFS devnet. |
| mithril-test-lab/ipfs-devnet/ipfs-devnet.sh | Adds the top-level CLI entrypoint and command dispatch. |
| mithril-test-lab/ipfs-devnet/commands/ipfs-devnet-init.sh | Implements init to download Kubo, configure nodes, and generate helper scripts. |
| mithril-test-lab/ipfs-devnet/commands/ipfs-devnet-exec.sh | Implements log/query/start/stop execution by delegating to generated scripts in the swarm dir. |
| mithril-test-lab/ipfs-devnet/commands/lib/common.sh | Adds shared Bash helpers (validation, quoting, directory creation). |
| mithril-test-lab/ipfs-devnet/commands/mkfiles/kubo-download.sh | Adds Kubo download + checksum verification + extraction. |
| mithril-test-lab/ipfs-devnet/commands/mkfiles/kubo-configure-swarm.sh | Adds Kubo node initialization and private swarm configuration/peering. |
| mithril-test-lab/ipfs-devnet/commands/mkfiles/mkscripts-lifecycle.sh | Generates start.sh and stop.sh into the swarm directory. |
| mithril-test-lab/ipfs-devnet/commands/mkfiles/mkscripts-query.sh | Generates log.sh and query.sh into the swarm directory. |
| mithril-test-lab/cardano-devnet/mkfiles/mkfiles-init.sh | Fixes devnet version reading to use ${SCRIPT_DIRECTORY}/VERSION. |
| mithril-test-lab/cardano-devnet/devnet-mkfiles.sh | Switches to an absolute SCRIPT_DIRECTORY and updates sourced paths accordingly. |
Suppressed comments (1)
mithril-test-lab/ipfs-devnet/README.md:394
- The troubleshooting command block includes a stray
shellprefix; users copying it will likely get a "command not found" error. The command should bekillall ipfswithoutshell.
```shell
shell killall ipfs
</details>
jpraynaud
reviewed
Aug 4, 2026
jpraynaud
left a comment
Member
There was a problem hiding this comment.
LGTM 👍
Maybe you can add a .gitignore for the example swarm folder.
… nodes in `kubo-configure-swarm.sh`
…rm.sh` + Add overwrite parameter
…nitialization and configuration - Extract `init_node` function to handle node initialization and peer ID generation. - Update `configure_node` to depend on pre-initialized nodes.
… in `kubo-configure-swarm.sh` Allowing for a number of kubo nodes greater than 9
…figure-swarm.sh`
- Introduced `mkscripts-lifecycle.sh` to generate start and stop scripts for managing Kubo nodes. - Supports multiple node directories and validates inputs for IPFS binary path and node directories.
…ated start script - Introduced `--log-level` option to control Kubo node logging (debug, info, warn, error). - Added `-h/--help` option to display usage instructions. - Updated node startup to respect the specified log level.
…node swarms initialization Similar to its equivalent script in cardano devnet, it download, configure, and create all needed scripts to start a swarm of kubo nodes.
…ptions in `ipfs-devnet-mkfiles.sh` - Added support for environment variables such as `DOWNLOAD_DIR`, `KUBO_VERSION`, `NUMBER_OF_NODES`, `SWARM_DIR`, and `OVERWRITE`. - Updated help menu to include new environment variable details. - Ensured CLI options take precedence over environment variables.
…or command management - Moved `ipfs-devnet-mkfiles.sh` and related scripts to `commands/` directory for better organization. - Introduced `ipfs-devnet.sh` as an entry point to manage IPFS Kubo node swarms with `init` and `help` commands.
…-init.sh` - Ensure options have corresponding values during parsing. - Fail on unexpected arguments positional arguments
- Introduced the `log` command to tail logs from all Kubo nodes. - Added `mkscripts-query.sh` to generate query scripts, including log-tail functionality.
- Consolidated `log`, `start`, and `stop` commands into `ipfs-devnet-exec.sh`. - Updated `ipfs-devnet.sh` to route all commands through the unified script. - Removed redundant `log`, `start`, and `stop` individual scripts.
…sage - Detailed instructions for initializing, managing, and observing a local private IPFS network. - Included command descriptions, options, environment variables, and usage examples.
- Introduced the `query` command for running `ipfs` commands against specific Kubo nodes. - Updated README with detailed usage instructions, options, and examples for the new `query` feature. - Enhanced script generation to include `query.sh` for node-specific queries.
…nd scripts - Moved common functions to a new `lib/common.sh` for reusability. - Replaced redundant error handling and validation logic with reusable utilities. - Refactored `ipfs-devnet` scripts to use shared functions for options, directories, and validation.
…mmon utilities And add missing requirement checks in `kubo-download.sh`
… Web UI - Introduced a new `load-webui` command to download the Kubo Web UI as a CAR archive and load it into the private IPFS network as it's not bundled with the kubo binary. - Added `ipfs-devnet-load-webui.sh` script to handle the new functionality. - Updated README with detailed command description, options, and examples.
- Enforce the private nature of the created networks in commands helps - add a `.gitignore` for the `./swarm/` folder used in the README
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.
Content
This PR includes a new pure Bash IPFS devnet tool in
mithril-test-lab/ipfs-devnet.It provides a local private Kubo/IPFS swarm that can be initialized with a configurable number of nodes and managed through a single entry point:
The tool supports:
ipfsbinary;The supported platforms are aligned with the end-to-end/devnet tooling compatibility:
amd64andarm64;amd64andarm64(checked on my ownarm64macbook air);Pre-submit checklist
Comments
One thing, optional, is missing: adownload-webuicommand (tentative name) that would fetch the webui car file from the ipfs network using the public, and slow, gateway (https://ipfs.io/ipfs/<CID>?format=car&dag-scope=all) store it in a download dir and load it in one of the network node.Edit: added in the
feat(ipfs-devnet): add load-webui command to download and load Kubo Web UIcommit.Issue(s)
Closes #3434