Getting Started: Setting up a Virtual Machine with Google Compute (with FREE $300 Credit)

NOTE: Sorry about the blurry video.  I don’t have a premium Vimeo account for the HD option and YouTube denied this video for some reason.  You can click Vimeo in the lower right of the video to go to the Vimeo video page and it’s clearer.

 

I was on Twitter the other day and ran across a Free Trial for Google Cloud products. They give you $300 in credits to use in 60 days.

https://cloud.google.com/free-trial/

This piqued my interest and my first thought was when they get my credit card information when creating the account, I’ll have to be extra careful to cancel before the trial is over. Once I started reading into it, I was surprised that they said in 2 different places on the landing page and also in the welcome email I received, that they won’t charge my card, and I’d have to upgrade at the end of the trial to continue, but everything just gets put on hold at the end if I choose to do nothing. I thought that was really cool.

So, then I wanted to give myself an idea of how much it would cost if I chose to run some virtual machines in the Google cloud. Amazon Web Services billing can be confusing, but I was pleased with how easy the calculator was – and for the monthly prices. I typically don’t need large servers, I’ll set a few clients up on each server I have.

So by this point, I was excited to try out setting up a virtual machine and getting a demo website up and running.

Once I got through the verification process, I landed on a visually pleasing dashboard. Things seemed to be organized in an easy to follow fashion. I feel it’s easier to navigate than AWS.

I chose a micro instance with Ubuntu Linux, opened the HTTP ports on the firewall and to make SSHing into the instance a breeze, I added my id_rsa.pub SSH key. You’ll see this come into play in a moment.

One nice thing I like is you can maintain the server anywhere. Without any browser plugins to install or device limitations (that I noticed), I could pull up an SSH window for my particular server with just one click.

To set up my demo site, I’m going to create an DNS Host record for a new subdomain, googlecompute, and point it to the public IP of my new virtual machine.

Now, I’m going to go on a little tangent and plug my Udemy course and Amazon eBook called Make Recurring Money by Hosting WordPress Sites (http://nevtec.in/blog/hwps-googlecompute). The techniques used in the material can be used for any type of site, but it focuses on WordPress. In the material, I have written a shell script that gets your server up and running really quick. It installs the necessary packages, configures your virtual host files, downloads the WordPress core files, sets up your blank database, and more. I’m going to let the commands run in real time so you can see how quick everything takes place. All you have to do is answer a few questions.

You might be saying, why not use a server image? That’s a valid question – and this is why I choose the method of this shell script over server images. For one, you can’t easily transfer a server image from one platform to another (say Google Cloud and AWS). You could store your image somewhere, download and unpack it. That works and I used to do that. The problem with that is you don’t get the updated server OS or packages as time progresses and updates are released. You’d have to run a system update on the OS and packages each time you set up a server. The other downfall to that is you aren’t getting as specific as the shell script I’ve created. It sets up the subdomain listening, folder structure for Nginx, and the virtual hosts as I mentioned earlier. You can also run the script again later when you want to add another site. These are issues that server images cannot resolve.

All in all, my script runs in about 3 minutes, which is relatively quick to set up a fresh server and to be so portable and creates a process that keeps packages up to date.

In my course, I strictly use RamNode for hosting. I’m glad to announce that I’ve tested and updated my script to work on Google Compute Cloud Servers now as well.

If you’d like to find out more detail on the course and eBook versions of this material, please check out http://nevtec.in/blog/hwps-googlecompute.

I didn’t mean to take up so much time talking about my product, but it does go along so well with what I’m covering in the video. Either way, I’ve showed you how to quickly get started setting up a virtual machine with Google Compute, reviewing the pricing, and telling you about this great Free Trial offer they have going on! Again, here’s that Free Trial link: https://cloud.google.com/free-trial/