Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Commit ca9cfea

Browse files
committed
rename Step 4a; normalize files/links in READMEs
Change-Id: Ieead4cbe61321627f1df6f17d6193f91d00dc6f4
1 parent a384f28 commit ca9cfea

File tree

17 files changed

+47
-47
lines changed

17 files changed

+47
-47
lines changed

README.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ We suggest considering where you want to end up eventually, playing with each mi
4343

4444
Each major migration step has its own codelab & corresponding overview video. The step numbers correspond to their own folders, and generally each have folders for Python 2 & 3 ports. Some have an alternative or secondary succeeding migration&emdash;these end with "a", i.e., "Step 2a".
4545

46-
1. Migrate from `webapp2` to Flask
46+
1. Migrate from `webapp2` to [Flask](https://flask.palletsprojects.com/)
4747
- Stongly recommended if you have a web UI
4848
- You can use another web framework as long as it supports routing
4949
1. Migrate from App Engine NDB to Cloud NDB
@@ -58,7 +58,7 @@ Each major migration step has its own codelab & corresponding overview video. Th
5858
- Can migrate to [Cloud Firestore](http://cloud.google.com/firestore) after this step (see Step 3a below)
5959
- Infrequent/uncommon as it is "expensive" (requires new project & you give up some performance)
6060
- It's for those who **must have** Firestore's (new) Firebase features
61-
1. Migrate from App Engine to Cloud Run (using Cloud Datastore)
61+
1. Migrate from App Engine to Cloud Run
6262
- Migrate your app to a container with Docker
6363
- Alternative container migration with Buildpacks (see Step "4a" below)
6464

@@ -68,30 +68,37 @@ The table below summarizes each migration step and which options are available f
6868

6969
Python 2 | Next | Python 3 | Description
7070
--- | --- | --- | ---
71-
`step0-webapp2-gaendb-py2` | ⇓ | _N/A_ | Original GAE sample on GAE `ndb` & `webapp2`
72-
`step1-flask-gaendb-py2` | ⇓ | _N/A_ | Migrate to Flask ("gaendb" _N/A_ for Python 3)
73-
`step2-flask-cloudndb-py2` | ⇓ or ⇒ or ⤓ª | `step2-flask-cloudndb-py3` | Migrate to Cloud NDB
74-
`step3-flask-datastore-py2` | ⇓ or ⇒ or ⤓+º | `step3-flask-datastore-py3` | Migrate to Cloud Datastore
75-
`step4-flask-cloudrun-py2` | ⇒ | `step4-flask-cloudrun-py3` | Migrate to Cloud Run (with Docker)
71+
[`step0-webapp2-gaendb-py2`](/step0-webapp2-gaendb-py2) | ⇓ | _N/A_ | Original GAE sample on GAE `ndb` & `webapp2`
72+
[`step1-flask-gaendb-py2`](/step1-flask-gaendb-py2) | ⇓ | _N/A_ | Migrate to Flask ("gaendb" _N/A_ for Python 3)
73+
[`step2-flask-cloudndb-py2`](/step2-flask-cloudndb-py2) | ⇓ or ⇒ or ⤓ª | [`step2-flask-cloudndb-py3`](/step2-flask-cloudndb-py3) | Migrate to Cloud NDB
74+
[`step3-flask-datastore-py2`](/step3-flask-datastore-py2) | ⇓ or ⇒ or ⤓+º | [`step3-flask-datastore-py3`]('step3-flask-datastore-py3) | Migrate to Cloud Datastore
75+
[ª`step4-cloudndb-cloudrun-py2`](/step4-cloudndb-cloudrun-py2) | ⇒ | [`step4-cloudds-cloudrun-py3`](/step4-cloudds-cloudrun-py3) | Migrate to Cloud Run (with Docker)
7676

77-
### Alternatives
77+
* We recommend users complete what we consider the minimum migration (Steps 1 & 2).
78+
* If you a Python 2 App Engine app you want to modernize by containerizing, you can jump over Step 3 straight to Step 4 and stay there forever if desired.
79+
* Step 3's migration to Cloud Datastore is most useful if you have other apps using Cloud Datastore; you can make your codebase consistent by migrating from Cloud NDB to Cloud Datastore so all your Datastore access is consistent, possibly lowering your maintenance costs.
80+
* Migrating to Step 4 is only useful if you wish to containerize your app and run it serverlessly with Cloud Run. The Python 2 app uses Cloud NDB while the Python 3 equivalent uses Cloud Datastore.
7881

79-
We recommend users complete what we consider the minimum migration (Steps 1 & 2). 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). Why would you consider this? If you want to keep your app mostly as-is with minimal code changes otherwise (prefer no additional migrations) and want to containerize the app to make it more portable. This is Step 2a (and only Python 2 as expected).
82+
There are several alternatives to consider to the main steps above: 1) migrating to Cloud Firestore for those who desire to take advantage of the next-generation of Cloud Datastore that has features from the Firebase real-time database, and 2) an alternative to building containers using [Cloud Buildpacks](https://github.com/GoogleCloudPlatform/buildpacks) instead of Docker.
8083

81-
Cloud Firestore is the next generation of Cloud Datastore, inheriting features from the Firebase real-time database. However, use of Cloud Datastore and Cloud Firestore are mutually-exclusive, meaning applications (Google Cloud projects) can only use one, and once data has been entered, it cannot switch to the other, so migrating to Firestore requires you to "host" your application on a completely different project. It is only for users where those new Firebase features are a **must-have**. This migration's tutorial is Step 3a.
84+
### Alternatives
8285

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). Both Step 4 tutorials use Docker while Step 4a represents the alternative using Cloud Buildpacks. (Step 4a is only available in Python 3.)
86+
Cloud Firestore is the next generation of Cloud Datastore, inheriting features from the Firebase real-time database. However, use of Cloud Datastore and Cloud Firestore are mutually-exclusive, meaning applications (Google Cloud projects) can only use one, and once data has been entered, it cannot switch to the other, so migrating to Firestore requires you to "host" your application on a completely different project. It is only for users where those new Firebase features are a **must-have**. This migration's tutorial is Step 3a. There are two ways to deploy containerized apps to Cloud Run: Docker or Buildpacks. Those who don't want to learn Docker or don't want to be dependent on a single company like Docker would employ Buildpacks as an option. Step 4a represents the alternative to the Docker Step 4 tutorial by using Cloud Buildpacks. Both these alternatives are only available in Python 3.
8487

8588
Python 2 | Next | Python 3 | Description
8689
--- | --- | --- | ---
87-
ª`step2a-flask-cloudndb-cloudrun-py2` | _N/A_ | _N/A_ | Migrate (Python 2, Flask, Cloud NDB app) to Cloud Run (with Docker)
88-
_N/A_ | _N/A_ | º`step3a-flask-firestore-py3` | Migrate to Cloud Firestore (uncommon; see above)
89-
_N/A_ | _N/A_ | +`step4a-flask-cloudrun-bldpks-py3` | Migrate to Cloud Run (with Cloud Buildpacks)
90+
_N/A_ | _N/A_ | º[`step3a-flask-firestore-py3`](/step3a-flask-firestore-py3) | Migrate to Cloud Firestore (uncommon; see above)
91+
_N/A_ | _N/A_ | +[`step4a-cloudrun-bldpks-py3`](/step4a-cloudrun-bldpks-py3) | Migrate to Cloud Run (with Cloud Buildpacks)
9092

9193
### Canonical code samples
9294

9395
Links to a more complete, canonical sample app will be provided if available. Example: the [GAE NDB to Cloud NDB migration sample](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard/migration/ndb/overview) featured in the App Engine [migration documentation](https://cloud.google.com/appengine/docs/standard/python/migrate-to-python3).
9496

97+
## Next
98+
99+
- [**Step 0:**](/step0-webapp2-gaendb-py2) Take a look at the original Python 2.7 App Engine NDB Datastore `webapp2` app source code.
100+
- [**Step 1:**](/step1-flask-gaendb-py2) Take the first tutorial and migrate away from `webapp2` to Flask.
101+
95102
## References
96103

97104
- App Engine Migration

step1-flask-gaendb-py2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,4 @@ AFTER:
204204

205205
## Next
206206

207-
In the next step, we will migrate from App Engine NDB to Google Cloud NDB, a key step because after you complete *that*, you can either stop there or be presented with a variety of options to choose from.
207+
[**Step 2:**](/step2-flask-cloudndb-py2) The next tutorial involves migrating from App Engine NDB to Google Cloud NDB, a key step because after you switch to the Cloud library, many options become available to you.

step2-flask-cloudndb-py2/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,8 @@ def fetch_visits(limit):
158158

159159
## Next
160160

161-
From here, you have some flexibility as to your next move. You can...
161+
From here, there's flexibility as to your next move. Choose any of these options:
162162

163-
- Continue to use NDB but migrate your app to a container executing serverlessly on Cloud Run (see `step2a-flask-cloudndb-py2-cloudrun`)
164-
- Port your app to Python 3 (see `step2-flask-cloudndb-py3`)
165-
- Combine both of the above steps (migrate to Python 3 *and* Cloud Run; no example provided but extrapolate from above)
166-
- Further modernize Datastore access from Cloud NDB to the (official) Cloud Datastore library (how users *outside of* App Engine access Cloud Datastore) (see `step3-flask-datastore-py2`)
163+
- [**Step 2:**](/step2-flask-cloudndb-py3) Port your app to Python 3 to get you on the next generation App Engine runtime as Python 2 has reached its end-of-life.
164+
- [**Step 4:**](/step4-cloudndb-cloudrun-py2) Continue to use NDB but migrate your app to a container executing serverlessly on Cloud Run.
165+
- [**Step 3:**](/step3-flask-datastore-py2) Further modernize Datastore access from Cloud NDB to the (official) Cloud Datastore library (how users *outside of* App Engine access Cloud Datastore).

step2-flask-cloudndb-py3/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ handlers:
3535

3636
From here, your options are:
3737

38-
1. Migrate to Cloud Run (no example provided, but see: `step2a-flask-cloudndb-py2-cloudrun`)
39-
1. Further modernize Datastore access to Cloud Datastore (see `step3-flask-datastore-py3` and the `README.md` in `step3-flask-datastore-py2`).
38+
- [**Step 4:**](/step4-cloudndb-cloudrun-py2) Continue to use NDB but migrate your app to a container executing serverlessly on Cloud Run; also see [its Python 3 Datastore equivalent](/step4-cloudds-cloudrun-py3)
39+
- [**Step 3:**](/step3-flask-datastore-py2) Further modernize Datastore access from Cloud NDB to the (official) Cloud Datastore library (how users *outside of* App Engine access Cloud Datastore); also see [its Python 3 Datastore equivalent](/step3-flask-datastore-py3)

step3-flask-datastore-py2/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ def fetch_visits(limit):
196196

197197
From here, you have some several options... you can:
198198

199-
1. Migrate your app to Cloud Run (no example provided, but see `step2a-flask-cloudndb-py2-cloudrun`)
200-
1. Port your app to Python 3 (see `step3-flask-datastore-py3`)
201-
1. Combine both of the above steps (migrate to Python 3 *and* Cloud Run; no example provided but extrapolate from above)
202-
1. Further modernize Datastore access from Cloud Datastore to Cloud Firestore, allowing you to take full advantage of native Firestore features (see `step4-flask-firestore-py2`)
199+
- [**Step 3:**](/step3-flask-datastore-py3) Port your app to Python 3 to get you on the next generation App Engine runtime as Python 2 has reached its end-of-life.
200+
- [**Step 4:**](/step4-cloudds-cloudrun-py3) Migrate your app to Cloud Run (only available in Python 3; the [Python 2 equivalent](/step4-cloudndb-cloudrun-py2) is based on Cloud NDB.
201+
- [**Step 3a:**](/step3a-flask-firestore-py3) Migrate to Cloud Firestore, allowing you to take full advantage of native Firestore features (only available in Python 3).

step3-flask-datastore-py3/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ handlers:
3636

3737
From here, your options are:
3838

39-
1. Migrate your app to Cloud Run (no example provided, but see `step2a-flask-cloudndb-py2-cloudrun`)
40-
1. Further modernize Datastore access to Cloud Firestore, allowing you to take full advantage of native Firestore features (see `step4-flask-firestore-py3` and the `README.md` in `step4-flask-firestore-py2`).
39+
- [**Step 4:**](/step4-cloudds-cloudrun-py3) Migrate your app to Cloud Run (only available in Python 3; the [Python 2 equivalent](/step4-cloudndb-cloudrun-py2) is based on Cloud NDB.
40+
- [**Step 3a:**](/step3a-flask-firestore-py3) Migrate to Cloud Firestore, allowing you to take full advantage of native Firestore features (only available in Python 3).

step3a-flask-firestore-py3/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ def fetch_visits(limit):
215215

216216
## Next
217217

218-
From here, you have some flexibility as to your next move. You can...
218+
From here, there really is only one (optional) migration to make, and that is to containerize your app. The other thing you can do is fully explore the capabilities of Cloud Firestore. Your options:
219219

220-
1. Migrate your app to Cloud Run (`step4-flask-cloudrun-py2`).
221-
1. Port your app to Python 3 (see `step4a-flask-firestore-py3`)
222-
1. Combine both of the above steps (migrate to Python 3 *and* Cloud Run; no example provided but extrapolate from above)
220+
1. Explore other [Cloud Firestore](https://cloud.google.com/firestore) features.
221+
1. Step 4: No sample available but can adapt the Cloud Run migrations (see `step4-cloudndb-cloudrun-py2` [Python 2 Cloud NDB app] and `step4-cloudds-cloudrun-py3` [Python 3 Cloud Datastore app]) for Firestore.
222+
- [**Step 4:**](/step4-cloudds-cloudrun-py3) Migrate your app to Cloud Run (only available in Python 3 & Cloud Datastore; the [Python 2 equivalent](/step4-cloudndb-cloudrun-py2) is based on Cloud NDB; a Firestore port is easiest to extrapolate from the Python 3 Datastore app.

step4-cloudds-cloudrun-py3/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ App Engine existed before the concept of containers. Since Docker's launch, cont
2121

2222
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.).
2323

24-
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.
24+
See Step 4a (see `step4a-cloudrun-bldpks-py3`) 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.
2525

2626
---
2727

@@ -76,6 +76,6 @@ Doublecheck there are no files/folders named, `app.yaml`, `appengine_config.py`,
7676

7777
## Next
7878

79-
Congratulations... your app is fully modernized now, concluding this tutorial. From here, there is only one more things you can investigate:
79+
Congratulations... your app is fully modernized now, concluding this tutorial. From here, there is only one more thing you can investigate:
8080

81-
1. If you're seeking an alternative to containerizing your app *without* Docker, consider the alternative Step 4a which is identical to the sample app in *this* tutorial except it uses [Cloud Buildpacks](https://github.com/GoogleCloudPlatform/buildpacks) instead of Docker.
81+
- [**Step 4a:**](/step4a-cloudrun-bldpks-py3) An alternative to app in *this* tutorial, containerizing your app with [Cloud Buildpacks](https://github.com/GoogleCloudPlatform/buildpacks) instead of Docker.

step4-cloudndb-cloudrun-py2/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The next (but still optional) step of migrating from App Engine to an explicit c
99
- Helps move even further away from vendor lock-in, dependency on Google Cloud
1010
- Gives users the ability to more easily migrate their apps to VMs or Kubernetes, or move out of the cloud and run on-premise.
1111

12-
This migration is slightly different from its Python 3 twin (the "other" Step 4) in that we're using Cloud NDB for this 2.x version but Cloud Datastore for the 3.x version. If you're ready for containerization, this tutorial show you how to migrate Python 2 App Engine apps using Cloud NDB to Cloud Run.
12+
This migration is slightly different from its Python 3 twin (the "other" Step 4) in that we're using Cloud NDB for this 2.x version but Cloud Datastore for the 3.x version. If you're ready for containerization, this tutorial show you how to migrate Python 2 App Engine apps using Cloud NDB to Cloud Run. If you want to modernize your app but want to stick with Python 2 forever, this is one way to do so.
1313

1414
The steps include replacing the configuration files and specifying how your app should start. Since you won't have App Engine's web server, you'll need to specify your own server or bundle one into your container. For testing and staging, it's easy to just run Flask's development server from Python, but developers can opt for something more powerful for production such as the [Cloud Run Quickstart sample](https://cloud.google.com/run/docs/quickstarts/build-and-deploy) which uses `gunicorn`.
1515

@@ -21,7 +21,7 @@ App Engine existed before the concept of containers. Since Docker's launch, cont
2121

2222
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.).
2323

24-
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.
24+
See Step 4a (see `step4a-cloudrun-bldpks-py3`) 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.
2525

2626
---
2727

@@ -78,5 +78,6 @@ Doublecheck there are no files/folders named, `app.yaml`, `appengine_config.py`,
7878

7979
Congratulations... your app is fully modernized now, concluding this tutorial. From here, there are only a few more things you can investigate:
8080

81-
1. Port your app to Python 3 (no example provided, but take a look at the "other" Step 4 which is an identical example except it is already Python 3 and uses Cloud Datastore instead of Cloud NDB.
82-
1. If you're seeking an alternative to containerizing your app *without* Docker, consider the alternative Step 4a which is identical to the Python 3 Step 4 except it uses [Cloud Buildpacks](https://github.com/GoogleCloudPlatform/buildpacks) instead of Docker.
81+
- [**Step 3:**](/step3-flask-datastore-py2) If you have non-App Engine apps using Cloud Datastore and want to make your codebase consistent, add the possibility of code reuse and reducing maintenance costs, migrate from Cloud NDB to Cloud Datastore. Backtrack and use Step 3 to inspire you if so. Cloud Datastore can be used with Cloud Run too.
82+
- [**Step 4:**](/step4-cloudndb-cloudrun-py2) Port your app to Python 3 (no example provided, but take a look at the "other" Step 4 which is an identical example except it is already Python 3 and uses Cloud Datastore instead of Cloud NDB.
83+
- [**Step 4a:**](/step4a-cloudrun-bldpks-py3) An alternative to app in *this* tutorial, containerizing your app with [Cloud Buildpacks](https://github.com/GoogleCloudPlatform/buildpacks) instead of Docker.
File renamed without changes.

0 commit comments

Comments
 (0)