Skip to content

Commit dafd8a0

Browse files
committed
README updates; add pending move
1 parent 47a42be commit dafd8a0

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

Diff for: README.md

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
| :boom: ALERT!! |
2+
|:---------------------------|
3+
| This repo will soon be relocating to [GoogleCloudPlatform](https://github.com/GoogleCloudPlatform) as we better organize these code samples! Stay tuned as more info is coming soon. |
4+
5+
16
# Modernizing Google Cloud serverless compute applications
27
### To the latest Cloud services and serverless platforms
38

@@ -57,15 +62,29 @@ These are the challenges developers are facing, so the purpose of this content i
5762
> **NOTE:** App Engine ([Flexible](https://cloud.google.com/appengine/docs/flexible/python/runtime?hl=en#interpreter)) is a next-gen service but is not within the scope of these tutorials. Curious developers can compare App Engine [Standard vs. Flexible](https://cloud.google.com/appengine/docs/the-appengine-environments) to find out more. Also, many of the Flexible use cases can now be handled by [Cloud Run](http://cloud.run).
5863
5964

60-
## Progression (START and FINISH)
65+
## Progression (what order to do things)
66+
67+
### "START" and "FINISH" repo folders
6168

6269
All codelabs begin with code in a START repo folder and end with code in a FINISH folder, implementing a single migration. Upon completion, users should confirm their code (for the most part) matches what's in the FINISH folder. The baseline migration sample app (Module 0; link below) is a barebones Python 2.7 App Engine app that uses the `webapp2` web framework plus the `ndb` Datastore library.
6370

6471
1. With _Module 0_ as the STARTing point, the Module 1 codelab migrates from the `webapp2` web framework to Flask, FINISHing at code matching the _Module 1_ repo.
6572
1. Next, STARTing with the _Module 1_ application code (yours or ours), _Module 2_ migrates from `ndb` to Cloud NDB, ending with code matching the (Module 2) FINISH repo folder. There's also has a bonus migration to Python 3, resulting in another FINISH repo folder, this one deployed on the next-generation platform.
6673
1. _Your_ Python 2 apps may be using other built-in services like Task Queues or Memcache, so additional migration modules follow, some more optional than others, and not all are available yet (keep checking back here for updates).
6774

68-
Beyond Module 2, with some exceptions, **there is no specific order** of what migrations modules to tackle next. It depends on your needs (and your applications').
75+
### The order of migrations
76+
77+
Beyond Module 2, with some exceptions, **there is no specific order** of what migrations modules to tackle next. It depends on your needs (and your applications'). However, there are related migrations where one or more modules must be completed beforehand. This table attempts to put an order on module subsets.
78+
79+
Topic | Module ordering | Description
80+
--- | --- | ---
81+
Baseline | 0 ⇒ 1 | Not a migration but a description of the baseline application (review this material before doing any migrations)
82+
Web framework | 1 ⇒ _everything else_ | Current App Engine runtimes do not come with a web framework, so this must be the first migration performed. All migrations below can be performed after this one.
83+
Datastore | 2 [⇒ 3 [⇒ 6]] | Moving off App Engine `ndb` makes your apps more portable, so the **Module 2** Cloud NDB migration is _recommended_. **Module 3:** Migrating to Cloud Datastore (Firestore in Datastore mode) is _optional_ and only recommended if you have other code using Cloud Datastore. **Module 6**: Migrating to Cloud Firestore (Native mode) is generally _not recommended_ unless you must have the Firebase features it has, and those features will eventually be integrated into Cloud Datastore.
84+
(Push) Task Queues | [7 ⇒] 8 [⇒ 9] | Moving off App Engine `taskqueue` makes your apps more portable, so the **Module 8** Cloud Tasks migration is _recommended_ for those using push tasks. Those unfamiliar with push tasks should do **Module 7** first to add push tasks to the sample app. **Module 9:** Migrating to Cloud Datastore (Firestore in Datastore mode), Cloud Tasks (v2), and Python 3 is _optional_ and only recommended if you have other code using Cloud Datastore and considering upgrading to Python 3.
85+
Memcache | [12 ⇒] 13 | Moving off App Engine `memcache` makes your apps more portable, so the **Module 13** Cloud Memorystore (for Redis) migration is _recommended_ for those using `memcache`. Those unfamiliar with `memcache` should do **Module 12** first to add its usage to the sample app.
86+
Cloud Functions | 11 | Cloud Functions does not support Python 2, so after the Module 1 migration, you need to upgrade your app to Python 3 before attempting this migration, recommended if you have a very small App Engine app, or it has only one function/feature.
87+
Cloud Run | 4 or 5 | **Module 4** covers migrating to Cloud Run with Docker. Those unfamiliar with containers or do not wish to create/maintain a `Dockerfile` should do **Module 5**. Those doing **Module 4** will get additional information about Cloud Run in **Module 5** not covered in **Module 4**.
6988

7089

7190
## Migration modules
@@ -86,7 +105,7 @@ Module | Topic | Video | Codelab | START here | FINISH here
86105
6|Migrate to Cloud Firestore| _N/A_ | _N/A_ | Module 3 [code](/mod3b-datastore) (3.x) | _no work required; [Datastore upgrade automatic](https://cloud.google.com/datastore/docs/upgrade-to-firestore)_
87106
7|Add App Engine `taskqueue` push tasks| [link](https://twitter.com/googledevs/status/1443410302113099778?utm_source=twitter&utm_medium=unpaidsoc&utm_campaign=CDR_wes_aap-serverless_mgrgaetasks_sms_201028&utm_content=-) | [link](http://g.co/codelabs/pae-migrate-gaetasks) | Module 1 [code](/mod1-flask) (2.x) | Module 7 [code](/mod7-gaetasks) (2.x) & [code](/mod7b-gaetasks) (3.x)
88107
8|Migrate to Cloud Tasks| [link](https://twitter.com/googledevs/status/1450960021018267656?utm_source=twitter&utm_medium=unpaidsoc&utm_campaign=CDR_wes_aap-serverless_mgrcloudtasks_sms_201112&utm_content=-) | [link](http://g.co/codelabs/pae-migrate-cloudtasks) | Module 7 [code](/mod7-gaetasks) (2.x) | Module 8 [code](/mod8-cloudtasks) (2.x)
89-
9|Migrate to Python 3, Cloud Datastore & Cloud Tasks v2| _TBD_ | _TBD_ | Module 8 [code](/mod8-cloudtasks) (2.x) | _TBD_
108+
9|Migrate to Python 3, Cloud Datastore & Cloud Tasks v2| _TBD_ | _TBD_ | Module 8 [code](/mod8-cloudtasks) (2.x) | Module 9 [code](/mod9-py3dstasks)
90109
10|Migrate Datastore/Firestore data to another project| _TBD_ | _N/A_ | _N/A_ | _TBD_
91110
11|Migrate to Cloud Functions| _TBD_ | [link](https://codelabs.developers.google.com/codelabs/cloud-gae-python-migrate-11-functions?utm_source=codelabs&utm_medium=et&utm_campaign=CDR_wes_aap-serverless_mgrcloudfuncs_sms_202006&utm_content=-) | Module 2 [code](/mod2b-cloudndb) (3.x) | Module 11 [code](/mod11-functions) (3.x)
92111
12|Add App Engine `memcache`| _TBD_ | [link](https://codelabs.developers.google.com/codelabs/cloud-gae-python-migrate-12-memcache?utm_source=codelabs&utm_medium=et&utm_campaign=CDR_wes_aap-serverless_mgrcloudfuncs_sms_202006&utm_content=-) | Module 1 [code](/mod1-flask) (2.x) | Module 12 [code](/mod12-memcache) (2.x) & [code](/mod12b-memcache) (3.x)

Diff for: mod13b-memorystore/README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Module 13 - Migrate from App Engine `memcache` to Cloud Memorystore
22

3-
This repo folder is the corresponding Python 3 code to a pair of different migrations related to the Module 12 and 13 codelabs. The tutorial either...
3+
This repo folder is the corresponding Python 3 version of the Module 13 app.
44

5-
- STARTs with the _Python 3_ code in the [Module 12b repo folder](/mod12b-memcache) and leads developers through migrations from App Engine `memcache` to Cloud Memorystore and App Engine `ndb` to Cloud Datastore (skipping Cloud NDB); **or**,
6-
- STARTs with the _Python 2_ code in the [Module 13a repo folder](/mod13a-memorystore) and leads developers through migrations from Cloud NDB to Cloud Datastore, mirroring the content covered in [Module 3](http://g.co/codelabs/pae-migrate-datastore), and also a BONUS migration from Python 2 to 3.
7-
8-
Either way, both set of migrations culminate in the code in this (`mod13b-memorystore`) folder.
5+
- All files in this folder are identical to the _Python 2_ code in the [Module 13a repo folder](/mod13a-memorystore) **except**:
6+
1. `app.yaml` was modified for the Python 3 runtime.
7+
1. `appengine_config.py` is unused and thus deleted.
8+
- An optional migration from Cloud NDB to Cloud Datastore can be achieved via the content covered in [Module 3](http://g.co/codelabs/pae-migrate-datastore).
9+
- The _Python 3_ version of the Module 12 app ([Module 12b repo folder](/mod12b-memcache)) features additional code to support those App Engine legacy ("bundled") services (like `memcache`). Because the app in this folder does not use such services (moved to Cloud Memorystore), that extra support does not appear, so the code here should not be considered a direct migration of that app to Cloud Memorystore (and Cloud NDB), unlike the Python 2 equivalents (Modules [12a](/mod12-memcache) and [13a](/mod13a-memorystore)) which can.

Diff for: mod9-py3dstasks/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Module 9 - Migrate from Python 2 to 3 and Cloud NDB to Cloud Datastore
22

3-
This repo folder is the corresponding Python 3 code to the [Module 9 codelab](http://g.co/codelabs/pae-migrate-py3dstasks). The tutorial STARTs with the Python 2 code in the [Module 8 repo folder](/mod7-cloudtasks) and leads developers through migrating from Python 2 to 3, Cloud NDB to Cloud Datastore plus any changes from Cloud Tasks v1 to v2, culminating in the code in this folder. One major addition to look for here vs. Module 8 is that App Engine `taskqueue` creates a `default` push queue while Cloud Tasks does not, so that now has to be done in code.
3+
This repo folder is the corresponding Python 3 code to the Module 9 codelab (_TBD_). The tutorial STARTs with the Python 2 code in the [Module 8 repo folder](/mod7-cloudtasks) and leads developers through migrating from Python 2 to 3, Cloud NDB to Cloud Datastore plus any changes from Cloud Tasks v1 to v2, culminating in the code in this folder. One major addition to look for here vs. Module 8 is that App Engine `taskqueue` creates a `default` push queue while Cloud Tasks does not, so that now has to be done in code.
44

55
**NOTE: Backport to Python 2**: When migrating this app to Python 3, we added a Python 3 dependency: the `print()` function. If for any reason you need to get back on Python 2 App Engine, you would have to:
66

0 commit comments

Comments
 (0)