Skip to content

Commit 90f71c2

Browse files
author
Jonathan Wayne Parrott
committed
Merge pull request #177 from GoogleCloudPlatform/runtime-python
Moving mvm samples to runtime: python
2 parents 8387789 + 9a4114d commit 90f71c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+97
-436
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Django==1.9.2
22
mysqlclient==1.3.7
3-
wheel==0.28.0
3+
wheel==0.29.0
44
gunicorn==19.4.5

managed_vms/analytics/.dockerignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

managed_vms/analytics/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

managed_vms/analytics/app.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
runtime: custom
1+
runtime: python
22
vm: true
3+
entrypoint: gunicorn -b :$PORT main:app
4+
5+
runtime_config:
6+
python_version: 3
37

48
#[START env]
59
env_variables:

managed_vms/analytics/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ def track_example():
5959

6060
if __name__ == '__main__':
6161
# This is used when running locally. Gunicorn is used to run the
62-
# application on Google App Engine. See CMD in Dockerfile.
62+
# application on Google App Engine. See entrypoint in app.yaml.
6363
app.run(host='127.0.0.1', port=8080, debug=True)
6464
# [END app]

managed_vms/cloudsql/.dockerignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

managed_vms/cloudsql/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

managed_vms/cloudsql/app.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
runtime: custom
1+
runtime: python
22
vm: true
3+
entrypoint: gunicorn -b :$PORT main:app
4+
5+
runtime_config:
6+
python_version: 3
37

48
#[START env]
59
env_variables:

managed_vms/cloudsql/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ def index():
8181

8282
if __name__ == '__main__':
8383
# This is used when running locally. Gunicorn is used to run the
84-
# application on Google App Engine. See CMD in Dockerfile.
84+
# application on Google App Engine. See entrypoint in app.yaml.
8585
app.run(host='127.0.0.1', port=8080, debug=True)

managed_vms/datastore/.dockerignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

managed_vms/datastore/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

managed_vms/datastore/app.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
runtime: custom
1+
runtime: python
22
vm: true
3+
entrypoint: gunicorn -b :$PORT main:app
4+
5+
runtime_config:
6+
python_version: 3
37

48
# [START env_variables]
59
env_variables:

managed_vms/datastore/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ def index():
6666

6767
if __name__ == '__main__':
6868
# This is used when running locally. Gunicorn is used to run the
69-
# application on Google App Engine. See CMD in Dockerfile.
69+
# application on Google App Engine. See entrypoint in app.yaml.
7070
app.run(host='127.0.0.1', port=8080, debug=True)

managed_vms/disk/.dockerignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

managed_vms/disk/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

managed_vms/disk/app.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
runtime: custom
1+
runtime: python
22
vm: true
3+
entrypoint: gunicorn -b :$PORT main:app
4+
5+
runtime_config:
6+
python_version: 3

managed_vms/disk/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ def index():
4343

4444
if __name__ == '__main__':
4545
# This is used when running locally. Gunicorn is used to run the
46-
# application on Google App Engine. See CMD in Dockerfile.
46+
# application on Google App Engine. See entrypoint in app.yaml.
4747
app.run(host='127.0.0.1', port=8080, debug=True)

managed_vms/django_cloudsql/.dockerignore

Lines changed: 0 additions & 20 deletions
This file was deleted.

managed_vms/django_cloudsql/Dockerfile

Lines changed: 0 additions & 41 deletions
This file was deleted.

managed_vms/django_cloudsql/app.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
# This file specifies your Python application's runtime configuration
2-
# including URL routing, versions, static file uploads, etc. See
3-
# https://developers.google.com/appengine/docs/python/config/appconfig
4-
# for details.
5-
6-
# TODO: Enter your application id below. If you have signed up
7-
# using cloud.google.com/console use the "project id" for your application
8-
# id.
91
# [START runtime]
10-
runtime: custom
2+
runtime: python
113
vm: true
4+
entrypoint: gunicorn -b :$PORT mysite.wsgi
125

6+
runtime_config:
7+
python_version: 3
138
# [END runtime]
149

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Django==1.9.2
22
mysqlclient==1.3.7
3-
wheel==0.28.0
3+
wheel==0.29.0
44
gunicorn==19.4.5

managed_vms/hello_world/.dockerignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

managed_vms/hello_world/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

managed_vms/hello_world/app.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
runtime: custom
1+
runtime: python
22
vm: true
3+
entrypoint: gunicorn -b :$PORT main:app
4+
5+
runtime_config:
6+
python_version: 3

managed_vms/hello_world/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ def hello():
2727

2828
if __name__ == '__main__':
2929
# This is used when running locally. Gunicorn is used to run the
30-
# application on Google App Engine. See CMD in Dockerfile.
30+
# application on Google App Engine. See entrypoint in app.yaml.
3131
app.run(host='127.0.0.1', port=8080, debug=True)
3232
# [END app]

managed_vms/hello_world_compat/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

managed_vms/hello_world_compat/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This sample demonstrates using [Python on Google App Engine Managed VMs](https:/
44

55
### Running & deploying the sample
66

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

99
$ pip install -t lib -r requirements.txt
1010

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

1515
3. Deploy the sample:
1616

17-
$ appcfg.py update -A your-app-id .
17+
$ gcloud preview app deploy

managed_vms/hello_world_compat/app.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
version: 1
2-
runtime: python27
1+
runtime: python-compat
32
vm: true
4-
api_version: 1
53
threadsafe: true
64

75
handlers:

managed_vms/hello_world_compat/appengine_config.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

managed_vms/hello_world_django/.dockerignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

managed_vms/hello_world_django/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

managed_vms/hello_world_django/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ You can run locally using django's `manage.py`:
1313

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

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

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

3939
## Database notice
4040

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
runtime: custom
1+
runtime: python
22
vm: true
3+
entrypoint: gunicorn -b :$PORT project_name.wsgi
4+
5+
runtime_config:
6+
python_version: 3

managed_vms/mailgun/.dockerignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)