Apache OpenWhisk 101 - A Cloud-Native, Open Source

The open source Apache OpenWhisk project (supported by IBM, Adobe, Red Hat, and others) provides a scalable and polyglot serverless platform for deploying cloud-native applications driven by data, message, and REST API call events. At this talk, you'll find out why serverless architectures are attractive for many emerging cloud workloads and when to consider OpenWhisk in particular for your next web, mobile, IoT, bot, or analytics project. You'll understand the architecture, installation, programming model, community status of OpenWhisk. You will also see how the resiliency and container lifecycle models compare against Platform-as-a-Service (Cloud Foundry) and container orchestration (Kubernetes) environments. Demos at this session include integration with public cloud services based on A
展开查看详情

1.Apache OpenWhisk 101 A Cloud-Native, Open Source, Serverless Platform Incubating at the ASF Ying Chun Guo guoyingc@cn.ibm.com WeChat ID: daisy-ycguo

2.Agenda •  What is serverless computing ? •  What is Apache OpenWhisk ? •  Apache OpenWhisk programming model •  Apache OpenWhisk community

3.What is serverless computing?

4.Serverless developers focus more on code, less on infrastructure

5.What is serverless computing? Functions as a Service Serverless= Backend as a Service •  Functions-as-a-Service (FaaS) –  Small units of code are executed as needed as discrete actions, scaling without the need to manage servers or any other underlying infrastructure. –  Event-driven computing. Functions that are triggered by events or HTTP requests. •  Backend-as-a-Service (BaaS) –  third-party API-based services replace core subsets of functionality in an application –  Those APIs are provided as a service that auto-scales and operates transparently

6.Benefits of serverless •  Zero server ops –  No provisioning, updating, and managing server infrastructure. –  Flexible Scalability •  No compute cost when idle

7.Emerging workloads are a good fit for event-driven programming •  Execute logic in response to database change •  Perform analytics on sensor input messages •  Provide cognitive computing via chatbots •  Schedule tasks performed for a short time •  Invoke autoscaled APIs and mobile backends

8.What is Apache OpenWhisk ?

9.Apache OpenWhisk is … A serverless, open source cloud platform that executes functions in response to events at any scale. Apache OpenWhisk offers: •  Apache Software Foundation (ASF) •  True, community-driven open source (Apache 2 License) •  Proven on IBM Cloud •  Exact, same code in open source

10.Developers work with triggers, actions, rules, and packages

11. Built on solid open source foundations Apache Incubator!

12. Has many deployment options Local Development Windows OpenWhisk Serverless Platform All component services are built into Docker containers Distributed docker compose

13.Proven by IBM Cloud Functions https://console.bluemix.net/openwhisk/

14.Apache OpenWhisk programming model

15.Event driven programming model

16.Action A Action : A stateless, relatively short-running function invoked as an event handler. Stateless Function Input Output JSON Object A JSON Object Goal: An Action’s run time is measured in milliseconds, … well under the defaulted maximum of 5 minutes

17.Trigger

18.Rule

19.Package

20. Event-Trigger-Rule-Action Processing OpenWhisk Platform Sample Packages Trigge External Events Actions & Action Sequences Event rs / Service sources Package Rules Eco-System Feed Action NodeJS Rule Data Stores 3rd Party or Package Self-Enabled Feed Action 1 Action 2 Action 3 NodeJS Python Swift −  REST APIs Rule −  Message Queues Social Media −  Events −  Feeds Package Feed Action 1 Action 2 Swift Docker Rule Instrumented Machines P T A F R

21.Demo1: Your first action, trigger and rule https://github.com/IBM/ibm-cloud-functions-action-trigger-rule

22.Demo2: Database change triggered action https://github.com/IBM/ibm-cloud-functions-cloudant-trigger

23.Demo3: HTTP API request triggered action https://github.com/IBM/ibm-cloud-functions-rest-api-trigger

24.Apache OpenWhisk community

25.The Apache OpenWhisk community is growing

26.Apache OpenWhisk ecosystem Tooling CLI API Gateway (”wsk”) wskdeploy OpenWhisk “Core” Packages Application Command Line Interface (deployer + spec.) “Samples” debugger Message Router Controller Bus Invokers Alarms slackbot devtools (Compose, Kube) Kafka slackinvite Key-Value Document Store Store Cloudant GitHubSlackB playground ot (XCode Extension) Ansible Push Deployments Notifications matos xcode (x3) JIRA vscode OpenWhisk “Catalog” RSS Workshop, “Template” External Resources Tutorial openwhisk.github.io (openwhisk.org)

27. OpenWhisk Project Vital Statistics •  GitHub (”Core” Repo.) –  Stars •  3285: https://github.com/apache/incubator-openwhisk/stargazers •  and growing ~10-20 per week on average –  Stats •  626 forks https://github.com/apache/incubator-openwhisk/network •  Contribution Graphs: https://github.com/apache/incubator-openwhisk/graphs/contributors •  120+ Contributors (all repos.) –  Working on the first release 0.9 in Apache

28. Get started github.com/apache? Delivered as
 q=openwhisk Open source via Apache openwhisk.org slack.openwhisk.org Managed OpenWhisk with twitter.com/openwhisk IBM Cloud Functions medium.com/openwhisk console.bluemix.net/openwhisk/ dev@openwhisk.incubator. apache.org

29.