From registration to launching a virtual machine in the Google Cloud for a Symbol node

Today we will walk through the steps of registering on Google Cloud, and also learn how to create and configure a server for our node.

So let’s get started!

What do we need?

1. Google account

2. Payment card, with a balance of at least $ 1 (in local currency), and an activated payment option on the Internet.

Registration

Follow the link https://cloud.google.com

If you have already registered on this platform, go straight to item “Initial setting up the virtual machine environment”

For those who have never registered on Google cloud, on the screen, in the upper right corner, the button “Get started for free ”.

Get started for free

We press this button, and the system invites us to login with our Google account.

Google account.

Enter your data, password, enter the system. You will be prompted to go through a simple registration.

You need to fill in the “Country” field — select from the drop-down list.

Check the box “I accept the Terms ….”

1. Press the “Next” button, go to step 2

2. Fill in all the fields highlighted in red. Do not be confused by the “Business” account type, we will fix it on the next turn.

Step 2
Step 2

Pay special attention to filling in the payment data, namely the card. You need to indicate a card on the balance of which there is an amount equivalent to at least $ 1 in terms of your local currency!

ATTENTION: to check the validity of your card, the amount of 1 $ will be charged from it, if you use 3DS — confirm the payment. Until the checksum is removed from the card, work with the service will not be possible! After a while (usually within 24 hours), this amount will be returned to your account.

Click “START FREE TRIAL”. If all data is correct, you will go to the next page. Here you need to change the account type to “Personal”, fill in all the fields

Step 2 of 2
Step 2 of 2

Check the entered data and click “START FREE TRIAL”. After that we get to the main working page:

Main page

Initial setting up the virtual machine environment

So we come to the most interesting thing — creating a virtual machine in the cloud!

On the one hand, Google is a smart and caring company, and therefore they made the process of creating a VM (virtual machine) extremely simple. But there are nuances. If we only needed a VM, we would have it in 5 minutes. Due to the nuances associated with configuring the network (for the node to work, you need to configure something), instead of 5 minutes, we will have to spend as much as 10 minutes! :)

Let’s proceed to the direct configuration of the VM!

Create VM

In the left pane, select the “Compute Engine” item and then “VM Instances”. For some time (about 2–3 minutes) you will see the following picture on the screen, this is the system being prepared for work:

Preparation

After that, an invitation will appear:

Step 1

Press the button ”Create”and proceed to create a VM instance:

Fill in the fields:

“Name” — the name of thenode

“Region”- I have chosen Finland from the drop-down list. It must be remembered that for different regions, different tariffs apply and different configurations are available!

“Series” are configuration variations. In our case, this (N1)quite enough

“Machine Type” is- here you choose either a pre-configured configuration (in this case 2 CPUs and 7.5 GB of RAM), or you can play with “manual settings. But we are quite satisfied with the specified option

“Boot disk” — click change to configure the configuration you need:

Select the Ubuntu OS, Ubuntu 18.04 LTS Minimal version, and be sure to increase the disk size to 25 GB. We save.

Ubuntu 18.04 LTS Minimal — Pay Attention! This is the version, since we do not need to use a graphical interface, we will work as true-linuxoids only with the terminal :)

Creating a VM

Scroll down, press the button “Create”. And after a short period of time, the VM is created, and we will see this picture:

Your machine is created!

Please note — after creation, the VM will automatically start! For the “correct” application of all settings, before they are all created, it is better to stop the VM. At this stage, we can use not the most “correct” method, but simple and fast. After starting the server with all the settings, I dodoing not recommend thisrecommendthis !

The correct way to stop the server is to type thein the terminal command sudo shutdown and wait for the server to stop correctly!

Stopping the server

Now let’s configure the network environment!

Setting up the network

What do we need to do for the node server to communicate freely and securely with the network? We need to:

- set a static external IP address

- configure 4 rules for the firewall

- mark the rules in order for our node server to use them (you can use other options, but this is for your study)

- apply the marked rules to our server.

Setting a static external IP address

Click on the name of our node

and get into the VM settings. Pay attention to the “External IP address” block, by default it is of the “ephemeral” type, i.e. dynamic, which means that after the next reboot of the server, its IP address will change. This is not a critical problem, but it is not very convenient. And it is solved simply.

Click on the inscription “More …”, and on the settings page we see

Changing the type of network

Click on the drop-down list and select “Static”

Static network

form will appear in which it will be necessary to name the static network

After entering the name (required) and description, click “RESERVE”, And in a moment we see that the type has changed to “ Static ”

Firewall settings

We proceed to the firewall settings. Select “Firewall” in the left pane. We get a list of rules created by the platform by default.

We need to create 4 rules:

1. For incoming traffic for port 3000

2. For incoming traffic for port 7900

3. For outgoing traffic for port 3000

4. For outgoing traffic for port 7900

Press the “CREATE FIREWALL RULE” button. Create the first rule:

Specify port3000in in the name, check that “Traffic Direction” is “Inbound”

Then specify the tag, in this case we make a tag with the same name as the rule itself: port3000in

In the “Source IP address ranges” field, specify 0.0. 0.0 / 0

Specify the protocol type TCP and port 3000, and then click “Create”

We repeat the same procedure for the remaining 3 rules, carefully setting the traffic direction and port number. As a result, you should have the following set of rules (to get it in this form, sort the table by the “priority” field):

Firewall rules

Final touches

If everything is so, we make the last changes to the VM:

Go to the VM section

Select the VM

In the network interfaces, click “ More … ”

In the top menu, click“ Change ”, and write in the“ Network tags ”block, the previously created tags of firewall rules

Save. VM setup is complete!

We return to the list of VMs, and start the created virtual machine: A

notification will appear, do not pay attention to it, click “START”

Now we need to connect to the console of our server. To begin with, let’s choose the simplest option — “Open in a browser window”, click and wait for the connection.

Connecting to the console

During the connection, the following message may appear:

Click “Connect without a proxy server with authentication”

In a few seconds, your server console will appear on your screen, like this:

Server console

Congratulations! Your cloud server is configured for further work, all the necessary settings for installing the software of the node are ready, you just need to install the node itself.

Instructions for installing and configuring the Symbol test node at the link: A guide to setting up nodes, on the example of Symbol test net node

ATTENTION !

During the experiment, a problem was identified with the operation of the nodes, within the framework of these settings.
Description:
The node starts up well, everything works.
After 1–2–3 days, the node stops returning its normal status (check via http: // your_external_node_IP_address: 3000 / node / info).
At the same time, with a high probability, it becomes impossible to connect to the console.
The reasons.
With a high probability, the problem is that 25 GB of disk space is not enough for the node to work, and as a result, the system cannot start the necessary services, including the SSH session. It is assumed that the most active use of disk space is the docker service.

Decision:
1. If you have access to the node:
1.1. Log in to the server
1.2. Stop node
1.3. Stop server
1.4. Extend the disk to at least 30 GB, preferably up to 40 GB (be careful with billing and costs)
1.5. Start the server, go to the console
1.6. Create file /etc/docker/daemon.json with content
{
“log-driver”: “none”
}
1.7. If you did not restart the server (items 1.1–1.3), restart the docker with the command:
service docker restart
1.8. Run the node.
2. If you do not have access to the node through the console:
2.1. Force the server to stop
2.2. Extend the drive to at least 30 GB, preferably up to 40 GB
(be careful with billing and costs)
2.3. Start the server
2.4. Try to connect to the console.
2.5. If it works out, follow the solution of p. 1
2.6. If you still can’t connect via SSH, you just have to delete this node and create a new one….

Author: DrCryptos

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Crowdsourced Learning: Javascript Texas Hold ’em App, Part 1

Poker for People: screenshots to get started

Rebuilding LoreScroll: Building A Simple API

How to learn to code in 2017

How to Self-Join Using Pandas

5 New Year’s Resolutions to Amp Up Your Programming Career

SubQuery Hero Course — Summary

How to Communicate with an Offshore Dedicated Team in 2022

How to DevOps.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
DrCryptos

DrCryptos

More from Medium

Log #33–29/10/2021

#4 Performing CSRF Attack via Burp Suite.

Opan’s ESP32 Project , Archive 3: Internal Sensors

Building a CV Builder with BIRT in KNIME — Part 1