Coder Social home page Coder Social logo

study-imagecmigration's Introduction

STUDY-ImageMigration

Study notes for Image Converter Migration from EC2 to GAE.

A. GAE Quickstart

  1. Install: Java SDK / Google Cloud SDK / Git / Appache Maven
  2. HelloWorld project deploying (maven local & gae remote)

Reference

B. imagec project deploy

  1. Include 3rd-party dependencies in Maven (B-1)
  2. Build success but run time error: Language file reading

Reference

B-1. 3rd-party libraries in Maven

  1. 指定第三方程式庫來源並設定 pom.xml 檔來利用 Maven 自動下載,而非自行引入 jar 檔
  2. 無 central 來源的程式庫似乎無法下載
  3. 1.) 的方法僅適用於 compile 階段,如欲在 runtime 正確引入程式庫,則需另開 repository 來安裝。

Reference

C. Google Cloud Storage

  1. 描述直接透過 web console GUI 以及 gsutil command tool 來存取檔案的方式。
  2. Client Library 指的是使用各大程式語言實作與 GCP 溝通的程式庫。

Reference

D. Storing Data with GCP Storage (Java)

  1. 運用 GAE Cloudstorage API 完成圖檔寫入。
  2. com.google.cloud.storage 和 com.google.appengine.tools.cloudstorage 不同。後者只適用於 appengine 上的應用程式,且 Java 支援版本較舊。應改採用前者。(D-1)
  3. Storage Free 5GB 儲存只限預設 bucket。若欲作為各 APP 共用,則需要階層式儲存檔案(資料夾)。(D-2)

Reference

D-1. GCS Java API | TK

  1. 運用 GCS Java API 完成圖檔寫入、讀取與刪除。
  2. 若應用程式為在 GAE 標準環境上執行,則使用 GCS 服務時須先取得憑證。(D-1-1)
  3. 重新理解 GAE / GCS 作為服務在 GCP 下的架構。(D-1-2)
  4. Storage Free 5GB 限制使用 Regional 的特定區域。但使用 gcloud 工具建立的 gae app 會自動建立 bucket 並設定為 multi-regional。這是否意味著:A. GAE App 儲存的檔案不包含在免費方案中,或者 B. 需另開 regional bucket 並設定權限予該 GAE App 存取使用?(D-1-3)

Reference

D-1-1. Setting Service Account Credentials

  1. 直接在程式中使用 AppEngineCredentials 物件來取得預設憑證。
  2. 在 GCP Console 中,啟用 Google App Engine Admin API。
  3. Runtime Error - token has been expired: cmd "gcloud auth application-default login"
  4. Runtime Error - Unknown project id: StorageOptions.Builder.setProjectId("PROJECT_ID")

Reference

D-1-2. GCP from a Higher Scope

  1. 了解 GCP 資源的地理位置分配概念。(D-1-2-1)
  2. Project 概念並非只能以一個網站應用程式為單位。例如:亦可使用一個專案集中管理其他專案所使用的 GCP Buckets。

Reference

D-1-2-1. GCP Geography & Regions

  1. 地理位置的層級選擇,主要考量為存取速度與可用性(備援)。
  2. GAE App 屬 Regional,但 GAE 自動創建的所屬 Bucket 為 Multi-Reginal。

Reference

D-1-3. GCS Free Amount

  1. GAE 附帶的 GCS 服務似乎與獨立的 GCS 服務不同,兩者的免費額度皆為 5GB,分開計算。
  2. GAE 附帶的 GCS 服務應為其所自動建立的所屬 Bucket。獨立的 GCS 服務有其特殊的免費額度限制。
  3. 免費額度皆為 by account,而非 by project。

Reference

D-2. GCS Subdirectory | TK

Reference

E. GAE Overview | TK

Reference

E-1. GAE Instance Management | TK

  1. 如何 upgrade instance class

Reference

E-2. Standard v.s. Flexible Environment | TK

E-3. GAE Log | TK

E-4. GAE Version | TK

F. GCS Domain Name Verification | TK

  1. 限制物件的網域存取權限

Reference

G. GCP Authentication | TK

Reference
GCP Authentication

study-imagecmigration's People

Contributors

nizniz187 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.