Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up a website in Google Cloud? [closed]

I am completely lost in this. I'm used to using simple web hosts with cpanel to make websites, and just simply login with filezilla and upload my html/css/php/js files.

The reason why I am thinking to use Google Cloud as my server/host is because I am worried that my new website will get too much traffic and a standard web host company won't be able to cope, or will be too expensive.

But looking into Google Cloud, the process is so complicated, and the terminology almost sounds like it has nothing to do with hosting websites??

They talk about 'apps', 'containers', 'buckets', 'linux', etc.

All I want is to set up a dynamic website that has SSL, SQL, PHP etc. where I can upload with FTP - as usual, but have the convenience of high scaleability.

Am I on the right track, or is Google Cloud something completely unrelated?

Should I use Compute Engine, or App Engine??

I can't find any decent lay-man tutorials out there about this...

like image 307
Jack56 Avatar asked Dec 02 '15 09:12

Jack56


Video Answer


1 Answers

If the server side technology you are planning to use is PHP then you might want to have a look at Google App Engine. It's probably the easiest option to get you started without being bogged down with the jargon: Here are a few steps to get you going:

  1. Head over to the App Engine PHP 'Hello world in 5 mins' page, have a quick read
  2. Download and install the Google App Engine SDK for PHP.
  3. Head over to Github and download the hello world PHP app.
  4. Add your static resources like HTML, CSS & JavaScript to the hello world app.
  5. Remove the helloworld.php and edit the app.yaml and remove the handlers section, the update application with your app name (e.g. my-static-app).
  6. Create a project on the Google Cloud Console (e.g. my-static-app) and deploy your app as explained here.

Now you've got a static Website running on App Engine and accessible using a URL in the format http://my-static-app.appspot.com.

Bear in mind App Engine is a Platform as a Service (PaaS). So you just create your app and deploy it without having to worry about the server or its setup, etc... If your app is primarily made up of static resources like HTML, CSS, JavaScript and images then Google will cache and serve these from separate content delivery edge servers. So you don't have to worry about any scalability for these static resource even if your traffic grows.

For dynamic resources like PHP scripts then these are served using App Engine instances and as your demand grow you can configure your app to use more App Engine instances as explained here.

With App Engine you can't FTP files to the server you need to use the SDK to upload your code by issuing a simple command:

appcfg.py update myapp/
like image 88
omerio Avatar answered Sep 19 '22 03:09

omerio