4.1 KiB
Bee Factory
CLI tool to spin up Docker cluster of Bee nodes for advanced testing and/or development
Warning: This project is in beta state. There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.
Table of Contents
Install
Requirements: Docker
$ npm install -g @ethersphere/bee-factory
Usage
# This spins up the cluster for specific Bee version and exits
$ bee-factory start --detach 1.5.1
# The spins up the cluster using Bee version configured in external places. See bellow for options where to place it.
$ bee-factory start --detach
# This attaches to the Queen container and displays its logs
$ bee-factory logs queen --follow
# This stops the cluster and keeping the containers so next time they are spinned up the data are kept
# but data are not persisted across version's bump!
$ bee-factory stop
# You can also spin up the cluster without the --detach which then directly
# attaches to the Queen logs and the cluster is terminated upon SIGINT (Ctrl+C)
$ bee-factory start 1.5.1
For more details see the --help page of the CLI and its commands.
External Bee version configuration
You can omit the Bee version argument when running bee-factory start command if you specify it in one of the expected places:
package.jsonplaced in current working directory (cwd) under theengines.beeproperty..beefactory.jsonplaced in current working directory (cwd) with propertyversion.
Docker Images
Bee Factory as the NPM package that you can install, like mentioned above, works in a way that it orchestrates launching Bee Factory Docker images
in correct order and awaits for certain initializations to happen in correct form. These Docker images are automatically built with our CI
upon every new Bee release, so you can just specify which version you want to run (starting with 1.5.1 version) as part of the start command.
If for some reason you want built your own images, that is possible but discouraged and not supported (here be dragons) using the scripts in the generator subfolder.
Upon building and publishing these images you can consume them using with Bee Factory with the --repo flag.
Contribute
There are some ways you can make this module better:
- Consult our open issues and take on one of them
- Help our tests reach 100% coverage!
- Join us in our Discord chat in the #develop-on-swarm channel if you have questions or want to give feedback
Developing
You can run the CLI while developing using npm start -- <command> ....