Why Google Cloud Platform?

GCP is currently possibly the best and cheapest option to host a Perforce Server. Here I listet the main Pros and Cons I came over so far:

Pros: Google Cloud Platform offers a 12-month free trial with 300$ Credits and a great always free tier which provides limited access to many common Google Cloud resources, free of charge. If you want a hosted Perforce Server (or a website etc.), you can almost get along with this free content - forever.

The always free tier includes per month in selected Regions f.e.:

1 f2-micro instance
1 static external IP address

The most other Host Platforms offer that kind of free tier only for the first 12 months (like AWS).
If you want to use it for Source Control with high quality gameprojects f.e. and you need more space, you dont pop out of that free tier when you exceed the free-diskspace-limit. you just pay for the additional space you reserve. Currently you pay $0.04 for 1GiB/month.
The pricing system is pretty complicated, but you only pay what you are using.

Cons: The biggest downside are the costs of outgoing traffic. There are two service tiers:

standard tier: $0.085/GB from NA,EU
premium tier: ~$0.105/GB from NA->NA,EU->EU

Currently 1GiB in the premium tier is free, but if you have a lot of outgoing traffic going on, you might take a look at AWS Lightsail, wich has again other downsides, but a flat rate pricing system. For comparing purposes you may also take a look at Microsoft Azure. But the standard tier of GCP is still currently the cheapest outbound traffic pricing per GB (compared f.e. to AWS and Azure).

Setting up your Google Cloud Computing Virtual Machine

First of all you have to get familiar with the GCP Console, but I guess this is the easiest part. Then you can watch this video video or follow along: Go to Compute Engine at the sidebar, VM Instances and than at the top Create Instance. After that you can play with the Settings:

Region: There are different prices for different regions, Iowa is one of the cheapest currently. To apply for the always free tier you need to select instead of n1-standard the f1-micro and a region which offers it, to get the running costs free.

Boot Disk: Click change and select as much GB as you want and Ubuntu 18.04 bionic release. Consider that more space does cost more, but the read/write speed is depending on its size. Currently 30GB in selected Regions are free to use.

Static IP: If you want an IP, that does not change by restarting the VM you may select a static IP. You can use one static IP address for free, as long as it is connected to a VM. For setup that you need to expand the Management, security, disks, networking, sole tenancy Menu at the very bottom, navigate to networking and then under network interfaces click on the default... button, to expand the network interface. There you need to modify the External IP by clicking on create IP address. Before selecting reserve:

Network Tier: Here you may also consider the Network Service Level. The incoming traffic ("Upload Traffic") is free, but the outgoing traffic ("Download Traffic") does costs f.e. in the standard tier about 0.085$ per GB. If you want the benefits of the google premium tier, you even pay more. More about this in the first chapter. I recommend using your Start Credit to try several settings to see what works best for you. Consider that the traffic speed is of course capped to the maximal speed of the boot disk.

After that you can click create.

Tweaking the Firewall-Settings

Now there is the magic: You need to click on the 3 dots aside the SSH Connect Button and then Click on Network Details. Then click on Firewall rules at the sidebar and create a new one. There you need to allow tcp at 1666 incoming and IP Range You may also select under Targets in the dropdown All instances in the network.

References for installing Perforce:

I made a tutorial video on youtube how to install Perforce on GCP. You can just follow along.

Automated Script

you can copy the code that you need to paste into the shell (can be opened with the SSH-Button) and then hit enter to run it. The script will fully install a perforce server for you!
When it has finished it should look like this:

After that you can close the shell-window and proceed in the video at 11:00. Your admin-username will be "super", just like in the video, and your password will be "ABCD1234".

For those who know how Perforce works and just want to save time: you now can just access your Perforce Server via P4Admin.

This site runs on a f2-micro instance on GCP

Google Cloud Platform