Study notes for Image Converter Migration from EC2 to GAE.
- Install: Java SDK / Google Cloud SDK / Git / Appache Maven
- HelloWorld project deploying (maven local & gae remote)
Reference
- Include 3rd-party dependencies in Maven (B-1)
- Build success but run time error: Language file reading
Reference
- 指定第三方程式庫來源並設定 pom.xml 檔來利用 Maven 自動下載,而非自行引入 jar 檔
- 無 central 來源的程式庫似乎無法下載
- 1.) 的方法僅適用於 compile 階段,如欲在 runtime 正確引入程式庫,則需另開 repository 來安裝。
Reference
- 描述直接透過 web console GUI 以及 gsutil command tool 來存取檔案的方式。
- Client Library 指的是使用各大程式語言實作與 GCP 溝通的程式庫。
Reference
- 運用 GAE Cloudstorage API 完成圖檔寫入。
- com.google.cloud.storage 和 com.google.appengine.tools.cloudstorage 不同。後者只適用於 appengine 上的應用程式,且 Java 支援版本較舊。應改採用前者。(D-1)
- Storage Free 5GB 儲存只限預設 bucket。若欲作為各 APP 共用,則需要階層式儲存檔案(資料夾)。(D-2)
Reference
- 運用 GCS Java API 完成圖檔寫入、讀取與刪除。
- 若應用程式為在 GAE 標準環境上執行,則使用 GCS 服務時須先取得憑證。(D-1-1)
- 重新理解 GAE / GCS 作為服務在 GCP 下的架構。(D-1-2)
- Storage Free 5GB 限制使用 Regional 的特定區域。但使用 gcloud 工具建立的 gae app 會自動建立 bucket 並設定為 multi-regional。這是否意味著:A. GAE App 儲存的檔案不包含在免費方案中,或者 B. 需另開 regional bucket 並設定權限予該 GAE App 存取使用?(D-1-3)
Reference
- 直接在程式中使用 AppEngineCredentials 物件來取得預設憑證。
- 在 GCP Console 中,啟用 Google App Engine Admin API。
- Runtime Error - token has been expired: cmd "gcloud auth application-default login"
- Runtime Error - Unknown project id: StorageOptions.Builder.setProjectId("PROJECT_ID")
Reference
- 了解 GCP 資源的地理位置分配概念。(D-1-2-1)
- Project 概念並非只能以一個網站應用程式為單位。例如:亦可使用一個專案集中管理其他專案所使用的 GCP Buckets。
Reference
- 地理位置的層級選擇,主要考量為存取速度與可用性(備援)。
- GAE App 屬 Regional,但 GAE 自動創建的所屬 Bucket 為 Multi-Reginal。
Reference
- GAE 附帶的 GCS 服務似乎與獨立的 GCS 服務不同,兩者的免費額度皆為 5GB,分開計算。
- GAE 附帶的 GCS 服務應為其所自動建立的所屬 Bucket。獨立的 GCS 服務有其特殊的免費額度限制。
- 免費額度皆為 by account,而非 by project。
Reference
Reference
Reference
- 如何 upgrade instance class
Reference
- 限制物件的網域存取權限
Reference
Reference
GCP Authentication