Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Serverless with OpenStack 101

Serverless with OpenStack 101

at OpenStack Days Tokyo 2018 / Cloud Native Days Tokyo 2018;
in "ops WorkShop" session.

How to provide serverless with OpenStack?

Avatar for Naoto Gohko

Naoto Gohko

August 02, 2018
Tweet

More Decks by Naoto Gohko

Other Decks in Technology

Transcript

  1. LT presenter(It’s me) • Naoto Gohko / 郷古 直仁 (@naoto_gohko)

    • Cloud Service development divistion, GMO Internet Inc., • 最近の活動主体 • Japan OpenStack user会 • その他参加勉強会など • Rancher JP, PaaS, Serverless, SDNなど @MikumoConoHa
  2. ServerlessとFaaS(自分の捉え方) FaaS(Function as a service) • コードのみの実行できる(Function), サービスではない(not Services) -

    “down when done” • Event driven programming model • Scale – “infinite”, transparent for dev, handled by Platform/Framework • Pay-per use consumption model API gateway BaaS(Backend as a service) • 認証、メッセージング、AI、chat DataStore service • noSQL(CRUD datastore), Object Storage(S3, Swift) Workflows
  3. 短期間でサービスアプリケーションを作 る新人研修の合宿開発 • IaaS (ConoHa) + PHP, Fask, Node-RED, etc.

    • Serverless開発を選択したチーム • Frameworkを使ってアイデア開発に注力できる • Input / Outputがはっきりしているので開発効率がよい (AWS Lambda)
  4. Serverlessが必要な現場 (use case) • Data Processing • Services for web

    and mobile apps • Ex) SPA (Single Page Application) (Vm instanceを全く使わない開発、webIDEのみでの開発) • Other workflow/automation • DevOps automation ( ex; github build flow ) • IoT, Alexa, ChatBot • IFTTT, slack • Etc.
  5. AWS, Azure, Google, IBM =[bind]=豊富な内部サービスとbind 豊富な内部サービス(Cognitive) • AI • Bot

    • messaging • Workflow • DB • CloudWatch • storage • Bigdata これらを活用して、[bind]するのが、serverless/FaaSとなる
  6. OpenStack(public/private)でどうするのか 1) OpenStackのコンポーネントのServerless化、Serverless サービスの利用 • Swift  Storlets, s3select化 •

    Trove  noSQLでかつCRUD(restful)アクセスできるDBの投入 • FaaS  Qiling 2) 外部サービスの積極的活用とServerlessでの[bind] • EX)次ページ参照 3) Kubernetes on OpenStack上へのServerlessアプリケーショ ンの追加 • OpenFaaS, Kongなど
  7. OpenStack FaaS projects #1 2016/12 • OpenStack Picasso (IronFunctions runtime)

    https://launchpad.net/picasso • Github: https://github.com/openstack/picasso “openstack fn” コマンドで統合的に利用できた Telemetry, Swift Object Storageでの利用しか開発側が当時想定 しない (もったいない)  残念な展開に
  8. Iron.io (to Oracle), Fn Project • Iron.ioはOracleへ • オープンソース志向の開発者たち 

    Fn Project はじめました (http://fnproject.io/) https://medium.com/@hhiroshell/fn- project%E3%82%92%E4%BD%9C%E3%81%A3%E3%81%9F8%E3%81%A4%E3%81%AE% E7%90%86%E7%94%B1-f4e20ef73b15 Fn Project (runtime; Kubernetes, Docker Swarm, Mesosphere) • Fn Server • Fn Load Balancer • Fn FDK’s • Fn Flow Fn Project は Oracle cloud でのサービス化へ https://www.slideshare.net/charlier-shoe/fn-project Fn Flow
  9. OpenStack FaaS projects #2 2017/November 6-8 SYDNY summit • OpenStack

    Qinling (本命) https://launchpad.net/qinling • Yourtube(demo): https://www.youtube.com/watch?v=K2SiMZllN_A • Github: https://github.com/openstack/qinling FaaS for OpenStack 1.0としてOpenStack “Rocky” でリリースされる 予定 “openstack function <hogehoge> “ としてCLI Functionは今の所 Python, nodejs のみ?らしい qinling/qinling_tempest_plugin/functions
  10. qinling docs https://docs.openstack.org/qinling/latest/ Quick start https://docs.openstack.org/qinling/latest/quick_start.html#getting -started-with-qinling Kubernetes curl –sSL

    https://raw.githubusercontent.com/openstack/qinling/master/example/kub ernetes/k8s_qinling_role.yaml | kubectl create -f -
  11. Qinling; requires Misral workflow Aodh Billin ? Swift Data Store

    Magnum Container as a service (Kubernetes)
  12. Why to service Serverless on k8s • 1) If you

    are already running k8s cluster • On Public/Private cloud • 2) Unify multiple clouds with one Serverless Framework Ex) • on Public; DigitalOcean k8s • on Private; OpenStack cloud k8s • 3) When using k8s simply as a scalable execution environment
  13. OpenStack with Opensource FaaS #1 Iron Function (ex: on kuberrnetes)

    • Functions • Functions-ui Fn Project (ex: on kubernetes) http://fnproject.io/ Fission (Platform9) (on kubernetes) https://fission.io/
  14. OpenStack with Opensource FaaS #2 Kubeless (on kuberrnetes) https://kubeless.io/ OpenWhisk

    (on kubernetes) https://openwhisk.apache.org/ Funktion (Red Hat has stopped funding this OSS project, 2017/11/29) Need to fork!!
  15. Serverless framework for FaaS #2 Kubeless (on kuberrnetes) https://kubeless.io/ custom

    resource difinitions: CRDとして実装 https://github.com/serverless/serverless-kubeless OpenWhisk (on kubernetes) https://openwhisk.apache.org/ https://github.com/serverless/serverless-openwhisk
  16. Serverless framework for FaaS #3 OpenFaaS https://www.openfaas.com/ Docs: https://docs.openfaas.com/ Github:

    https://github.com/openfaas/faas (Thanks!! @yoshidashingo) 最近の活発度は一番かもしれません
  17. Ingress (API gateway) API log and Billing API gateway •

    APIのアクセスログからfluentdなどで計測情報を取得 • API time(ms) • API access count(number of X) Kong, etc. Docker(k8s) runtime • 精密には、functionを実行するdocker(Container Runtime)の proc IDのCPU timeの測定が必要(dockerのlog ?)
  18. Private cloudの Azure Stack で App Service と Functionsの 利用

     普通にbillingサービスまである さすがだ
  19. Summary: Serverless with OpenStack 101 Qinling project (OpenStack) • RuntimeはKubernetesでscaleできる

    • Functionはpython(いまのところ) • OpenStackとの統合度合いは良さそう • Serverless Frameworkとの互換性もナシ(泣) FaaS on Kubernes on OpenStack • Runtimeだけなら、こちらから選択するのが現実的 • こちにAuth, API gateway, Billingつけるほうがよいか? • Kubeless << k8sのCRDになっているので、FaaS単体としては使いづらい?