This repository is deprecated and no longer maintained, the sample has been moved to GoogleCloudPlatform/python-docs-samples.
Copyright (C) 2014 Google Inc.
A simple Python VM Runtime 'hello world' example, which accesses the 'Users' service, and shows how to get information about the current instance.
You can run this application only on the App Engine Managed VMs. Currently, Managed VMs are in Beta, and as such may be subject to backward-incompatible changes.
Before you begin working, be sure you've installed the Google Cloud SDK and a local Docker environment as described in Getting Started.
First, set your project ID using the config
command:
$ gcloud config set project <project_id>
You can deploy locally using the app run
command:
$ gcloud preview app run app.yaml
app.yaml
is your project's runtime configuration file.
The output of this command will present you the URL your app is now running on. Navigate to this URL in your browser and you'll be greeted with the "Hello!" dialog and a few more options.
Next, deploy to production using the app deploy
command:
$ gcloud preview app deploy app.yaml
Congratulations! You've successfully deployed the Hello World app! Go to the URL specified in the output of your command and enjoy your hard work.
- See LICENSE