Skip to content

Commit db9c1cd

Browse files
docs(hiero-block-node): add Hiero Block Node Cloud Deployment Guide
Add a comprehensive step-by-step deployment guide for the Hiero Block Node on Google Cloud Platform virtual machines using the Weaver tool. The guide covers VM creation, Weaver binary upload, environment preparation, Weaver user setup, Block Node deployment, verification, deprovisioning, and troubleshooting essentials for node operators. Signed-off-by: Pranali Deshmukh <[email protected]>
1 parent a67ac67 commit db9c1cd

File tree

1 file changed

+189
-0
lines changed

1 file changed

+189
-0
lines changed
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# Hiero Block Node Cloud Deployment Guide
2+
3+
# Overview
4+
5+
This guide explains how to deploy the Hiero Block Node on a Google Cloud Platform (GCP) virtual machine (VM) using the Weaver tool.
6+
The Block Node enables participation in the Hiero network by processing and validating transactions.
7+
This deployment uses the Weaver binary to set up Kubernetes and the Block Node on the VM.
8+
9+
This guide walks you through creating the VM, uploading the Weaver binary to it, and running the Block Node using the local profile.
10+
11+
While this guide focuses on GCP, node operators can deploy the Block Node on any cloud provider of their choice by following equivalent provisioning and deployment steps.
12+
13+
# Prerequisites
14+
15+
Before you begin, ensure you have:
16+
17+
- Access to a cloud provider account (such as Google Cloud, AWS, or Azure) with permissions to create and manage VM instances.
18+
- The Weaver binary downloaded locally from the [**official Weaver releases page**](https://github.com/hashgraph/solo-weaver/releases) or provided as part of your node onboarding for your VM’s architecture:
19+
- **`weaver-linux-amd64`** for x86_64 (most standard cloud VMs).
20+
- **`weaver-linux-arm64`** for ARM-based VMs.
21+
- The **`gcloud`** CLI installed and authenticated (if using Google Cloud).
22+
23+
# Step-by-Step Guide
24+
25+
## Step 1: Create a Google Cloud VM
26+
27+
1. In the [**Google Cloud Console**](https://console.cloud.google.com/), click **Select a project** at the top of the page.
28+
2. Choose an existing project. If you don’t have a project, click **New project** in the popup window and follow the prompts to create one.
29+
3. Under **Compute Engine,** Select **Create a VM**.
30+
4. Select a machine type appropriate for your Block Node profile:
31+
- **For a test or local profile**: Choose at least an **E2 standard** machine (for example, **`e2-standard-2`**) so that CPU and memory are sufficient.
32+
- **For production (f**e.g.**`mainnet` or `previewnet`)**: Select at least ~16 CPUs (e.g., 8 physical cores / 16 vCPUs).
33+
5. Set the region and zone (defaults are fine unless you have a preference).
34+
6. Select the default boot disk and operating system unless your team has specific requirements.
35+
7. Leave other instance settings at defaults for a standard deployment.
36+
8. Click **Create** to launch the VM.
37+
9. Wait until the instance status is **Running** before proceeding.
38+
39+
## Step 2: Upload Weaver to the VM
40+
41+
1. Download the appropriate Weaver binary to your local machine (see [Prerequisites](https://www.notion.so/Hiero-Block-Node-Cloud-Deployment-Guide-2b77c9ab259180fa9cc0e111cf9f77d0?pvs=21) for the correct file).
42+
2. In the Google Cloud Console, open your VM’s details page.
43+
3. Select the **down arrow** next to **SSH**, then choose **View gcloud command**.
44+
4. Copy the suggested **`gcloud compute ssh`** command displayed.
45+
5. On your local machine, paste that command into a terminal. It will look similar to:
46+
47+
```bash
48+
gcloud compute ssh --zone <ZONE> <INSTANCE_NAME> --project <PROJECT_ID>
49+
```
50+
6. On your local machine, modify the copied command:
51+
- Change **`ssh`** to **`scp`**.
52+
- Set the **source path** to your Weaver binary (e.g., **`~/Downloads/weaver-linux-amd64`**).
53+
- Set the **destination path** to your VM (e.g., **`/home/<USER>/weaver`**).
54+
55+
Example command (update with your details):
56+
57+
```bash
58+
gcloud compute scp ~/Downloads/weaver-linux-amd64 <INSTANCE_NAME>:/home/<USER>/weaver --zone <ZONE> --project <PROJECT_ID>
59+
```
60+
7. Run the command to upload the file.
61+
8. When complete, the Weaver binary will be available on your VM at the specified path. (e.g., at **`/home/<USER>/weaver`).**
62+
63+
## Step 3: Connect to VM and Prepare Weaver
64+
65+
1. SSH into your VM:
66+
- Use the **SSH** button in the Google Cloud Console (browser window), or
67+
- Open a separate terminal on your local machine and run:
68+
69+
```bash
70+
gcloud compute ssh <INSTANCE_NAME> --zone=<ZONE> --project=<PROJECT_ID>
71+
```
72+
- After connecting, run **`ls`** to confirm the Weaver binary is present in your home directory.
73+
2. Make the binary executable, using the correct filename:
74+
75+
```bash
76+
chmod +x weaver-linux-amd64
77+
```
78+
79+
*(Use **`weaver-linux-arm64`** for ARM)*
80+
81+
3. Test the Weaver binary by running it without arguments:
82+
83+
```bash
84+
./weaver-linux-amd64
85+
```
86+
87+
*(or **`./weaver-linux-arm64`** for ARM)*
88+
89+
If the binary runs and prints usage or help text, Weaver is correctly installed on the VM.
90+
91+
## Step 4: Create the **`weaver`** User
92+
93+
1. Run the Block Node setup command with **`sudo`** and the desired profile (choose one of: **`local`****`testnet`****`previewnet`****`mainnet`**):
94+
95+
```bash
96+
sudo ./weaver-linux-amd64 blocknode setup -p <profile>
97+
```
98+
99+
*(Replace **`<profile>`** with the desired value, e.g., **`local`** for test deployments. For ARM, use **`weaver-linux-arm64`** instead.)*
100+
101+
2. The command will fail and print instructions to create a **`weaver`** system user and group.
102+
103+
- Copy the **`groupadd`** and **`useradd`** commands shown in the output.
104+
- Run them exactly as printed, including specific user/group ID numbers.
105+
3. After creating the **`weaver`** user and group, re-run the setup command:
106+
107+
```bash
108+
sudo ./weaver-linux-amd64 blocknode setup -p <profile>
109+
```
110+
111+
Once complete, Weaver will be able to manage Kubernetes resources on your VM using the dedicated **`weaver`** system user.
112+
113+
## Step 5: Run Block Node Setup with the Local Profile
114+
115+
1. Ensure you are on the VM and the **`weaver`** binary is executable.
116+
2. Run the Block Node setup with **`sudo`** and the local profile:
117+
118+
```bash
119+
sudo ./weaver-linux-amd64 blocknode setup -p <profile>
120+
```
121+
122+
Replace **`<profile>`** with one of: **`local`****`testnet`****`previewnet`**, or **`mainnet`**.
123+
124+
3. **What the setup does:**
125+
126+
- Perform system and resource checks.
127+
- Install and configure Kubernetes components.
128+
- Install MetalLB for load balancing.
129+
- Deploy the Block Node Helm chart into the cluster.
130+
4. The process takes several minutes and will show progress logs in your terminal.
131+
132+
## Step 6: Verify the Block Node Deployment
133+
134+
After completing the setup, confirm that your Block Node is deployed and running by checking the Kubernetes cluster:
135+
136+
1. Using **`kubectl`** (recommended)
137+
1. Weaver configures local Kubernetes access on the VM. From your VM terminal, run:
138+
139+
```bash
140+
kubectl get pods -A
141+
```
142+
2. Look for Block Node pods. Ensure they show **`Running`** status and all containers are ready (e.g., **`1/1`** or **`2/2`**).
143+
2. Using K9s (optional)
144+
145+
- If you prefer a text-based Kubernetes dashboard:
146+
1. [**Install `k9s`**](https://k9scli.io/) on your VM or a machine with access to the cluster.
147+
2. To Inspect pods, namespaces, and logs. Run:
148+
149+
```bash
150+
k9s
151+
```
152+
3. Confirm the Block Node `StatefulSet/Pods` are healthy.
153+
154+
If the pods are running and healthy, your Block Node is successfully installed and running on the Google Cloud VM.
155+
156+
## Step 7: Deprovisioning and Shutdown
157+
158+
If you need to permanently remove a Block Node deployment (for decommissioning, upgrades, or migration):
159+
160+
- **Test environments:** Delete the VM from the Compute Engine page in Google Cloud Console to remove all associated resources.
161+
- **Production nodes:** Follow organizational and project-specific procedures for graceful shutdown, backup, and ongoing monitoring to avoid service interruption or data loss.
162+
163+
## Troubleshooting
164+
165+
See below for common errors, causes, and solutions during Block Node setup:
166+
167+
1. Error: “Profile not set”
168+
- **Cause:** The **`blocknode setup`** command was run without specifying a profile.
169+
- **Fix:** Re-run with a valid profile, for example:
170+
171+
```bash
172+
sudo ./weaver-linux-amd64 blocknode setup -p local
173+
```
174+
2. Error: “Requires super user privilege”
175+
- **Cause:** The **`blocknode setup`** command was run without **`sudo`**.
176+
- **Fix:** Add **`sudo`** before your command:
177+
178+
```bash
179+
sudo ./weaver-linux-amd64 blocknode setup -p local
180+
```
181+
3. Error: Missing **`weaver`** User and/or Group
182+
- **Cause:** First **`sudo`** run; the **`weaver`** system user and group are not yet created.
183+
- **Fix:** Run the **`groupadd`** and **`useradd`** commands shown in the error output, then re-run the setup.
184+
4. Error: “CPU does not meet Block Node requirements” or “Insufficient memory”
185+
- **Cause:** The VM machine type is too small for the selected profile.
186+
- **Fix:**
187+
- Delete your current VM.
188+
- Create a new VM with a larger machine type (e.g., **`e2-standard-2`** or higher for **`local`**; higher specs for production profiles).
189+
- Repeat the installation steps.

0 commit comments

Comments
 (0)