Running a node
In this tutorial, we are going to be walking through how to deploy an interledger node on Google Cloud Provider (GCP). In order to begin, go get some free money! Google offers a free tier with $300 of credits here. Once you’ve signed up for an account, navigate to the Compute Engine page.
Once you’ve navigated to the Compute Engine page, select VM Instances and create a new instance. You can decrease the size of the machine to a small.
After decreasing the size, change the boot disk to Ubuntu 18.04 LTS.
We need our node to establish secure communication with other nodes in the network, so enable HTTPS traffic.
Once you have done that, select create and your new VM should be ready. In order to reliably establish communication with your peers on the network you’ll need to reserve a static IP address. You can do this by querying “External IP Addresses” in the search bar at the top of the GCP console. Once you are at the IP address management page, you can select “Reserve static address.”
In the “Attached to” section select the VM that you deployed earlier. This will now route all traffic from that IP address to the machine that will be hosting your interledger node.
In order to connect to other participants in the network, we need to create a firewall that exposes ports. Return to the compute engine page and select your running instance. At the bottom under “Network interfaces” select your network, which should be default if you haven’t changed it.
After selecting your network you’ll be brought to the VPC Network page. From the left side column select Firewall rules. We’ll now be creating a new firewall to allow traffic from other nodes in the network. Select “Create Firewall Rule” and for targets, select “All instances in the network.” For the source IP ranges select 0.0.0.0/0. The last option when creating a firewall is “Protocols and ports.” Select “Allow all” within this section.
Now that we’ve managed all of the routing aspects of your node, we can actually go into the VM to set up your node. If you have your GCP account configured with your local terminal you’ll be able to SSH into your VM through that. Otherwise, we can just open a terminal in the browser through selecting “SSH” under the connect column. This will open a new window in your browser that is connected to your VM.
We’ll now set up your VM so that it supports node. Run the following commands in the terminal:
sudo apt update
sudo apt install nodejs npm
Now, if node and npm were installed properly you should be able to execute the following commands to check the version installed.
Deploying your node
Now that your GCP account is set up with a VM that is publicly accessible we’ll deploy an interledger node and peer with other people.
Follow the instructions on the Easy Connector Bundle to set up your node and start peering with others!