You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
`step0-webapp2-gaendb-py2` | ⇓ | _N/A_ | Original GAE sample on GAE `ndb` & `webapp2`
73
73
`step1-flask-gaendb-py2` | ⇓ | _N/A_ | Migrate to Flask ("gaendb" _N/A_ for Python 3)
74
74
`step2-flask-cloudndb-py2` | ⇓ or ⇒ or ⤓* | `step2-flask-cloudndb-py3` | Migrate to Cloud NDB
75
-
`step3-flask-datastore-py2` | ⇓ or ⇒ or ⤓+ | `step3-flask-datastore-py3` | Migrate to Cloud Datastore
76
-
`step4-flask-firestore-py2` | ⇒ | `step4-flask-firestore-py3` | Migrate to Cloud Firestore
77
-
`step5-flask-cloudrun-py2` | ⇒ | `step5-flask-cloudrun-py3` | Migrate to Cloud Run (with Docker)
75
+
`step3-flask-datastore-py2` | ⇓ or ⇒ or ⤓+º | `step3-flask-datastore-py3` | Migrate to Cloud Datastore
76
+
`step4-flask-cloudrun-py2` | ⇒ | `step4-flask-cloudrun-py3` | Migrate to Cloud Run (with Docker)
78
77
79
78
### Alternatives
80
79
81
80
We recommend users complete what we consider the minimum migration (Step 2) on Gen1. If there's no further interest in upgrading Datastore access nor migrating to Python 3, users can containerize their Python 2 apps for Cloud Run immediately (see Step 2a below). Who would you consider this? If you want to keep your app mostly as-is without additional migrations and want to containerize the app to make it more portable.
82
81
83
-
There are two ways to deploy containerized apps to Cloud Run, traditionally with Docker, or with the more recent [Cloud Buildpacks](https://github.com/GoogleCloudPlatform/buildpacks) (no Docker knowledge needed). Going from Step 3 to 5 uses Docker while going from Step 3 to 5a uses Cloud Buildpacks. (Step 5a is only available in Python 3.)
82
+
There are two ways to deploy containerized apps to Cloud Run, traditionally with Docker, or with the more recent [Cloud Buildpacks](https://github.com/GoogleCloudPlatform/buildpacks) (no Docker knowledge needed). Going from Step 3 to 5 uses Docker while going from Step 3 to 5a uses Cloud Buildpacks. (Step 4a is only available in Python 3.)
84
83
85
84
Python 2 | Next | Python 3 | Description
86
85
--- | --- | --- | ---
87
86
*`step2a-flask-cloudndb-py2-cloudrun` | _N/A_ | _N/A_ | Migrate (Python 2, Flask, Cloud NDB app) to Cloud Run (with Docker)
88
-
_N/A_ | _N/A_ | +`step5a-flask-datastore-py3-cloudrun` | Migrate to Cloud Run (with Cloud Buildpacks)
Copy file name to clipboardExpand all lines: step4-flask-cloudrun-py2/README.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Step 5 - Migrate from Google App Engine to Cloud Run (with Docker)
1
+
# Step 4 - Migrate from Google App Engine to Cloud Run (with Docker)
2
2
3
3
## Introduction
4
4
@@ -11,17 +11,15 @@ The next (but still optional) step of migrating from App Engine to an explicit c
11
11
12
12
Regardless of whether you take this step, recognize your app is containerized anyway. If sticking with App Engine, the product hides all the container details from users so they don't need to think about containers. But those willing to trade-in some convenience for more flexibility can do so here.
13
13
14
-
**NOTE:** Since migrating to Firestore is less likely for established applications with a sizeable amount of data in Datastore, this sample uses Datastore. If you have moved to Firestore, you would make a similar migration as what you did moving from Step 3 to 4.
15
-
16
14
---
17
15
18
16
## Background
19
17
20
-
App Engine existed before the concept of containers. Since Docker's launch, containers have become the de facto standard in packaging applications & dependencies into a single transportable & deployable unit. Users can imagine that App Engine apps were custom containers created by Google engineers, and the migration in this step & Step 5 help users move further away from vendor lock-in and continues the messaging of Google Cloud being an open platform to its customers and offering them more flexibility than ever before.
18
+
App Engine existed before the concept of containers. Since Docker's launch, containers have become the de facto standard in packaging applications & dependencies into a single transportable & deployable unit. Users can imagine that App Engine apps were custom containers created by Google engineers, and the migration in this step help users move further away from vendor lock-in and continues the messaging of Google Cloud being an open platform to its customers and offering them more flexibility than ever before.
21
19
22
20
There are two options for users when migrating to a container, and it hinges upon what generation runtime your app is on as well as your [Docker](http://docker.com/) experience. Those on a newer runtime can use [Cloud Buildpacks](https://github.com/GoogleCloudPlatform/buildpacks) to containerize apps so they can be deployed to Cloud Run or other Google Cloud container platforms ([GCE](https://cloud.google.com/compute), [GKE](https://cloud.google.com/kubernetes-engine), [Anthos](http://cloud.google.com/anthos), etc.).
23
21
24
-
See Step 5a (see `step5a-flask-datastore-py3-cloudrun`) if interested in using Buildpacks over Docker. However, if you're on a first generation runtime or prefer to use Docker, you're in the right place.
22
+
See Step 4a (see `step4a-flask-datastore-py3-cloudrun`) if interested in using Buildpacks over Docker. However, if you're on a first generation runtime or prefer to use Docker, you're in the right place.
25
23
26
24
---
27
25
@@ -83,6 +81,6 @@ The main `diff`s users will encounter:
83
81
84
82
1. New lines in `main.py`
85
83
1. Old App Engine configuration files deleted
86
-
1. A few new files (`Dockerfile`, `.dockerignore`) or (`service.yaml`, `Procfile` for Step 5a)
84
+
1. A few new files (`Dockerfile`, `.dockerignore`) or (`service.yaml`, `Procfile` for Step 4a)
87
85
88
86
If you haven't migrated to Python 3, that's your only option here, as otherwise that concludes this tutorial.
0 commit comments