Configuring a VM on GCP
- 2 minsIntroduction
Google Cloud Platform provides infrastructure as a service, platform as a service, and serverless computing environments. In April 2008, Google announced App Engine, a platform for developing and hosting web applications in Google-managed data centers, which was the first cloud computing service from the company. The service became generally available in November 2011. Since the announcement of App Engine, Google added multiple cloud services to the platform.
Creating Project
The first thing that you’d have to do is create a project. A project offers a namaespace so that you could isolate the infrastructure for one project from another. After clicking the new project button you should input a project name. There is one more section name is Location, It chooses your organization: organization typically depends on your Google account. You don’t must give any location for your projects.
VM instances
Time to create a new intance on GCP (Google Cloud Platform) you should select Compute Engine from menu bar then you need to sleect VM instances. If you first time try to create an instance you need to enable Compute Engine.
Here is exmaple of enabling for Compute Engine. Don’t forget that every projects seperate from each other.
SSH Keys
The next thing before create an intance that I’m doing to do here is set up my SSH keys. Under the Metadata item We can see SSH Keys section. Whenever I create a new instance, I want my authentication data to be added it automatically. We can create SSH for our project so We can use ssh keygen and take our public RSA key then We should add the key to our project.
Adding RSA public key to Metadata.
New VM Instance
An instance is nothing but a virtual machine created on Google Compute Engine as a platform. When you wnat to create a new instance You will see the options for instance like Region and Machine configuration. You can select what you need but It can effect your cost also you can see the price on in the left bar. I selected Ubuntu 18.04 Long Term Support for Boot Disc. If everythings are ready for you time to click create.
Here is example for selecting boot image.
If You done you can click create button and You will see processing for creating VM. Finally you can see your new instance.
SSH to New Instance
You can reach you new instance with SSH from GCP there is a section for Secure Shell. Here is You can see.
Finally connecting from remote host to GCP inctance as You know we added RSA public key for SSH so We can connect from our local or any remote instances.