AppEngine hello world

During my certification I learned that you can save a lot of time by using AppEngine. Instead of setting up a web server, installing nginx and python, and wondering why they don't work together, you use AppEngine and can start programming right away.
Today I wanted to check this out and deployed a "hello world" app on AppEngine. I will show you how I did it - with everything you can possible do wrong and how to correct it. Later I will show you how to put this application behind a load balancer.

Go to Google Cloud Console, open Cloud Shell, check out the hello world code:

git clone https://github.com/GoogleCloudPlatform/python-docs-samples


Cloning the "hello world" AppEngine app from github

Now deploy the application:

cd python-docs-samples/appengine/
gcloud app deploy
OK, now I got the first error message:


So I went to Google Cloud Console -> IAM and looked for the AppEngine default Service Account. Once I had it, I gave it the requested permissions:


I again started gcloud app deploy, this time, the error message was:
ERROR: (gcloud.app.deploy) Error Response: [3] Flex operation
projects/thorstenstaerk-blabla/regions/us-central1/operations/a05478fc-1234-4e09-8bd4-525311a779b7 error [INVALID_ARGUMENT]: An internal error occurred while processing task /app-engine-flex/insert_flex_deployment/flex_create_resources>2022-08-08T12:25:59.055Z150370.jc.0: Network 'default' does not exist
So I went to Google Cloud Console -> VPC network -> and created an auto-mode virtual private network called default.

Again gcloud app deploy. Last output line was
Deployed service [default] to [https://thorstenstaerk-blabla.uc.r.appspot.com]

So, let's check it out in the browser:

It works. That simple to deploy a webapp where you had to do so much infrastructure toil earlier :)

Stay tuned, next step will be to beautify this and put it behind a load balancer :)

Questions

  • how to use the standard version of AppEngine?
  • how to deploy to another VPC?

Comments

Popular posts from this blog

Set up a webcam with Linux

PuTTY: No supported authentication methods available

My SAT>IP Server