Develop/DevOps

[Cloud OnBoard] 2 - 가상머신 및 스토리지 | [Cloud OnBoard] 2 - Virtual Machines and Storage

2019년 11월 26일 세종대학교에서 있었던 Google Cloud OnBoard에서 나누어준 자료집의 정리본입니다모듈2 가상머신 및 스토리지0. 추가 자료Google Compute Engine : https://cloud.google.com/compute/docsGoogle Cloud Platform VPC : https://cloud.google.com/compute/docs/vpcGoogle Cloud Stackdriver : https://cloud.google.com/stackdriver/docsGcloud 도구 가이드 : https://cloud.google.com/source-repositories/docsCloud Storage 개요 : https://cloud.google.com/sto..

[Cloud OnBoard] 2 - 가상머신 및 스토리지 | [Cloud OnBoard] 2 - Virtual Machines and Storage

728x90

2019년 11월 26일 세종대학교에서 있었던 Google Cloud OnBoard에서 나누어준 자료집의 정리본입니다


모듈2 가상머신 및 스토리지

0. 추가 자료

Google Compute Engine : https://cloud.google.com/compute/docs

Google Cloud Platform VPC : https://cloud.google.com/compute/docs/vpc

Google Cloud Stackdriver : https://cloud.google.com/stackdriver/docs

Gcloud 도구 가이드 : https://cloud.google.com/source-repositories/docs

Cloud Storage 개요 : https://cloud.google.com/storage

Google Cloud SQL 시작하기 : https://cloud.google.com/sql/docs/quickstart

Cloud Bigtable : https://cloud.google.com/stackdriver/docs

Cloud Spanner : https://cloud.google.com/spanner/docs

Cloud Datastore : https://cloud.google.com/datastore/docs

1. Virtual Private Cloud (VPC) 네트워크

  • 각 VPC 네트워크는 하나의 GCP 프로젝트에 포함
  • Cloud Platform 리소스를 프로비저닝하고 서로 연결하거나 격리할 수 있다.
  • VPC 네트워크는 글로벌 수준으로, 서브넷은 리전별 구성으로

2. Compute Engine

  • 관리형 가상머신 제공

    • 고성능 CPU, 대용량 메모리, 표준 및 공유 코어 머신 유형
    • 영구 디스크 (HD와 같은 느낌)
    • 표준, SSD, 로컬 SSD
    • 스냅샷
    • 다운타임없이 디스크 크기 조절
    • 인스턴스 메타데이터 및 시작 스크립트
  • 고객에게 유리한 가격 제시

    • 초단위 청구, 지속 사용 할인, 약정 사용 할인
    • 선점형 인스턴스
    • 추가 비용없이 스토리지 처리량 상향
    • 커스텀 머신 유형 : 필요한 하드웨어에 대해서만 지불
  • 수평확장 또는 수직 확장

    • 메모리 및 컴퓨팅 집약적 애플리케이션에 대규모 VM 사용
    • 탄력적인 확장형 애플리케이션에 자동 확장 사용

3. 중요한 VPC 기능

  • VCP 네트워크의 토폴로지 제어

    • 경로 테이블을 사용해 트래픽을 네트워크 안에서는 물론 서브넷 간에 전달
    • 방화벽을 사용해 네트워크 트래픽이 허용되는 항목을 제어
    • 공유 VPC를 사용해 네트워크 또는 개별 서브넷을 다른 GCP 프로젝트와 공유
    • VPC 피어링을 사용해 GCP 프로젝트의 네트워크의 상호연결
  • 전역 Cloud Load Balancing으로 전 세계에 단일 프런트 엔드로 제공되는 애플리케이션

    • 사용자가 단일 글로벌 Anycast IP 주소를 사용
    • Google 백본을 통해 가장 가까운 접속 지점에서 사용자에게로 트래픽 전달
    • 부하를 기준으로 백엔드 선택
    • 정상 백엔드만 트래픽 수신
    • 가동 준비가 필요 없음
  • Cloud DNS
    • 관리형 영역을 생성한 후 DNS 레코드를 추가, 편집, 삭제
    • RESTful API 또는 명령줄 인터페이스를 사용해 영역과 레코드를 프로그래매틱 방식으로 관리
  • Cloud CDN (Content Delivery Network)

    • 전세계에 분산된 Google의 에지 캐시를 사용하여 콘텐츠를 사용자에게 가깝게 캐싱
    • 다른 CDN의 사용을 원하는 경우 CDN Interconnect 사용
  • 다양한 상호 연결 옵션을 제공

    • VPN : VPN 터널을 통한 Gbps 단위의 연결 확보
    • 다이렉트 피어링 : 하이브리드 클라우드 워크로드를 위한 사용자와 Google간 비공개 연결
    • Dedicated Interconnect : Google 접속 지점에서 Google Cloud로 전달되는 프라이빗 클라우드 트래픽을 위한 N X 10G 전송 회로 연결
    • 이동통신사 피어링 : 서비스 제공업체의 대규모 파트너 네트워크를 통한 연결
    • Partner Interconnect : 지원되는 서비스 제공업체를 통한 온프레미스 네트워크 및 VPC 네트워크 간 연결
  • 부하 분산 옵션 제품군을 제공하는 Google VPC

 

글로벌 HTTP(S) 글로벌 SSL 프록시 글로벌 TCP 프록시 리전 리전 내부
부하를 기준으로한 Layer 7 부하 분산 부하를 기준으로 한 HTTPS외 SSL 트래픽의 Layer 4 부하 분산 SSL외 TCP 트래픽의 Layer 4 부하 분산 모든 트래픽(TCP, UDP)의 부하 분산 VPC내 트래픽의 부하 분산
각종 URL을 다양한 백엔드에 라우팅 할 수 있음 특정 포트 번호에서 지원됨 특정 포트번호에서 지원됨 모든 포트번호에서 지원됨 다중 계층 애플리케이션의 내부 계층에 사용

4. GCP - 스토리지

5. Cloud Storage

  • Cloud Storage의 특징

    • BLOB (binary large-object) 스토리지
    • 고성능 인터넷 규모 : 단순한 관리
    • 용량을 관리할 필요가 없음
    • 저장 데이터 암호화
    • 기본적으로 Google에서 엔드포인트로 전송 중인 데이터 암호화
    • 온라인 및 오프라인 가져오기 서비스 사용 가능
  • Cloud Storage 파일은 버킷으로 구성
  • Cloud Storage 등급 선택하기
  • Cloud Stoarge로 데이터를 가져오는 3가지 방법


    • 온라인 전송 : 명령줄 도구 또는 드래그인 드롭을 사용한 자체 관리형 사본
    • Storage Transfor Service : 일정에 따른 관리형 일괄 전송
    • Transfer Appliance : 데이터를 안전하게 전송하는, 랙 장착 가능한 어플라이언스
  • 다른 GCP 서비스와 함께 사용이 가능하다.

6. Cloud Bigtable

  • Cloud Bigtable의 특징


    • 관리형 NoSQL
    • 테라바이트 규모의 애플리케이션을 위한 완전 관리형 NoSQL, 광폭 열 데이터베이스 서비스
    • HBase API로 액세스
    • 빅데이터, Hadoop 에코시스템과 기본적으로 호환
    • 복제 스토리지
    • 가동 여부와 관계없이 상시 데이터 암호화
    • 역할 기반 ACL
    • google Analytics, Gmail등의 주요 애플리케이션 실행
  • Bigtable 액세스 패턴

    • Application API
      관리형 VM, HBase REST 서버, HBase 클라이언트를 사용하는 자바 서버와 같은 데이터 서비스 계층을 통해 Cloud Bigtable에서 데이터를 읽고 쓸 수 있다. 일반적으로 애플리케이션, 대시보드, 데이터 서비스에 데이터를 제공한다.
    • 스트리밍
      Cloud Dataflow Streaming, Spark Streaming, Storm과 같은 다양한 인기 스트림 처리 프레임워크를 통해 데이터를 스트리밍(이벤트별로 쓰기) 할 수 있다.
    • 일괄 처리
      Hadoop 맵 리듀스, Dataflow, Spark와 같은 일괄 프로세스를 통해 Cloud Bigtable에서 데이터를 읽고 쓸 수 있다. 요약 데이터 또는 새로 계산괸 데이터가 Cloud Bigtable 또는 다운스트림 데이터베이스에 다시 기록되는 경우가 많다.

 

7. Cloud SQL 및 Cloud Spanner

7-1. Cloud SQL

 

  • Cloud SQL의 특징

    • 관리형 RDBMS
    • MySQL및 PostgreSQL 데이터베이스를 서비스로 제공
    • 자동 복제
    • 관리형 백업
    • 수직 확장 (읽기 및 쓰기)
    • 수평 확장 (읽기)
    • Google 보안
  • 다른 GCP 서비스와 함께 사용 가능

    • Cloud SQL + App Engine
      표준 드라이버를 통해 Cloud SQL과 App Engine을 함께 사용할 수 있다.
      App Engine 애플리케이션을 따르도록 Cloud SQL인스턴스를 구성할 수 있다.
    • Cloud SQL + Compute Engine
      Compute Engine 인스턴스에서 외부 IP 주소를 사용하여 Cloud SQL 인스턴스에 액세스 하도록 승인할 수 있다.
      Cloud SQL 인스턴스를 선호 영역에 구성할 수 있다.
    • Cloud SQL + 외부 서비스
      Cloud SQL을 외부 애플리케이션 및 클라이언트와 함께 사용할 수 있다.
      표준 도구를 사용하여 데이터베이스를 관리할 수 있다.
      외부 읽기 복제본을 구성할 수 있다.

7-2. Cloud Spanner

 

  • 수평으로 확장 가능한 RDBMS
  • 자동 복제
  • 강력한 전역 일관성
  • 가용성이 높은 관리형 인스턴스
  • SQL (ANSI 2011, 확장 포함)

8. Cloud Datastore

 

 

  • 수평으로 확장 가능한 NoSQL DB
  • 애플리케이션 백엔드용으로 설계된 NoSQL
  • 완전 관리형 : 분산 아키텍처를 사용해 확장을 자동 관리
  • 내장형 중복 기능
  • ACID 트랜잭션 지원
  • 스키마 없는 액세스 : 기본 데이터 구조를 고려할 필요 없음
  • 로컬 개발 도구
  • 무료 일일 할당량 포함
  • RESTful 인터페이스를 통해 어디서나 액세스

9. 스토리지 옵션 비교

9-1. 기술 세부 정보

  Cloud Datastore Cloud Storage Cloud Bigtable Cloud SQL Cloud Spanner BigQuery
유형 NoSQL 문서 Blobstore NoSQL
광폭 열
OLTP용 관계형 SQL OLTP용 관계형 SQL OLAP용 관계형 SQL
트랜잭션 O X 단일 행 O O X
복잡한 쿼리 X X X O O O
용량 TB+ PB+ PB+ 10TB PB PB+
단위 크기 1MB/항목 -10MB/셀 -100MB/행 5TB/객체 DB엔진 결정 10.240MiB/행 10MB/행

9-2. 사용 사례

  Cloud Datastore Cloud Storage Cloud Bigtable Cloud SQL Cloud Spanner BigQuery
유형 NoSQL 문서 Blobstore NoSQL 광폭 열 OLTP용 관계형 SQL OLTP용 관계형 SQL OLAP용 관계형 SQL
권장용도 반구조화 애플리케이션 데이터, 내구성 높은 키-값 데이터 '플랫' 데이터, 집중적인 읽기 /쓰기, 이벤트, 분석 데이터 구조화 및 비구조화 바이너리 또는 객체 데이터 웹 프레임워크, 기존 애플리케이션 대규모 데이터 베이스 애플리케이션 (약 2TB이상) 대화형 쿼리, 오프라인 분석
사용사례 입문용, App Engine 애플리케이션 AdTech, 금융, IoT 데이터 이미지, 대용량 미디어 파일, 백업 사용자 인증 정보, 고객 주문 높은 I/O, 전역적인 일관성이 필요한 모든 경우 데이터 웨어하우스
단위크기 1MB/항목 -10MB/셀 -100MB/행 5TB/객체 DB엔진 결정 10.240MiB/행 10MB/행

This is a summary of the handout distributed at the Google Cloud OnBoard event held at Sejong University on November 26, 2019.


Module 2: Virtual Machines and Storage

0. Additional Resources

Google Compute Engine : https://cloud.google.com/compute/docs

Google Cloud Platform VPC : https://cloud.google.com/compute/docs/vpc

Google Cloud Stackdriver : https://cloud.google.com/stackdriver/docs

Gcloud Tool Guide : https://cloud.google.com/source-repositories/docs

Cloud Storage Overview : https://cloud.google.com/storage

Getting Started with Google Cloud SQL : https://cloud.google.com/sql/docs/quickstart

Cloud Bigtable : https://cloud.google.com/stackdriver/docs

Cloud Spanner : https://cloud.google.com/spanner/docs

Cloud Datastore : https://cloud.google.com/datastore/docs

1. Virtual Private Cloud (VPC) Network

  • Each VPC network belongs to a single GCP project
  • You can provision Cloud Platform resources and connect or isolate them from each other.
  • VPC networks are configured at the global level, while subnets are configured at the regional level

2. Compute Engine

  • Provides managed virtual machines

    • High-performance CPUs, large memory, standard and shared-core machine types
    • Persistent disks (similar to a hard drive)
    • Standard, SSD, Local SSD
    • Snapshots
    • Resize disks with no downtime
    • Instance metadata and startup scripts
  • Customer-friendly pricing

    • Per-second billing, sustained use discounts, committed use discounts
    • Preemptible instances
    • Higher storage throughput at no additional cost
    • Custom machine types: pay only for the hardware you need
  • Scale out or scale up

    • Use large VMs for memory and compute-intensive applications
    • Use autoscaling for elastic, scalable applications

3. Key VPC Features

  • Control the topology of VPC networks

    • Use route tables to forward traffic within the network as well as between subnets
    • Use firewalls to control what network traffic is allowed
    • Use Shared VPC to share a network or individual subnets with other GCP projects
    • Use VPC Peering to interconnect networks across GCP projects
  • Global Cloud Load Balancing provides applications served by a single frontend worldwide

    • Users use a single global Anycast IP address
    • Traffic is routed to the user from the nearest point of presence via the Google backbone
    • Backends are selected based on load
    • Only healthy backends receive traffic
    • No pre-warming required
  • Cloud DNS
    • Create managed zones, then add, edit, and delete DNS records
    • Programmatically manage zones and records using a RESTful API or command-line interface
  • Cloud CDN (Content Delivery Network)

    • Cache content close to users using Google's globally distributed edge caches
    • Use CDN Interconnect if you prefer to use another CDN
  • Offers a variety of interconnect options

    • VPN: Secure Gbps-level connectivity through VPN tunnels
    • Direct Peering: Private connection between you and Google for hybrid cloud workloads
    • Dedicated Interconnect: N x 10G transport circuits for private cloud traffic from a Google point of presence to Google Cloud
    • Carrier Peering: Connectivity through a service provider's extensive partner network
    • Partner Interconnect: Connectivity between on-premises networks and VPC networks through a supported service provider
  • Google VPC provides a suite of load balancing options

 

Global HTTP(S) Global SSL Proxy Global TCP Proxy Regional Regional Internal
Layer 7 load balancing based on load Layer 4 load balancing for non-HTTPS SSL traffic based on load Layer 4 load balancing for non-SSL TCP traffic Load balancing for all traffic (TCP, UDP) Load balancing for traffic within a VPC
Can route various URLs to different backends Supported on specific port numbers Supported on specific port numbers Supported on any port number Used for internal tiers of multi-tier applications

4. GCP - Storage

5. Cloud Storage

  • Features of Cloud Storage

    • BLOB (binary large-object) storage
    • High performance, internet scale: simple management
    • No need to manage capacity
    • Data at rest encryption
    • Data in transit encryption by default from Google to endpoints
    • Online and offline import services available
  • Cloud Storage files are organized into buckets
  • Choosing a Cloud Storage class
  • 3 ways to bring data into Cloud Storage


    • Online transfer: Self-managed copies using command-line tools or drag and drop
    • Storage Transfer Service: Managed batch transfers on a schedule
    • Transfer Appliance: A rackable appliance for securely transferring data
  • Can be used together with other GCP services

6. Cloud Bigtable

  • Features of Cloud Bigtable


    • Managed NoSQL
    • Fully managed NoSQL, wide-column database service for terabyte-scale applications
    • Access via HBase API
    • Natively compatible with big data and the Hadoop ecosystem
    • Replicated storage
    • Data encryption at all times, whether in use or not
    • Role-based ACLs
    • Powers key applications like Google Analytics, Gmail, and more
  • Bigtable access patterns

    • Application API
      You can read and write data in Cloud Bigtable through a data service layer such as managed VMs, an HBase REST server, or a Java server using an HBase client. This typically serves data to applications, dashboards, and data services.
    • Streaming
      You can stream data (write per event) through various popular stream processing frameworks such as Cloud Dataflow Streaming, Spark Streaming, and Storm.
    • Batch processing
      You can read and write data in Cloud Bigtable through batch processes such as Hadoop MapReduce, Dataflow, and Spark. Summary data or newly computed data is often written back to Cloud Bigtable or a downstream database.

 

7. Cloud SQL and Cloud Spanner

7-1. Cloud SQL

 

  • Features of Cloud SQL

    • Managed RDBMS
    • Offers MySQL and PostgreSQL databases as a service
    • Automatic replication
    • Managed backups
    • Vertical scaling (read and write)
    • Horizontal scaling (read)
    • Google security
  • Can be used with other GCP services

    • Cloud SQL + App Engine
      You can use Cloud SQL with App Engine through standard drivers.
      You can configure a Cloud SQL instance to follow an App Engine application.
    • Cloud SQL + Compute Engine
      You can authorize access to a Cloud SQL instance using the external IP address from a Compute Engine instance.
      You can configure a Cloud SQL instance in a preferred zone.
    • Cloud SQL + External Services
      You can use Cloud SQL with external applications and clients.
      You can manage databases using standard tools.
      You can configure external read replicas.

7-2. Cloud Spanner

 

  • Horizontally scalable RDBMS
  • Automatic replication
  • Strong global consistency
  • Highly available managed instances
  • SQL (ANSI 2011, with extensions)

8. Cloud Datastore

 

 

  • Horizontally scalable NoSQL DB
  • NoSQL designed for application backends
  • Fully managed: automatically handles scaling using a distributed architecture
  • Built-in redundancy
  • Supports ACID transactions
  • Schemaless access: no need to worry about the underlying data structure
  • Local development tools
  • Includes free daily quota
  • Accessible from anywhere via a RESTful interface

9. Comparing Storage Options

9-1. Technical Details

  Cloud Datastore Cloud Storage Cloud Bigtable Cloud SQL Cloud Spanner BigQuery
Type NoSQL Document Blobstore NoSQL
Wide-column
Relational SQL for OLTP Relational SQL for OLTP Relational SQL for OLAP
Transactions O X Single-row O O X
Complex queries X X X O O O
Capacity TB+ PB+ PB+ 10TB PB PB+
Unit size 1MB/entity -10MB/cell -100MB/row 5TB/object Determined by DB engine 10,240MiB/row 10MB/row

9-2. Use Cases

  Cloud Datastore Cloud Storage Cloud Bigtable Cloud SQL Cloud Spanner BigQuery
Type NoSQL Document Blobstore NoSQL Wide-column Relational SQL for OLTP Relational SQL for OLTP Relational SQL for OLAP
Best for Semi-structured application data, durable key-value data 'Flat' data, heavy read/write, event and analytics data Structured and unstructured binary or object data Web frameworks, existing applications Large-scale database applications (roughly 2TB+) Interactive queries, offline analytics
Use cases Getting started, App Engine applications AdTech, finance, IoT data Images, large media files, backups User credentials, customer orders Any case requiring high I/O and global consistency Data warehousing
Unit size 1MB/entity -10MB/cell -100MB/row 5TB/object Determined by DB engine 10,240MiB/row 10MB/row

댓글

Comments

Develop/DevOps

[Cloud OnBoard] 1 - Google Cloud Platform 소개 | [Cloud OnBoard] 1 - Introduction to Google Cloud Platform

2019년 11월 26일 세종대학교에서 있었던 Google Cloud OnBoard에서 나누어준 자료집의 정리본입니다모듈1 Google Cloud Platform 소개0. 추가 자료GCP를 선택해야하는 이유 : https://cloud.google.com/why-google/가격 책정 철학 : https://cloud.google.com/pricing/philosophy데이터 센터 : https://www.google.com/about/datacentersGoogle Cloud Platform 제품 개요 : https://cloud.google.com/productsGoogle Cloud Platform 솔루션 : https://cloud.google.com/solutionsGoogle Cloud Pla..

[Cloud OnBoard] 1 - Google Cloud Platform 소개 | [Cloud OnBoard] 1 - Introduction to Google Cloud Platform

728x90

2019년 11월 26일 세종대학교에서 있었던 Google Cloud OnBoard에서 나누어준 자료집의 정리본입니다


모듈1 Google Cloud Platform 소개

0. 추가 자료

GCP를 선택해야하는 이유 : https://cloud.google.com/why-google/

가격 책정 철학 : https://cloud.google.com/pricing/philosophy

데이터 센터 : https://www.google.com/about/datacenters

Google Cloud Platform 제품 개요 : https://cloud.google.com/products

Google Cloud Platform 솔루션 : https://cloud.google.com/solutions

Google Cloud Platform 보안 : https://cloud.google.com/security

권한 구성 : https://cloud.google.com/docs/permissions-overview

Identity And Access Management (IAM) : https://cloud.google.com/iam/

Cloud SDK 설치 및 빠른 시작 : https://cloud.google.com/sdk/#Quick_Start

gcloud 도구 가이드 : https://cloud.google.com/sdk/gcloud

1. GCP의 특징

  • 고객 상황에 알맞은 서비스를 제공하는 GCP 컴퓨팅 아키텍처
  • 전세계 134개의 접속 지점과 13개의 해저 케이블에 투자했다
    전 세계적인 서비스에 GCP는 적합하다.
  • GCP의 구성은 Region과 Zone으로 구성되어있다.
    멀티 리전 : 미국 - 한국
    리전 : europe-west2
    Zone : europe-west2-a, europe-west2-b, europe-west2-c
    현재 발표된 Region의 수
  • google은 환경보호에 앞장선다.
    • 2007년부터 탄소 중립성 100%를 유지하고있다.
    • 전세계적으로 재생 에너지를 가장 많이 구매하는 기업 중 하나이다.
    • ISO 14001 인증을 획득한 가장 최초의 데이터 센서이다.
  • Google은 고객에게 유리한 가격 조건을 제시한다.
    • 분단위 증가분 결제 - 컴퓨팅, 데이터 처리, 기타 서비스
    • 지속 사용 할인 - 가상 머신을 한달에 25%이상 사용하는 경우 자동으로 적용
    • 약정 사용 할인 - 장기간 워크로드가 꾸준할 경우 비용 할인
    • 선점형 사용 할인 - 일시 중단될 수 있는 워크로드에 대한 비용 할인
    • 커스텀 VM 인스턴스 유형 - 애플리케이션에 필요한 리소스에만 지불
  • 개방형 API 및 오픈소스
  • 보안
  • GCP의 서비스

2. CGP 리소스 계층 구조

2-1. 리소스 계층 구조 수준에 따라 신뢰 경계정의

  • 조직 구조에 따라 리소스를 그룹화
  • 계층 구조 수준에 따라 신뢰 경계 및 리소스 격리가 설정

2-2. 모든 GCP 서비스는 프로젝트와 연결

  • 리소스 및 할당량 사용량 추적
  • 결제를 사용설정
  • 권한 및 사용자 인증 정보를 관리
  • 서비스 및 API를 사용 설정

2-3. 프로젝트에 사용되는 3가지 식별 속성

프로젝트 ID 전역에서 고유 사용자가 선택 변경 불가능
프로젝트 ID 전역에서 고유 사용자가 선택 변경 불가능
프로젝트 이름 고유할 필요 없음 사용자가 선택 변경 불가능
프로젝트 번호 전역에서 고유 GCP 에서 선택 변경 불가능

2-4. GCP의 폴더관리

  • 폴더로 한 조직내의 여러 프로젝트를 그룹화 할 수 있다.
  • 폴더에는 프로젝트나 다른 폴더 또는 이 두가지가 모두 포함될 수 있다.
  • 폴더를 사용해 정책을 할당할 수 있다.

2-5. 조직노드로 프로젝트 정리

2-6. IAM 리소스 계층 구조 예시

  • 정책이 리소스에 설정 : 각 정책은 역할 및 역할 구성원 집합을 명시
  • 상위 정책이 리소스에 상속 : 리소스 정책은 상위 리소스와 현재 리소스의 합집합 이다.
  • 덜 제한적인 상위정책이 더 제한적인 리소스 정책을 재 정의

3. Identity and Access Management (IAM)

3-1. GCP IAM에서 정의하는 요소 3가지

  • 누가
    1. Google 계정 Cloud ID 사용자 : test@gamil.com , test@example.com
    2. 서비스 계정 : test@project_id.iam.gserviceaccount.com
    3. google 그룹 : test@googlegroups.com
    4. cloudID 또는 G Suite 도메인 : example.com
  • 무엇을
    IAM의 역할은 관련된 권한의 모음이다. 서비스 리소스 등에 대해 인스턴스 관리자 역할을 한다.
  • 어느 리소스에
    계층 구조의 특정 항목에 대한 역할을 부여받은 사용자가 IAM이다.

3-2. IAM의 3가지 역할

  • 기본 역할
    • 프로젝트의 모든 GCP 서비스에 적용된다. [모든 리소스에]
    • 세분화 되지 않은 고정된 액세스 수준을 제공한다.
      소유자 구성원 초대 / 구성원 삭제 / 프로젝트 삭제 / 기타 ...
      편집자 애플리케이션 배포 / 코드 수정 / 서비스 구성 / 기타 ...
      뷰어 읽기 전용 액세스
      결제 관리자 결제 관리 / 관리자 추가 및 삭제
      한 프로젝트에 여러 소유자, 편집자, 뷰어, 결제 관리자가 있을 수 있다.
  • 사전정의 역할
    • 프로젝트의 모든 GCP 서비스에 적용된다. [이 프로젝트, 폴더 or 조직의 Gompute Engine 리소스에]
    • 특정 서비스에 보다 세분화된 권한을 제공한다.
  • 커스텀 역할
    • IAM 커스텀 역할 권한 집합을 정확하게 정의할 수 있다.

3-3. 서비스 계정

  • 프로젝트에서 서버간 상호작용에 사용되는 ID 제공
  • 서비스간 인증에 사용
  • 리소스에서 사용하는 권한을 제어하는데 사용 : 이를 통해 애플리케이션이 인증된 최종 사용자 대신 작업을 수행할 수 있음
  • 이메일 주소로 식별
    PROJECT_NUMBER-compute@developer.gserviceaccount.com
    PROJECT_ID@appspot.gserviceaccount.com
  • 서비스 계정과 IAM
    • 키를 사용해 서비스 계정에 인증 : google에서 Compute Engine 및 App Engine의 키 관리
    • 서비스 계정에 사전 정의 또는 커스텀 IAM 역할 할당 가능

4. Cloud ID

  • 무엇으로 GCP 관리 사용자를 관리하나요?
    • Gmail 계정 및 Google 그룹스
    • G Suite 도메인의 사용자 및 그룹
    • Cloud ID 도메인의 사용자 및 그룹
  • 다른 기업 디렉터리가 있는 경우

5. Google Cloud Platform 과의 상호작용

5-1. GCP와 상호작용하는 4가지 방법

  • Cloud Platform Console : 웹 사용자 인터페이스
    • 모든 프로젝트 데이터에 대한 중앙 관리형 콘솔
    • 개발자 도구 : Cloud Sourc Repositories (github 같은 것), Cloud shell, Test Lab (모바일 앱 테스트)
    • 제품 API에 액세스
    • 프로젝트 관리 및 생성
  • Cloud Shell 및 Cloud SDK : 명령줄 인터페이스
    • SDK에 Cloud Platfrom 제품 및 서비스를 위한 CLI 도구 포함 : gcloud, gwutil(Cloud Storage), bq(BigQuery)
    • Docker 이미지로 제공
    • Cloud Shell을 통해 제공 : Compute Engine 인스턴스에서 실행되는 Cloud SDK의 컨테이너형 버전
  • Cloud Console Mobile App : iOS및 Android
    • 가상 머신 및 데이터베이스 인스턴스 관리
    • Google App Engine에서 앱 관리
    • 결제 관리
    • 맞춤 설정 가능한 대시보드로 프로젝트 시각화
  • REST 기반 API : 커스텀 애플리케이션
    • 제품 및 서비스에 프로그래매틱 액세스 : 일반적으로 JSON을 교환방식으로 사용 , 인증 및 승인에 OAuth 2.0 사용
    • Google Cloud Platform Console을 통해 사용 설정
    • 지출을 관리할 수 있도록 대부분의 API에 일일 할당량 및 요금(한도)이 적용됨 : 요청에 따라 할당 및 요금 상향 조정 가능

5-2. API 탐색기

 

  • 브라우저를 사용하여 간편하게 Google API를 사용해볼 수 있는 대화형 도구
  • 사용가능한 API 및 버전을 신속하게 탐색
  • 각 API에서 사용 가능한 메서드 및 지원되는 매개 변수를 인라인 문서로 확인
  • 실시간으로 메서드 요청을 실행하고 응답 확인
  • 손쉽게 인증 및 승인된 API 호출 작성

5-3. Cloud 클라이언트 라이브러리

 

  • 커뮤니티에서 소유하며 직접 개발한 클라이언트 라이브러리
  • 예시 : Google API 클라이언트 라이브러리
    • 오픈 소스, 자동 생성, 다양한 언어 지원
      (Java, Python, Javascript, PHP, .NET, GO, Node.js, Ruby, Objective-C, Dart)

This is a summary of the materials distributed at the Google Cloud OnBoard event held at Sejong University on November 26, 2019.


Module 1: Introduction to Google Cloud Platform

0. Additional Resources

Why choose GCP: https://cloud.google.com/why-google/

Pricing philosophy: https://cloud.google.com/pricing/philosophy

Data centers: https://www.google.com/about/datacenters

Google Cloud Platform product overview: https://cloud.google.com/products

Google Cloud Platform solutions: https://cloud.google.com/solutions

Google Cloud Platform security: https://cloud.google.com/security

Permission configuration: https://cloud.google.com/docs/permissions-overview

Identity And Access Management (IAM): https://cloud.google.com/iam/

Cloud SDK installation and quickstart: https://cloud.google.com/sdk/#Quick_Start

gcloud tool guide: https://cloud.google.com/sdk/gcloud

1. Features of GCP

  • GCP computing architecture that provides services tailored to customer needs
  • Google has invested in 134 points of presence worldwide and 13 submarine cables.
    GCP is well-suited for global-scale services.
  • GCP is structured with Regions and Zones.
    Multi-region: US - Korea
    Region: europe-west2
    Zone: europe-west2-a, europe-west2-b, europe-west2-c
    Number of currently announced Regions
  • Google leads the way in environmental protection.
    • Has maintained 100% carbon neutrality since 2007.
    • One of the largest purchasers of renewable energy in the world.
    • The first data center to obtain ISO 14001 certification.
  • Google offers customer-friendly pricing.
    • Per-minute billing increments - compute, data processing, and other services
    • Sustained use discounts - automatically applied when virtual machines are used more than 25% of the month
    • Committed use discounts - cost discounts for long-term, steady workloads
    • Preemptible use discounts - cost discounts for workloads that can be interrupted
    • Custom VM instance types - pay only for the resources your application needs
  • Open APIs and open source
  • Security
  • GCP services

2. GCP Resource Hierarchy

2-1. Defining Trust Boundaries by Resource Hierarchy Level

  • Group resources according to organizational structure
  • Trust boundaries and resource isolation are set according to hierarchy level

2-2. All GCP Services Are Associated with Projects

  • Track resource and quota usage
  • Enable billing
  • Manage permissions and user credentials
  • Enable services and APIs

2-3. Three Identifying Attributes Used for Projects

Project ID Globally unique Chosen by user Immutable
Project ID Globally unique Chosen by user Immutable
Project name Does not need to be unique Chosen by user Immutable
Project number Globally unique Assigned by GCP Immutable

2-4. Folder Management in GCP

  • Folders can be used to group multiple projects within an organization.
  • Folders can contain projects, other folders, or both.
  • Folders can be used to assign policies.

2-5. Organizing Projects with Organization Nodes

2-6. IAM Resource Hierarchy Example

  • Policies are set on resources: Each policy specifies a set of roles and role members.
  • Parent policies are inherited by resources: A resource policy is the union of the parent resource and the current resource.
  • A less restrictive parent policy overrides a more restrictive resource policy.

3. Identity and Access Management (IAM)

3-1. Three Elements Defined in GCP IAM

  • Who
    1. Google account or Cloud ID user: test@gamil.com, test@example.com
    2. Service account: test@project_id.iam.gserviceaccount.com
    3. Google group: test@googlegroups.com
    4. Cloud ID or G Suite domain: example.com
  • What
    IAM roles are a collection of related permissions. They act as instance administrator roles for service resources, etc.
  • Which resource
    IAM is about users who are granted roles on specific items in the hierarchy.

3-2. Three Types of IAM Roles

  • Basic roles
    • Applied to all GCP services in a project. [To all resources]
    • Provides fixed, coarse-grained access levels.
      Owner Invite members / Remove members / Delete project / etc.
      Editor Deploy applications / Modify code / Configure services / etc.
      Viewer Read-only access
      Billing Administrator Manage billing / Add and remove administrators
      A project can have multiple owners, editors, viewers, and billing administrators.
  • Predefined roles
    • Applied to all GCP services in a project. [To Compute Engine resources in this project, folder, or organization]
    • Provides more fine-grained permissions for specific services.
  • Custom roles
    • You can precisely define a set of IAM custom role permissions.

3-3. Service Accounts

  • Provides identity for server-to-server interactions within a project
  • Used for authentication between services
  • Used to control permissions used by resources: This allows applications to perform actions on behalf of authenticated end users
  • Identified by email address
    PROJECT_NUMBER-compute@developer.gserviceaccount.com
    PROJECT_ID@appspot.gserviceaccount.com
  • Service accounts and IAM
    • Authenticate to service accounts using keys: Google manages keys for Compute Engine and App Engine
    • Predefined or custom IAM roles can be assigned to service accounts

4. Cloud ID

  • What do you use to manage GCP admin users?
    • Gmail accounts and Google Groups
    • Users and groups from a G Suite domain
    • Users and groups from a Cloud ID domain
  • If you have another corporate directory

5. Interacting with Google Cloud Platform

5-1. Four Ways to Interact with GCP

  • Cloud Platform Console: Web user interface
    • Centralized console for all project data
    • Developer tools: Cloud Source Repositories (like GitHub), Cloud Shell, Test Lab (mobile app testing)
    • Access to product APIs
    • Project management and creation
  • Cloud Shell and Cloud SDK: Command-line interface
    • SDK includes CLI tools for Cloud Platform products and services: gcloud, gsutil (Cloud Storage), bq (BigQuery)
    • Available as a Docker image
    • Available through Cloud Shell: A containerized version of Cloud SDK running on a Compute Engine instance
  • Cloud Console Mobile App: iOS and Android
    • Manage virtual machines and database instances
    • Manage apps on Google App Engine
    • Manage billing
    • Visualize projects with customizable dashboards
  • REST-based API: Custom applications
    • Programmatic access to products and services: Typically uses JSON as the exchange format, uses OAuth 2.0 for authentication and authorization
    • Enabled through the Google Cloud Platform Console
    • Most APIs have daily quotas and rates (limits) applied to help manage spending: Quotas and rates can be increased upon request

5-2. API Explorer

 

  • An interactive tool that lets you easily try out Google APIs using your browser
  • Quickly explore available APIs and versions
  • View available methods and supported parameters for each API with inline documentation
  • Execute method requests in real time and view responses
  • Easily create authenticated and authorized API calls

5-3. Cloud Client Libraries

 

  • Community-owned and community-developed client libraries
  • Example: Google API client libraries
    • Open source, auto-generated, supports multiple languages
      (Java, Python, Javascript, PHP, .NET, GO, Node.js, Ruby, Objective-C, Dart)

댓글

Comments