©2018 VMware, Inc.
Serverless Framework
“Dispatch” の紹介
Sep. 29, 2018
CTO, North Asica (Japan, Korea and Greater China)
Motonori Shindo
2©2018 VMware, Inc.
抽象化の流れ
コンテナ
仮想マシン
ベアメタル
ファンクション
<Fn>
<Fn>
<Fn>
<Fn>
<Fn>
<Fn>
<Fn>
<Fn>
<Fn>
<Fn>
抽
象
化
の
粒
度
インフラからの独立度
IaaS
FaaS
CaaS
Hosting
サーバーレス
3©2018 VMware, Inc. 出典: https://www.compassdatacenters.com/blog/the-empty-data-center/
4©2018 VMware, Inc.
サーバーレス?
「サーバーレス」といってもサーバー自体がなくなるわけではない
サーバーレスな世界では、サーバーの設計や運用が必要なくなる
FaaS(Function As A Service)として実現される事が多い
• 必要となるロジックだけを Function として実行
– 短時間で終わる必要がある
• 通常、コンテナがベースとして使われる。コンテナの管理はユーザはできない。
– コールドスタートを意識する必要がある
5©2018 VMware, Inc.
FaaS の特徴
インフラを意識
しないで良い
スケールアッ
プ・ダウンしや
すい
コストモデル
(使わなければ
ゼロ)
イベントドリブ
ン
ビジネスロジッ
クに集中できる
6©2018 VMware, Inc.
HTTP / HTTPS を使って明示的に Function を
呼び出す
何かしらのイベントに subscribe しておき、イ
ベントの発生に伴い非同期的に Function が
Call される
同期的 Call 非同期的 Call
Function の呼ばれ方(イベントソース)
Function
HTTP / HTTPS
Function
subscribe
Event
s
7©2018 VMware, Inc.
ファイル変換(イメージのリサイズ、など)
モニタリング
ログ監査
通知
定期的ジョブ
静的 Web サイト
IoT
などなど
典型的ユースケース
8©2018 VMware, Inc.
2014年11月リリース
Node.js, Python, Java, .NET
Core, Go
豊富なデータソース
2016年2月プレビュー
Node.js, python
Cloud Storage, Cloud Pub/Sub
Firebase連携
2016年3月発表
Python, Java, C#, JavaScript, F#,
PHP, Batch, Bash, PowerShell
BLOB Storage, Cosmos DB,
Timer, Webhook, github, Queue
Storage
代表的な FaaS プラットフォーム
AWS Lambda Google Cloud Functions Azure Functions
9©2018 VMware, Inc.
CNCF Serverless Cloud Native Landscape
引用元:https://github.com/cncf/landscape/blob/master/serverless/CloudNativeLandscape_Serverless_latest.png
10©2018 VMware, Inc.
VMware がリードするオープンソース・プロジェクト
FaaS の「フレームワーク」を提供
• FaaS エンジンには OpenFaaS, riff を利用可能
HTTP(S) に加え vCenter のイベントドライバを持つ
• その他、Azure EventGrid や AWS Event 用のイベントドライバもあり
Dispatch
11©2018 VMware, Inc.
Dispatch 概要
Enterprise Functions Stack
FaaS
Cloud events native
Integrate almost any IDP
Production-ready API-gateway
Integrate services via
Open Service Broker API
12©2018 VMware, Inc.
Kubernetes 上にデプロイ
• PKS, VKE, GKE, EKS, etc.
複数の FaaS をサポート
• OpenFaaS, Riff, Kubeless
幅広い言語のサポート
• Python3, Nodejs, Java, Powershell
Kong による API Gateway 機能
• Full HTTP context available to functions
Let‘s Encrypt サポート
OpenTracing 対応
Dispatch の機能
エンタープライズでの利用を想定
複数の IDP をサポート
• Google, Auth0, vIDM, GitHub
「組織」に基づいたマルチてナンシー
ユーザごとの RBAC ポリシー
CloudEvents 対応
拡張可能なイベントドライバ
• vCenter, AWS, Azure
Open Service Broker 統合
13©2018 VMware, Inc.
Dispatch アーキテクチャ
Customers
Administrators
Developers
External
Events
Inbound data
Dispatch component
Dispatch dependency
Image
Registry
(Harbor)
Postgres
IDP/AD
Kubernetes
Control Plane
Event Bus
API Gateway (KONG)IAM
FaaS (OpenFaaS) FaaS (RiFF) Service Catalog External
Services
Secrets
15©2018 VMware, Inc.
Demo
16©2018 VMware, Inc.
1. Web アプリケーションのバックエンドを Dispatch で実装する(同期呼び出し)
2. vCenter Server からのイベント駆動で、Dispatch の Function を呼び出す(非同期呼び出
し)
デモシナリオ
17©2018 VMware, Inc.
Google Cloud Next 2018 で発表されたサーバレスワークロードをデ
プロイ、管理をするためのプラットフォーム
Google, Pivotal, RedHat, IBM らが協力
Knative
18©2018 VMware, Inc.
Knative の構成と機能
引用元: https://github.com/knative/docs/
• Build
• ソースからコンテナの構築のオー
ケストレーション
• Serving
• ゼロにまでスケーリングできるリ
クエスト駆動な計算資源の提供
• Events
• イベントへの管理とデリバリ
19©2018 VMware, Inc.
Dipsatch の有用性を維持したまま Knative が利用できるところは利用する
• IAM とマルチテナンシー
• User / Developer API は維持
• API Gateway は Istio ベースに
結果として、よりスリムな Dispatch を目指す!
• Not Re-Inventing the Whole Wheel
• 外部依存コンポーネントを少なくし、より Dispatch 固有な部分に注力
Dispatch と Knative の統合
20©2018 VMware, Inc.
Dispatch アーキテクチャ(現時点)
Customers
Administrators
Developers
External
Events
Inbound data
Dispatch component
Dispatch dependency
Image
Registry
(Harbor)
Postgres
IDP/AD
Kubernetes (PKS)
Control Plane
Event Bus
API Gateway (KONG)IAM
FaaS (OpenFaaS) FaaS (RiFF) Service Catalog External
Services
Secrets
21©2018 VMware, Inc.
Dispatch アーキテクチャ(将来)
Customers
Administrators
Developers
External
Events
Inbound data
Dispatch component
Knative component
Image
Registry
(Harbor)
IDP/AD
Kubernetes (PKS)
Knative Eventing
API Gateway (Istio)IAM
Knative Serving Service Catalog
External OSB
Services
Dispatch API
Dispatch Operators
Knative Building
Dispatch dependency
22©2018 VMware, Inc.
• エンタープライズ志向の
FaaS フレームワーク
• Kubernetes 上に構築
• マルチクラウド上で複数
のサービスを統合
• CloudEvents 対応
• オープンソース
• 開発者と運用者にシンプ
ルな機能を提供
• コミュニティからの支持
とサポート(100人以上
のコントリビュータ)
• Kubernetes 向けの FaaS
としては最も多くの
“Star” を獲得
• オープンソース
• AWS とのパートナー
シップ
• AWS Greengrass と IoT
を vSphere 上で実行
• Greengrass コードを含
んだ OVA を提供
• ユーザにとって簡単な導
入と設定を提供
VMware が推進している FaaS/サーバレス関連の取り組み
マルチクラウド環境で一貫性のあるツールを提供
Dispatch OpenFaaS
AWS Greengrass on
vSphere
23©2018 VMware, Inc.
・公式ページ
https://vmware.github.io/dispatch/
・本体ソースコード
https://github.com/vmware/dispatch
・サンプルやエコシステム系などのコード
https://github.com/dispatchframework
・コミュニティー
Slack: vmwarecode.slack.com, #dispatch
Twitter: @DispatchFW
参考リンク
©2018 VMware, Inc.

Serverless Framework "Disptach" の紹介

  • 1.
    ©2018 VMware, Inc. ServerlessFramework “Dispatch” の紹介 Sep. 29, 2018 CTO, North Asica (Japan, Korea and Greater China) Motonori Shindo
  • 2.
  • 3.
    3©2018 VMware, Inc.出典: https://www.compassdatacenters.com/blog/the-empty-data-center/
  • 4.
    4©2018 VMware, Inc. サーバーレス? 「サーバーレス」といってもサーバー自体がなくなるわけではない サーバーレスな世界では、サーバーの設計や運用が必要なくなる FaaS(FunctionAs A Service)として実現される事が多い • 必要となるロジックだけを Function として実行 – 短時間で終わる必要がある • 通常、コンテナがベースとして使われる。コンテナの管理はユーザはできない。 – コールドスタートを意識する必要がある
  • 5.
    5©2018 VMware, Inc. FaaSの特徴 インフラを意識 しないで良い スケールアッ プ・ダウンしや すい コストモデル (使わなければ ゼロ) イベントドリブ ン ビジネスロジッ クに集中できる
  • 6.
    6©2018 VMware, Inc. HTTP/ HTTPS を使って明示的に Function を 呼び出す 何かしらのイベントに subscribe しておき、イ ベントの発生に伴い非同期的に Function が Call される 同期的 Call 非同期的 Call Function の呼ばれ方(イベントソース) Function HTTP / HTTPS Function subscribe Event s
  • 7.
  • 8.
    8©2018 VMware, Inc. 2014年11月リリース Node.js,Python, Java, .NET Core, Go 豊富なデータソース 2016年2月プレビュー Node.js, python Cloud Storage, Cloud Pub/Sub Firebase連携 2016年3月発表 Python, Java, C#, JavaScript, F#, PHP, Batch, Bash, PowerShell BLOB Storage, Cosmos DB, Timer, Webhook, github, Queue Storage 代表的な FaaS プラットフォーム AWS Lambda Google Cloud Functions Azure Functions
  • 9.
    9©2018 VMware, Inc. CNCFServerless Cloud Native Landscape 引用元:https://github.com/cncf/landscape/blob/master/serverless/CloudNativeLandscape_Serverless_latest.png
  • 10.
    10©2018 VMware, Inc. VMwareがリードするオープンソース・プロジェクト FaaS の「フレームワーク」を提供 • FaaS エンジンには OpenFaaS, riff を利用可能 HTTP(S) に加え vCenter のイベントドライバを持つ • その他、Azure EventGrid や AWS Event 用のイベントドライバもあり Dispatch
  • 11.
    11©2018 VMware, Inc. Dispatch概要 Enterprise Functions Stack FaaS Cloud events native Integrate almost any IDP Production-ready API-gateway Integrate services via Open Service Broker API
  • 12.
    12©2018 VMware, Inc. Kubernetes上にデプロイ • PKS, VKE, GKE, EKS, etc. 複数の FaaS をサポート • OpenFaaS, Riff, Kubeless 幅広い言語のサポート • Python3, Nodejs, Java, Powershell Kong による API Gateway 機能 • Full HTTP context available to functions Let‘s Encrypt サポート OpenTracing 対応 Dispatch の機能 エンタープライズでの利用を想定 複数の IDP をサポート • Google, Auth0, vIDM, GitHub 「組織」に基づいたマルチてナンシー ユーザごとの RBAC ポリシー CloudEvents 対応 拡張可能なイベントドライバ • vCenter, AWS, Azure Open Service Broker 統合
  • 13.
    13©2018 VMware, Inc. Dispatchアーキテクチャ Customers Administrators Developers External Events Inbound data Dispatch component Dispatch dependency Image Registry (Harbor) Postgres IDP/AD Kubernetes Control Plane Event Bus API Gateway (KONG)IAM FaaS (OpenFaaS) FaaS (RiFF) Service Catalog External Services Secrets
  • 14.
  • 15.
    16©2018 VMware, Inc. 1.Web アプリケーションのバックエンドを Dispatch で実装する(同期呼び出し) 2. vCenter Server からのイベント駆動で、Dispatch の Function を呼び出す(非同期呼び出 し) デモシナリオ
  • 16.
    17©2018 VMware, Inc. GoogleCloud Next 2018 で発表されたサーバレスワークロードをデ プロイ、管理をするためのプラットフォーム Google, Pivotal, RedHat, IBM らが協力 Knative
  • 17.
    18©2018 VMware, Inc. Knativeの構成と機能 引用元: https://github.com/knative/docs/ • Build • ソースからコンテナの構築のオー ケストレーション • Serving • ゼロにまでスケーリングできるリ クエスト駆動な計算資源の提供 • Events • イベントへの管理とデリバリ
  • 18.
    19©2018 VMware, Inc. Dipsatchの有用性を維持したまま Knative が利用できるところは利用する • IAM とマルチテナンシー • User / Developer API は維持 • API Gateway は Istio ベースに 結果として、よりスリムな Dispatch を目指す! • Not Re-Inventing the Whole Wheel • 外部依存コンポーネントを少なくし、より Dispatch 固有な部分に注力 Dispatch と Knative の統合
  • 19.
    20©2018 VMware, Inc. Dispatchアーキテクチャ(現時点) Customers Administrators Developers External Events Inbound data Dispatch component Dispatch dependency Image Registry (Harbor) Postgres IDP/AD Kubernetes (PKS) Control Plane Event Bus API Gateway (KONG)IAM FaaS (OpenFaaS) FaaS (RiFF) Service Catalog External Services Secrets
  • 20.
    21©2018 VMware, Inc. Dispatchアーキテクチャ(将来) Customers Administrators Developers External Events Inbound data Dispatch component Knative component Image Registry (Harbor) IDP/AD Kubernetes (PKS) Knative Eventing API Gateway (Istio)IAM Knative Serving Service Catalog External OSB Services Dispatch API Dispatch Operators Knative Building Dispatch dependency
  • 21.
    22©2018 VMware, Inc. •エンタープライズ志向の FaaS フレームワーク • Kubernetes 上に構築 • マルチクラウド上で複数 のサービスを統合 • CloudEvents 対応 • オープンソース • 開発者と運用者にシンプ ルな機能を提供 • コミュニティからの支持 とサポート(100人以上 のコントリビュータ) • Kubernetes 向けの FaaS としては最も多くの “Star” を獲得 • オープンソース • AWS とのパートナー シップ • AWS Greengrass と IoT を vSphere 上で実行 • Greengrass コードを含 んだ OVA を提供 • ユーザにとって簡単な導 入と設定を提供 VMware が推進している FaaS/サーバレス関連の取り組み マルチクラウド環境で一貫性のあるツールを提供 Dispatch OpenFaaS AWS Greengrass on vSphere
  • 22.
  • 23.