Google cloud is one of the biggest cloud service providers in the market. It is used by internet marketers as well as the huge companies that manage data of millions of users.
Google cloud is easy to get started if you already know much about servers and infrastructure management. But, If you are using Google Cloud for the first time, It might be a difficult task to create your first Virtual Machine or VM.
It’s because Google Cloud is made for people with experience in the field. This guide is for you if you want to connect your Google Cloud instance with ServerAvatar. I have divided this guide into three sections to make the process easier to understand.
In the first section, I will show you How to create a new Firewall rule in Google Cloud Platform to allow access on the Port Number 43210. This section is important because this firewall rule will allow ServerAvatar to manage your server. Without this Firewall rule, ServerAvatar cannot manage your server.
In the second section, I will show you how to create a Virtual Machine or VM in your GCP console. You can skip this section if you already know how to create a new VM instance and apply a firewall rule on that instance while or after creating a VM instance.
In the third and the easiest section, I will show you How to actually connect your brand new VM instance with your ServerAvatar account.
NOTE: If you are going to skip the first and the second part of this guide, make sure you have enabled incoming traffic on 43210 port from all IP addresses.
Create a Firewall Rule in Google Cloud Platform
Creating a firewall rule in Google Cloud is easy. Click on the Navigation Menu > VPC Network > Firewall to see a list of Firewall rules available in your account. Or, Click here to directly open that page in a new tab.
Now, click on the Create Firewall Rule link given in the top menu bar. See the following screenshot for reference if you are unable to find it.
The link will lead you to a pretty long form with multiple fields and checkboxes and radio buttons. If you can’t fully understand what is going on, Fill up the form with following information.
- Name: serveravatar
- Description: Allows ServerAvatar to maintain connectivity with VM.
- Logs: Off
- Network: default
- Priority: 65534
- Direction of Traffic: Ingress
- Action on Match: Allow
- Targets: Specified target tags
- Target tags: serveravatar (type and hit enter)
- Source Filter: IP ranges
- Source IP ranges: 0.0.0.0/0
- Second Source Filter: None
- Protocols and ports: Specified protocols and ports
Finally, click on the Create button to create a new Firewall rule.
Create a Google Cloud Instance
First of all, log in to your GCP console and navigate to Navigation Menu > Compute Engine > VM Instances to see the list of Virtual machines available in your account. Or, click here to directly open that page in a new tab.
If you don’t have any virtual machines in your account, Your screen will look like the following image. Click on the Create button to create a new instance.
A click on the Create button will lead you to the VM instance creation form. The form might look like the following image.
Fill up the information in the form according to your requirements. However, Make sure some of the fields in the form are set with the following information.
- Boot Disk: Ubuntu 16.04 OR Ubuntu 18.04 OR Ubuntu 20.04
- Firewall: Allow HTTP, Yes. Allow HTTPS, Yes.
Then, click on the “Management, security, disks, networking, sole tenancy” given just after the firewall section in the form to see advanced options.
Click on the Networking tab and Enter “serveravatar” in the Network tags field and hit Enter, It will set “serveravatar” tag in the Networking. The tag will apply a firewall rule that we created in the first section of this guide. It will simply allow ServerAvatar to manage your server.
If properly configured, the Firewall section should look like the following image.
Finally, Hit the Create button given at the bottom of the form and your VM instance should be ready within a minute or two.
Now, It is ready to connect with ServerAvatar.
Connect VM Instance with ServerAvatar
To connect a VM instance with your ServerAvatar account, Log in to your account make sure you have selected a correct team to connect a server. You can change a team from the top-right corner of the dashboard.
Now, click on any one of the two Connect buttons just as highlighted in the screenshot attached above. It will lead you to a server connection form. In that form, you have to enter some information about your server like Name, IPv4 Address, Root password (if available).
In the server connection form, Enter the name and IPv4 (External IP in GCP) address. Then check the “I don’t have a root password” checkbox because Google Cloud does not provide us a root password.
Finally, select the web server you would like to run on your server. After filling up the form, It should look like the following image.
If everything looks fine, click on the Connect Now! button. It will create a new server in your account and it will provide you a command that you have to execute on your server as a root user via SSH – the response should look like the following image.
To connect with your server via SSH, click on the SSH button under the Connect column corresponding to the correct server in your GCP console.
It will create a new pop-up window and connect you with your server via SSH. Once you have the command line access, Execute the following command first.
$ sudo su
This command will make you a root user. Once you are a root user, Execute the ServerAvatar server connection command that is provided to you by ServerAvatar.
If the execution is successful, ServerAvatar will start showing you the progress, just like the following image.
Once the installation is complete, ServerAvatar will redirect you to a server panel from which you can manage your VM instance. The Server panel should look like the following image.
So, this is how you can connect your Google Cloud VM instances with ServerAvatar. If you have any questions regarding this process or if you are facing any issues with the process, please let us know in the comment section given below. We will get back to you with help as soon as possible.