20210827 Future Tech Night

Taisei Ito
August 27, 2021

20210827 Future Tech Night

Taisei Ito

August 27, 2021

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

34 slides
  1. Copyright © 2021 by Future Corporation 自己紹介 • 伊藤太斉(たいせい) @kaedemalu

    ◦ 2019年9月中途入社(社会人4年目) ◦ Technology Innovation Group所属 ◦ 技術ブログの中の人 • 技術領域 ◦ GCP, AWS, IaC(Terraform, Ansible) • コミュニティ ◦ GCPUG Shonan Staff ◦ CloudNative Days Committee
  2. Agenda • 技術選定 • Serverless NEGの利用 • Serverless VPC Access

    • ハマったポイント Copyright © 2021 by Future Corporation
  3. 利用サービスの選定 • コンテナですでに開発されている • リクエストが多くない • インフラの管理を極力減らしたい Copyright © 2021

    by Future Corporation Compute Compute Engine Cloud Functions Container- Optimized OS Cloud Run Kubernetes Engine App Engine
  4. 利用サービスの選定 • コンテナですでに開発されている • リクエストが多くない • インフラの管理を極力減らしたい Copyright © 2021

    by Future Corporation Compute Compute Engine Cloud Functions Container- Optimized OS Cloud Run Kubernetes Engine App Engine
  5. 利用サービスの選定 • コンテナですでに開発されている • リクエストが多くない • インフラの管理を極力減らしたい Copyright © 2021

    by Future Corporation Compute Compute Engine Cloud Functions Container- Optimized OS Cloud Run Kubernetes Engine App Engine
  6. 利用サービスの選定 • コンテナですでに開発されている • リクエストが多くない • インフラの管理を極力減らしたい Copyright © 2021

    by Future Corporation Compute Compute Engine Cloud Functions Container- Optimized OS Cloud Run Kubernetes Engine App Engine
  7. Serverless Network Endpoint Group(NEG) • 2020/10にGAになったサーバーレスサービス向けのNEG ◦ eg. App Engine,

    Cloud Run, Cloud Functions • サーバーレスサービスを抽象化して、ロードバランサーと 組み合わせることを目的としている Copyright © 2021 by Future Corporation 参考:https://medium.com/google-cloud-jp/serverless-neg-でシステム開発をより柔軟に-4f9cebd2780f
  8. サーバーレスVPCコネクタ • サーバーレスサービスがVPCに直接接続するときに利用 ◦ Cloud RunやApp Engineが内部IP経由でアクセスできる (VPC内部のサービスを公開しなくても良い) • 他のVPCと接続(e.g.

    VPC Peering)している場合も接続先の リソースまでアクセスできる Copyright © 2021 by Future Corporation 参考:https://cloud.google.com/vpc/docs/serverless-vpc-access?hl=ja
  9. サービスアカウントにハマる • Cloud Run作成時に「Cloud Runサービスエージェント」の ロールが付けられたサービスアカウントがこっそり作成される e.g.) [email protected] • ↑のサービスアカウントをShared

    VPCのホストプロジェクトで 「サーバーレスVPCアクセスユーザー」を付与する Copyright © 2021 by Future Corporation 参考:https://cloud.google.com/run/docs/configuring/service-accounts?hl=ja
  10. Cloud Runのエラー Cloud Run error: Container failed to start. Failed

    to start and then listen on the port defined by the PORT environment variable. Logs for this revision might contain more information. Copyright © 2021 by Future Corporation 参考:https://cloud.google.com/run/docs/configuring/service-accounts?hl=ja • Runがポートをリッスンできない →あくまで「結果的に」リッスンできないだけ Cloud Loggingを見にいくと原因がしっかり出力されている

More Decks by Taisei Ito

Other Decks in Technology