Day 15: GCP-Storage
Doc
https://cloud.google.com/storage/docs/storage-classes
Introduction
Storage classes
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- Standard Storage: 高性能、高可用、頻繁存取。
- Nearline Storage: 用於每月存取少於1次的data。
- Coldline Storage: 用於每季存取少於1次的data。
- Archive Storage: 用於每年存取少於1次的data,需保存多年的data。
Location
-
Regional: 單一區域
- 最低存儲價格
- 廣泛使用
- 因計算和存儲集中在同一區域,適用於高效分析
-
Multi-region: 跨大陸
- 比Regional貴一點
- 可用性高於Regional
- 適用於提供Internet內容
-
Dual-region: 兩個特定區域
- 兼具Regional的高性能與Multi-region的高可用
- 適用於業務關鍵負載
- 適用於資料湖泊
Hot/Cold data
無論哪個位置,四種存儲類別(Storage class)都可使用,
以便隨著時間優化成本。
藉由將活躍的Hot data存儲在Standard中且在data變舊與
存取頻率降低時移至較冷類別(colder classes)。
How to choose?
Global view
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Cloud Storage
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Security
- Key management
- 任何靜態或轉換的data預設皆自動加密
- 直接控制加密
1.Customer-managed encryption keys (CMEK)
2.Customer-supplied encryption keys (CSEK)
- 搭配使用
- Ex: 對大多數工作負載使用預設加密,為選定的應用程式新增
額外控制
- 授予權限
Practice
Cloud Storage: Qwik Start - Cloud Console
GSP073
Tasks
- Create a bucket
- Upload an object into the bucket
- Share an object publicly
Create a bucket
-
在Cloud Console中,切換頁面:
Navigation menu > Cloud Storage > Browser
或是在Search Bar搜尋Cloud Storage
-
按CREATE BUCKET
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
輸入Bucket資訊
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
按Create
Upload an object into the bucket
- 準備一張圖(kitten.png)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 在Cloud Storage browser頁面中,按剛建立的bucket name
- 在Object 分頁中,按Upload files
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 選kitten.png
- 確認上傳圖片的名稱為kitten.png
Share an object publicly
-
按Permission分頁
-
在Public access box中,
按Remove Public Access Prevention
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
按Confirm
-
按Add可以看到Add principles版
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
在New principles中輸入allUsers
-
在Select a role下拉選單中依序選取
Cloud Storage > Storage Object Viewer
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
按Save
-
在確認框
Are you sure you want to make this resource public?
按Allow public access
-
驗證
回到Objects 分頁,在Public access欄位
可以看到Public to internet
按Copy URL,並到瀏覽器另一分頁貼上網址即可看到圖片
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
More Practice
- (GSP074) Cloud Storage: Qwik Start - CLI/SDK