Node Onboarding

Introduction

This tutorial describes how to add new nodes to an existing private network. Two basic scenarios will be covered:

  1. Adding a physical host/virtual machine as a new node.

  2. Adding a cloud instance as a new node. ​

Pre-Prerequisites

  1. You should have an established private network consisting of at least one requester node. See the Create Private Network guide to set one up.

  2. You should have a new host (physical/virtual machine, cloud instance or docker container) with Bacalhau installed.​

Add Host/Virtual Machine as a New Node

Let's assume that you already have a private network with at least one requester node. In this case, the process of adding new nodes follows the Create And Connect Compute Node section. You will need to:

  1. Set the token in the node.network.authsecret parameter

  2. Execute bacalhau serve specifying the node type and orchestrator address via flags. You can find an example of such a command in the logs of the requester node, here is how it might look like:

...
To connect a compute node to this orchestrator, run the following command in your shell:
bacalhau serve \
    --node-type=compute \
    --network=nats --orchestrators=nats://127.0.0.0.1:4222 \
    --private-internal-ipfs \
    --ipfs-swarm-addrs=/ip4/127.0.0.0.1/tcp/46169/p2p/QmdbBc3BKkVCEuUBnAJm85gaPn6cKnFEEi96khwJSEaLFe 
...

Remember that in this example you need to replace all 127.0.0.1 and 0.0.0.0.0 addresses with the actual public IP address of your node. ​

Add a Cloud Instance as a New Node

Let's assume you already have all the necessary cloud infrastructure set up with a private network with at least one requester node. In this case, you can add new nodes manually (AWS, Azure, GCP) or use a tool like Terraform to automatically create and add any number of nodes to your network. The process of adding new nodes manually follows the Create And Connect Compute Node section.

To automate the process using Terraform follow these steps:

  1. Configure terraform for your cloud provider

  2. Determine the IP address of your requester node

  3. Write a terraform script, which does the following:

    1. Adds a new instance

    2. Installs bacalhau on it

    3. Launches a compute node

  4. Execute the script

Support

If you have questions or need support or guidance, please reach out to the Bacalhau team via Slack (#general channel).

Last updated