The Google App Engine is Platform as a Service (PaaS) this means that the underline infrastructure, load balancing, and operating systems are abstracted and managed by the cloud provider. This makes it great for hosting personal projects up to more complex applications such as microservices.
In this walkthrough, we will be deploying a static website for those developers who have not taken up the whole framework craze. This will be more of a manual deployment so they will be no use of Continuous Integration tools only command lines.
The source material is found here: https://github.com/Ianodad/GAEngine
App Engine has support for two types of runtime environment Standards and Flexible. The flexible environment uses a docker container to run and supports a greater degree of language that is not available with the standard. For this walkthrough will use Standard.
Step 1 — Choose a runtime environment.
Start by selecting the App Engine >Dashboard from the menu then Create Application. Select your region i.e us-central then Create App. From here, it is straight forward select the language us Python and Standard as the environment. Next Unless you want to connect to Google Cloud through your local machine I would advise you to click I’ll DO THIS LATER.
Step 2 — Clone from GitHub
Select cloud shell at the top right corner then Continue.
At this point, you will see the cloud shell command interface which is a temporary VM that you can use to configure Google Cloud Platform. Clone the repository from GitHub within the command line.
git clone https://github.com/Ianodad/GAEngine
Step 3 — Create a YAML file(Optional)
Access the content from the source material by selecting the Open Editor.
Find app.yaml within that static > app.yaml. If you don't have this file I would add it.
The app.yaml file contains the declared state of the application to run. Starting with runtime language as python3.7. The standard type environment has about 3 basic scaling types Automatic, Basic, and Manual. You can use one scale type at a time. The handler binds the URLs to the specified file to be served. In this case, the root directory has been set to index.html.
Step 3 — Deploy App
Return back to the terminal by clicking Open Terminal. Next, run the following commands below to deploy the application.
cd GAEngine/static/gcloud app deploy app.yaml
This will take a few seconds to deploy. After this process is complete run the following command to expose the URL to view the site.
gcloud app browse
notice the URL ends with .appspot.com.
Return to App Engine > Dashboard. You will be able to monitor and see stats about your app from here.