Module 3: Installing Bee Factory

Walks through the installation process of Bee Factory, covering the specific commands for installation, starting the service, and operating it in detached mode. This module ensures that students can independently set up the Bee Factory environment.

1.0 Install Bee Factory

  • To install bee-factory, use the following command:
npm install -g @ethersphere/bee-factory.

2.0 Start Bee Factory

  • Now that we have setup bee-factory we are going to start the cluster. This command initializes the network, blockchain node, queen node, and 4 worker bees.
  • For our demo we are using bee-factory 1.13.0. Other versions may have issues or not run at all. As such we recommend this version as it has been tested.
  • Attached mode is only necessary if you want to view the logs. For most use cases we recommend starting with 2.2 and detaching.
2.1 Start Bee-Factory (log mode)
  • Start the Bee Factory and attach to the Queen container and display its logs:
bee-factory start 1.13.0
  • If the above was successful and we have no need to view the logs we can stop bee-factory by pressing Ctrl+C.
2.2 Start Bee-Factory
  • To start it in detached mode, use:
bee-factory start --detach 1.13.0 This will start the process as seen below: ✔ Network is up ✔ Blockchain node is up and listening ✔ Queen node is up and listening ✔ Bee Node
2.3 Stop Bee-Factory
  • To stop the cluster:
bee-factory stop
2.4 Delete existing containers
  • To delete existing containers while switching versions, you can use the –-fresh flag:
bee-factory start 1.13.0 --fresh
2.5 List all available commands
  • To list all available commands:
bee-factory --help
  • To list help content for a specific command:
bee-factory COMMAND --help

3.0 Bee Cluster Docker Status

  • We can check the status of our bee-factory using docker:
docker ps -a
  • We should see 4 worker bees, 1 queen, and the swarm blockchain:
docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 420e61653730 ethersphere/bee-factory-worker-4:1.13.0 "bee start" 3 minutes ago Up 2 minutes 0.0.0.0:41633->1633/tcp, :::41633->1633/tcp, 0.0.0.0:41634->1634/tcp, :::41634->1634/tcp, 0.0.0.0:41635->1635/tcp, :::41635->1635/tcp bee-factory-worker-4 091d77d4d501 ethersphere/bee-factory-worker-3:1.13.0 "bee start" 3 minutes ago Up 2 minutes 0.0.0.0:31633->1633/tcp, :::31633->1633/tcp, 0.0.0.0:31634->1634/tcp, :::31634->1634/tcp, 0.0.0.0:31635->1635/tcp, :::31635->1635/tcp bee-factory-worker-3 5999f2437b13 ethersphere/bee-factory-worker-2:1.13.0 "bee start" 3 minutes ago Up 2 minutes 0.0.0.0:21633->1633/tcp, :::21633->1633/tcp, 0.0.0.0:21634->1634/tcp, :::21634->1634/tcp, 0.0.0.0:21635->1635/tcp, :::21635->1635/tcp bee-factory-worker-2 85fdbc6fb52f ethersphere/bee-factory-worker-1:1.13.0 "bee start" 3 minutes ago Up 2 minutes 0.0.0.0:11633->1633/tcp, :::11633->1633/tcp, 0.0.0.0:11634->1634/tcp, :::11634->1634/tcp, 0.0.0.0:11635->1635/tcp, :::11635->1635/tcp bee-factory-worker-1 49d8fcb5814a ethersphere/bee-factory-queen:1.13.0 "bee start" 3 minutes ago Up 2 minutes 0.0.0.0:1633-1635->1633-1635/tcp, :::1633-1635->1633-1635/tcp bee-factory-queen afa6d07cc504 ethersphere/bee-factory-blockchain:1.3.1-for-1.13.0 "node /app/dist/node…" 4 minutes ago Up 2 minutes 8545/tcp, 0.0.0.0:9545->9545/tcp, :::9545->9545/tcp bee-factory-blockchain

Questionnarie

You need to join society to be able to do this

- How do you start bee-factory?

- How do you check if bee-factory is running with docker?