๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
GCP

GCP flowchart

by mingzoo 2020. 4. 18.

GCP์— ๋Œ€ํ•œ ๋™์˜์ƒ

https://www.youtube.com/watch?v=JtUIQz_EkUw&t=783s

์ˆœ์„œ๋„(flowchart)๋ž€?

์ผ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ณผ์ •์„ ์ˆœ์„œ๋Œ€๋กœ ๊ฐ„๋‹จํ•œ ๊ธฐํ˜ธ์™€ ๋„ํ˜•์œผ๋กœ ๋„์‹ํ™”ํ•œ ๊ฒƒ์„ ์˜๋ฏธ

 

Google Cloud Platform(GCP)์˜ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ, ์–ด๋–ค ๊ธฐ์ค€์œผ๋กœ ์„ ํƒํ•˜๋ฉด ๋˜๋Š”์ง€์— ๋Œ€ํ•ด ํ๋ฆ„๋„๋กœ ์ •๋ฆฌ๋˜์–ด์žˆ๋‹ค.

https://medium.com/google-cloud/a-gcp-flowchart-a-day-2d57cc109401 ๋ธ”๋กœ๊ทธ ์ฐธ๊ณ 

Compute

์™ผ์ชฝ์œผ๋กœ ๊ฐˆ์ˆ˜๋ก ์ปค์Šคํ„ฐ๋งˆ์ด์ง•์˜ ์ž์œ ๋„๊ฐ€ ๋†’์•„์ง€๊ณ , ์˜ค๋ฅธ์ชฝ์œผ๋กœ ๊ฐˆ์ˆ˜๋ก ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ๊ด€๋ฆฌํ•ด์•ผ ํ•  ๊ฒƒ๋“ค์ด ๋งŽ์•„์ง„๋‹ค.

๋”ฐ๋ผ์„œ, ์˜ค๋ฅธ์ชฝ์œผ๋กœ ๊ฐˆ์ˆ˜๋ก ๊ตฌ๊ธ€ ํด๋ผ์šฐ๋“œ๊ฐ€ ๊ด€๋ฆฌํ•ด์ค€๋‹ค.

GCE๋Š” GKE๋ผ๊ณ ๋„ ํ•œ๋‹ค๊ณ  ํ•œ๋‹ค.

https://cloud.google.com/hosting-options?hl=ko  

 

COMPUTE ENGINE — ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ๊ณ ์„ฑ๋Šฅ ๊ฐ€์ƒ ๋จธ์‹ 

KUBERNETES ENGINE — Kubernetes๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜๋Š” ์ปจํ…Œ์ด๋„ˆ์‹ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋ฐฐํฌ, ๊ด€๋ฆฌ, ํ™•์žฅ

GOOGLE APP ENGINE — Google ์ธํ”„๋ผ์—์„œ ์–ธ์–ด์™€ ์ƒ๊ด€์—†์ด ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ์›น ๋ฐ ๋ชจ๋ฐ”์ผ ๋ฐฑ์—”๋“œ ๊ตฌ์ถ•

CLOUD FUNCTIONS — ํด๋ผ์šฐ๋“œ ์„œ๋น„์Šค๋ฅผ ๊ตฌ์ถ•ํ•˜๊ณ  ์—ฐ๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ ์„œ๋ฒ„๋ฆฌ์Šค ํ™˜๊ฒฝ

 

 

Decision Tree

https://cloud.google.com/blog/products/gcp/choosing-the-right-compute-option-in-gcp-a-decision-tree?m=1

 

1. ๋ชจ๋ฐ”์ผ์ด๋‚˜ HTML5๋กœ ๊ฐœ๋ฐœํ•˜๋Š”๊ฐ€?

2. ์ด๋ฒคํŠธ ๊ธฐ๋ฐ˜์˜ ์•ฑ์„ ๊ฐœ๋ฐœํ•˜๋Š”๊ฐ€?

3. ํŠน์ • OS๋‚˜ ์ปค๋„์„ ์‚ฌ์šฉํ•˜๋Š”๊ฐ€? GPU๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฐ€?

4. HTTP/S ์„œ๋น„์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฐ€? ์ด๋ฏธ ์กด์žฌํ•˜๋Š” ์•ฑ์ธ๊ฐ€? ์—ฌ๋Ÿฌ ํ™˜๊ฒฝ์— ๋ฐฐํฌ๋˜๋Š”๊ฐ€?

5. ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฐ€?

6. ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฐ€?

 

์•„๋ž˜ ๋™์˜์ƒ์„ ๋ณด๋ฉด ์˜ต์…˜์— ๋Œ€ํ•ด์„œ ์–ด๋Š ๊ฒฝ์šฐ์— ์‚ฌ์šฉํ•˜๋Š”๊ฒƒ์ด ์ ํ•ฉํ•œ์ง€ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

https://www.youtube.com/watch?v=2tLXKCgqwLY

๋™์˜์ƒ ์š”์•ฝ)

  • Firebase
    • Mobile Developer
    • storage
    • notification
    • synching
  • Google Cloud Function
    • event-driven
    • a glue connecting APIs together 
  • Google App Engine
    • Too intertwined? Running legacy code?
    • Fast Auto scaling => For spikey load
  • Google Container Engine
  • Cloud Run
    • brings server-less principles and containers 
    • flexibility
    • running containers
  • Google Compute Engine
    • High flexibility
    • gives VM
    • without virtually any changes
    • CPU, memory, disk -> bill
  • Google Kubernetes Engine
    • spin up new container automatically -> Grow/Shrink

์Šคํ† ๋ฆฌ์ง€ ํƒ€์ž… ์„ ํƒ

 

 

๊ตฌ๊ธ€ ํด๋ผ์šฐ๋“œ ์Šคํ† ๋ฆฌ์ง€ ์ œํ’ˆ ์„ค๋ช… ๐Ÿ‘‰๐Ÿป https://cloud.google.com/products/storage  

๋””์Šคํฌ, ์Šคํ† ๋ฆฌ์ง€์™€ ๊ฐ™์€ ์ƒํ’ˆ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ, ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋„ ๊ฐ™์ด ๋‹ค๋ฃฌ๋‹ค.

๐Ÿ‘‡๐Ÿป GCP์—์„œ ์Šคํ† ๋ฆฌ์ง€์™€ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„ ํƒํ•˜๊ธฐ (๋™์˜์ƒ) 

https://www.youtube.com/watch?v=mmjuMyRBPO4

  • Cloud Storage
    • standard
      • best latency
      • highest availability
    • Durable Reduced Availability
      • reduced availability expectation
      • lower price
    • Nearline
      • archival scenarios
      • less than once a month
  • Persistent Disk
  • Cloud Filestore
  • Cloud Firestore for Firebase
  • Data Transfer Service

 

 

 

Network Tier

document : 

https://medium.com/google-cloud/gcps-standard-tier-networking-performance-c66350cf4763

youtube : 

https://www.youtube.com/watch?v=wsdgWGE-mwE

lower throughput

higher latency

lower cost

 

Premium tier packets spend more time on Google’s network, and thus perform better (but cost more).

ํ”„๋ฆฌ๋ฏธ์—„์€ ๊ฐ€๊ฒฉ์€ ๋น„์‹ธ์ง€๋งŒ, ์ˆ˜ํ–‰๋Šฅ๋ ฅ์ด ๋” ์ข‹๋‹ค.

Standard tier packets spend less time on Google’s network, and thus, perform worse (but cost less!)

์Šคํƒ ๋‹ค๋“œ๋Š” ๊ฐ€๊ฒฉ์€ ์ €๋ ดํ•˜์ง€๋งŒ, ํ”„๋ฆฌ๋ฏธ์—„๋ณด๋‹ค ์ˆ˜ํ–‰๋Šฅ๋ ฅ์ด ๋–จ์–ด์ง„๋‹ค.

 

How much performance am I losing?

How much money am I saving?

์ด ๋‘๊ฐ€์ง€ ์งˆ๋ฌธ์„ ํ†ตํ•ด ํ”„๋ฆฌ๋ฏธ์—„๊ณผ ์Šคํƒ ๋‹ค๋“œ ์‚ฌ์ด์—์„œ ์„ ํƒํ•˜๋ฉด ๋œ๋‹ค.

 

Cloud IAM

https://www.youtube.com/watch?v=96HlT4f2AUU

 

IAM Policy

Identity - WHO

  • Google Account
    ๊ฐœ๋ฐœ์ž, ๊ด€๋ฆฌ์ž, Google Cloud์™€ ์ƒํ˜ธ์ž‘์šฉํ•˜๋Š” ๋‹ค๋ฅธ ๋ชจ๋“  ์‚ฌ๋žŒ์„ ๋‚˜ํƒ€๋‚ธ๋‹ค.
  • Service Account
    ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๊ณ„์ •์ด๋‹ค. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ํ•„์š”ํ•œ ๋งŒํผ ์„œ๋น„์Šค ๊ณ„์ •์„ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค.
  • Google Group
    ๊ตฌ๊ธ€ ๊ณ„์ •๊ณผ ์„œ๋น„์Šค๊ณ„์ •์„ ํ•ฉ์นœ ๊ฒƒ์œผ๋กœ, ์—ฌ๋Ÿฌ ์‚ฌ์šฉ์ž์˜ ๋ชจ์Œ์— ์•ก์„ธ์Šค ์ •์ฑ…์„ ํŽธ๋ฆฌํ•˜๊ฒŒ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.
  • Google Apps Domain
    ๊ทธ๋ฃน๊ณผ ๊ฐ™์ด ํŠน์ • ์กฐ์ง์˜ ๋ชจ๋“  ์‚ฌ์šฉ์ž๋“ค์—๊ฒŒ ๊ถŒํ•œ์„ ๋ถ€์—ฌํ•  ์ˆ˜ ์žˆ๋‹ค.

Resource

  • Google Cloud Project
  • Cloud Storage
  • Cloud Pub/Sub

Permissions

  • Service
  • Resource
  • Verb

https://cloud.google.com/iam/docs/permissions-reference

 

IAM permissions reference  |  Cloud IAM ๋ฌธ์„œ  |  Google Cloud

 

cloud.google.com

PUB/SUB๋งŒ๋“ค๊ธฐ => pubsub. topics. list

ํด๋ผ์šฐ๋“œ ์Šคํ† ๋ฆฌ์ง€์— ํŒŒ์ผ ์ž‘์„ฑ => stroage. bucket. create

 

Roles

  • Owner
    ํŽธ์ง‘์ž ๊ถŒํ•œ + ๊ตฌ์„ฑ์› ๊ด€๋ฆฌ ๊ถŒํ•œ
  • Editor
    ๋ทฐ์–ด ๊ถŒํ•œ + ์ž์›์„ ์ƒ์„ฑ, ์‚ญ์ œ, ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ
  • Viewer
    ๊ตฌ๊ธ€ ํด๋ผ์šฐ๋“œ ์ž์›์„ ๋ณด๊ธฐ๋งŒ ๊ฐ€๋Šฅ

728x90