Skip to content

Commit

Permalink
Merge pull request #177 from GoogleCloudPlatform/runtime-python
Browse files Browse the repository at this point in the history
Moving mvm samples to runtime: python
  • Loading branch information
Jonathan Wayne Parrott committed Feb 9, 2016
2 parents 8387789 + 9a4114d commit 90f71c2
Show file tree
Hide file tree
Showing 65 changed files with 97 additions and 436 deletions.
2 changes: 1 addition & 1 deletion container_engine/django_tutorial/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django==1.9.2
mysqlclient==1.3.7
wheel==0.28.0
wheel==0.29.0
gunicorn==19.4.5
8 changes: 0 additions & 8 deletions managed_vms/analytics/.dockerignore

This file was deleted.

15 changes: 0 additions & 15 deletions managed_vms/analytics/Dockerfile

This file was deleted.

6 changes: 5 additions & 1 deletion managed_vms/analytics/app.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
runtime: custom
runtime: python
vm: true
entrypoint: gunicorn -b :$PORT main:app

runtime_config:
python_version: 3

#[START env]
env_variables:
Expand Down
2 changes: 1 addition & 1 deletion managed_vms/analytics/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ def track_example():

if __name__ == '__main__':
# This is used when running locally. Gunicorn is used to run the
# application on Google App Engine. See CMD in Dockerfile.
# application on Google App Engine. See entrypoint in app.yaml.
app.run(host='127.0.0.1', port=8080, debug=True)
# [END app]
8 changes: 0 additions & 8 deletions managed_vms/cloudsql/.dockerignore

This file was deleted.

15 changes: 0 additions & 15 deletions managed_vms/cloudsql/Dockerfile

This file was deleted.

6 changes: 5 additions & 1 deletion managed_vms/cloudsql/app.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
runtime: custom
runtime: python
vm: true
entrypoint: gunicorn -b :$PORT main:app

runtime_config:
python_version: 3

#[START env]
env_variables:
Expand Down
2 changes: 1 addition & 1 deletion managed_vms/cloudsql/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ def index():

if __name__ == '__main__':
# This is used when running locally. Gunicorn is used to run the
# application on Google App Engine. See CMD in Dockerfile.
# application on Google App Engine. See entrypoint in app.yaml.
app.run(host='127.0.0.1', port=8080, debug=True)
8 changes: 0 additions & 8 deletions managed_vms/datastore/.dockerignore

This file was deleted.

15 changes: 0 additions & 15 deletions managed_vms/datastore/Dockerfile

This file was deleted.

6 changes: 5 additions & 1 deletion managed_vms/datastore/app.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
runtime: custom
runtime: python
vm: true
entrypoint: gunicorn -b :$PORT main:app

runtime_config:
python_version: 3

# [START env_variables]
env_variables:
Expand Down
2 changes: 1 addition & 1 deletion managed_vms/datastore/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ def index():

if __name__ == '__main__':
# This is used when running locally. Gunicorn is used to run the
# application on Google App Engine. See CMD in Dockerfile.
# application on Google App Engine. See entrypoint in app.yaml.
app.run(host='127.0.0.1', port=8080, debug=True)
8 changes: 0 additions & 8 deletions managed_vms/disk/.dockerignore

This file was deleted.

15 changes: 0 additions & 15 deletions managed_vms/disk/Dockerfile

This file was deleted.

6 changes: 5 additions & 1 deletion managed_vms/disk/app.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
runtime: custom
runtime: python
vm: true
entrypoint: gunicorn -b :$PORT main:app

runtime_config:
python_version: 3
2 changes: 1 addition & 1 deletion managed_vms/disk/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ def index():

if __name__ == '__main__':
# This is used when running locally. Gunicorn is used to run the
# application on Google App Engine. See CMD in Dockerfile.
# application on Google App Engine. See entrypoint in app.yaml.
app.run(host='127.0.0.1', port=8080, debug=True)
20 changes: 0 additions & 20 deletions managed_vms/django_cloudsql/.dockerignore

This file was deleted.

41 changes: 0 additions & 41 deletions managed_vms/django_cloudsql/Dockerfile

This file was deleted.

13 changes: 4 additions & 9 deletions managed_vms/django_cloudsql/app.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# This file specifies your Python application's runtime configuration
# including URL routing, versions, static file uploads, etc. See
# https://developers.google.com/appengine/docs/python/config/appconfig
# for details.

# TODO: Enter your application id below. If you have signed up
# using cloud.google.com/console use the "project id" for your application
# id.
# [START runtime]
runtime: custom
runtime: python
vm: true
entrypoint: gunicorn -b :$PORT mysite.wsgi

runtime_config:
python_version: 3
# [END runtime]

2 changes: 1 addition & 1 deletion managed_vms/django_cloudsql/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django==1.9.2
mysqlclient==1.3.7
wheel==0.28.0
wheel==0.29.0
gunicorn==19.4.5
8 changes: 0 additions & 8 deletions managed_vms/hello_world/.dockerignore

This file was deleted.

15 changes: 0 additions & 15 deletions managed_vms/hello_world/Dockerfile

This file was deleted.

6 changes: 5 additions & 1 deletion managed_vms/hello_world/app.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
runtime: custom
runtime: python
vm: true
entrypoint: gunicorn -b :$PORT main:app

runtime_config:
python_version: 3
2 changes: 1 addition & 1 deletion managed_vms/hello_world/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ def hello():

if __name__ == '__main__':
# This is used when running locally. Gunicorn is used to run the
# application on Google App Engine. See CMD in Dockerfile.
# application on Google App Engine. See entrypoint in app.yaml.
app.run(host='127.0.0.1', port=8080, debug=True)
# [END app]
1 change: 0 additions & 1 deletion managed_vms/hello_world_compat/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions managed_vms/hello_world_compat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This sample demonstrates using [Python on Google App Engine Managed VMs](https:/

### Running & deploying the sample

1. Requirements.txt is not automatically processed by Google App Engine Managed VMs. To install dependencies for this sample, run:
1. `requirements.txt` is automatically installed by the runtime when deploying, however, to run the sample locally you will need to install dependencies:

$ pip install -t lib -r requirements.txt

Expand All @@ -14,4 +14,4 @@ This sample demonstrates using [Python on Google App Engine Managed VMs](https:/

3. Deploy the sample:

$ appcfg.py update -A your-app-id .
$ gcloud preview app deploy
4 changes: 1 addition & 3 deletions managed_vms/hello_world_compat/app.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
version: 1
runtime: python27
runtime: python-compat
vm: true
api_version: 1
threadsafe: true

handlers:
Expand Down
4 changes: 0 additions & 4 deletions managed_vms/hello_world_compat/appengine_config.py

This file was deleted.

9 changes: 0 additions & 9 deletions managed_vms/hello_world_django/.dockerignore

This file was deleted.

15 changes: 0 additions & 15 deletions managed_vms/hello_world_django/Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions managed_vms/hello_world_django/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ You can run locally using django's `manage.py`:

Follow the standard deployment instructions in
[the top-level README](../README.md). Google App Engine runs the application
using [gunicorn](http://gunicorn.org/) as defined by `CMD` in
[`Dockerfile`](Dockerfile). You can use a different WSGI container if you want, as
using [gunicorn](http://gunicorn.org/) as defined by `entrypoint` in
[`app.yaml`](app.yaml). You can use a different WSGI container if you want, as
long as it listens for web traffic on port `$PORT` and is declared in
[`requirements.txt`](requirements.txt).

Expand All @@ -34,7 +34,7 @@ Then, we added a simple view in `hellworld.views`, added the app to
`project_name.urls`.

In order to deploy to Google App Engine, we created a simple
[`app.yaml`](app.yaml) and [`Dockerfile`](Dockerfile).
[`app.yaml`](app.yaml).

## Database notice

Expand Down
6 changes: 5 additions & 1 deletion managed_vms/hello_world_django/app.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
runtime: custom
runtime: python
vm: true
entrypoint: gunicorn -b :$PORT project_name.wsgi

runtime_config:
python_version: 3
8 changes: 0 additions & 8 deletions managed_vms/mailgun/.dockerignore

This file was deleted.

Loading

0 comments on commit 90f71c2

Please sign in to comment.