SlideShare a Scribd company logo
@eljuanchosf
OpenWhisk
Event-driven software design
*
WHAT WE DO
Altoros helps Global 2000 organizations digitize revenue streams by
integrating solutions offered by Predix and its partner ecosystem
NEW PRODUCT
DEVELOPMENT USING
PREDIX CATALOG AND
MICROSERVICES
ARCHITECTURE
MIGRATING
APPLICATIONS TO
PREDIX, PORTABILITY
ASSESSMENTS
PREDIX TRAINING:
FOR OPERATORS
FOR DEVELOPERS
48 HR APPS
& 90 DAY PROOF OF
CONCEPTS
Delivered by GE & GE Partners
Delivered by Altoros
Predix Service Catalog
Time Series
Machine
Asset Service
Analytics
Key value
UAA
...
Service N
...
Service from partner N...
*
Buenos
Aires
Oslo
London
Zurich
Sunnyvale, CA
Copenhagen
Minsk
Santa Fe
Boston
30%Female
70%Male
+5Join us on an
average month
Full Time Enablers
DevOps
Software Engineers
256+
FACTS ON ALTOROS
@renatco
Customers
We highly
recommend
Altoros to rapidly build complex applications using
cutting edge technologies. Again, great job!
Christopher Adorna, Sony Design Center,
“
NEW PRODUCT
DEVELOPMENT USING
PREDIX CATALOG AND
MICROSERVICES
ARCHITECTURE
MIGRATING
APPLICATIONS TO
PREDIX, PORTABILITY
ASSESSMENTS
PREDIX TRAINING:
FOR OPERATORS
FOR DEVELOPERS
48 HR APPS
& 90 DAY PROOF OF
CONCEPTS
@renatco
* Altoros is Gold sponsor of Cloud Foundry Summits since 2014
6
Juan Pablo Genovese (JPG – No pun intended)
19+ years in IT
Mostly software development
… but lots of DevOps too.
Specialized in HA & HP
Love to tango, play blues guitar & sing
S/390 to large Cloud Computing deployments
@eljuanchosf
It’sgoingtobeLEGEND…(waitforit!)
@eljuanchosf
Everybodyreactstosomething
@eljuanchosf
…so,whatisareaction?
Merriam Webster defines it as:
The way someone acts or feels in response to something that
happens, is said, etc.
reactions: the ability to act and move quickly in order to
avoid sudden danger
@eljuanchosf
Reactionsarenatural
@eljuanchosf
Reactions…towhat??
E V E N T S
@eljuanchosf
Oldisnew
An event-driven architecture (EDA) is a framework that orchestrates behavior around the
production, detection and consumption of events as well as the responses they evoke. An event is
any identifiable occurrence that has significance for system hardware or software.
SOA
REST
Microservices
CORBA - 1991!
RPC
@eljuanchosf
Backtothefuture?
-da
@eljuanchosf
Atleast!!
(OpenWhisk)
@eljuanchosf
Yeah.thisdrawing,again
@eljuanchosf
Why?
• Open Source ->https://github.com/openwhisk/openwhisk
• Easy to understand
• Integration with many of Bluemix’s services
• Swift and Javascript support
• Run Docker containers!
• Download it and run it yourself. :)
@eljuanchosf
Concepts
Triggers
A named channel for a class of events.
Fired by using a list of k,v pairs. -> EVENT!
Can be explicitly fired by a user or by an external event source.
Rules:
Associates one trigger with one action
Actions:
Stateless code snippets that run inside OpenWhisk
Can be invoked or respond to an event
Actions can call more actions, setting chains of actions
@eljuanchosf
Concepts/2
Feeds
A external event source that fires a trigger
Packages
A bundle of actions and feeds
Can be used together with other actions and packages
Can be explicitly fired by a user or by an external event source.
Polling:
$ wsk activation poll
@eljuanchosf
Runningitlocally
git clone https://github.com/openwhisk/openwhisk.git
# Change the ansible version:
sed -i -- 's/ansible=2.0.1.0-1ppa~trusty/ansible/g' openwhisk/tools/ubuntu-setup/ansible.sh
# Install docker GPG
curl -fsSL https://get.docker.com/gpg | sudo apt-key add -
# Add your username to the docker group
sudo usermod -aG docker your_username
# Install all required software
(cd openwhisk/tools/ubuntu-setup && source all.sh)
@eljuanchosf
InstallCouchDB
# Add repos
sudo add-apt-repository ppa:couchdb/stable -y
sudo apt-get update
sudo apt-get install couchdb -y
# Create an admin user
curl -X PUT http://localhost:5984/_config/admins/lagavulin -d '"singlemalt"'
curl -X GET http://lagavulin:singlemalt@localhost:5984/_config
# Configure the database
cp template-couchdb-local.env couchdb-local.env
Vim couchdb-local.env
# Initialize the database
tools/db/createImmortalDBs.sh
@eljuanchosf
Deploy!
$ ant build
$ ant deploy
$ ant run
… there you go!!
@eljuanchosf
Basicusage
$ echo away.js > ‘function main() { return { payload: "I just went out for lunch. Be back in a century or so." }; }’
$ wsk action update away away.js
$ wsk action invoke --blocking away
# => ok: invoked away with id abfcdb37efe94b1a8f1807e76385027d
# => response:
# => {
# => "result": {
# => "payload": "I just went out for lunch. Be back in a century or so."
# => },
# => "status": "success",
# => "success": true
# => }
@eljuanchosf
Asynccalling
$ wsk action invoke away
# => ok: invoked away with id 6cf984e1fbb74f69a54f07eec508f5e3
$ wsk activation result 6cf984e1fbb74f69a54f07eec508f5e3
# => {
# => "payload": "I just went out for lunch. Be back in a century or so."
# => }
@eljuanchosf
Parameters
function main(params) {
var name = params.name || "dude";
return {
payload: "Hey, " + name + " please, I’m having lunch! DON’T BOTHER ME!"
};
}
@eljuanchosf
Yessss…Itsupports docker.
$ wsk action create --docker trying-docker hi-from-docker
# => ok: created action trying-docker
$ wsk action invoke --blocking --result trying-docker
# => error: {
# => …
# => "logs": [
# => "2016-03-05T13:48:39.220147731Z stdout: ",
# => "2016-03-05T13:48:39.220213883Z stdout: Hi from Docker.",
# => "2016-03-05T13:48:39.220227211Z stdout: Awesome. Responses from Docker containers!",
# => …
# => ],
# => …
# => "response": {
# => "result": {
# => "error": "the action did not produce a valid JSON response"
# => },
# => "status": "action developer error",
# => "success": false
# => },
# => …
# => }
@eljuanchosf
…DARY!!
@eljuanchosf
2727
Questions?
@eljuanchosf
Thankyou!

More Related Content

PPTX
Where is my scalable API?
PPTX
Where is my scalable api?
PPTX
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
PPTX
London Community Summit - Habitat 2016
PDF
Nike pop up habitat
PPTX
London Community Summit 2016 - Fresh New Chef Stuff
PDF
Ansible Introduction
PDF
GitOps meets Serverless
Where is my scalable API?
Where is my scalable api?
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
London Community Summit - Habitat 2016
Nike pop up habitat
London Community Summit 2016 - Fresh New Chef Stuff
Ansible Introduction
GitOps meets Serverless

What's hot (20)

PDF
Leveraging Ansible for CI/CD
PDF
OpenFaaS 2019 Project Update
PDF
Chef Automate Workflow Demo
PDF
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
PDF
Ansible @ Red Hat | December 2015 Ansible Meetup in Melbourne
PDF
Continuous Updating with VersionEye at code.talks 2014
PDF
Zero to Serverless - OpenFaaS at the Open Source Summit
PDF
Docker Cambridge: Serverless Functions Made Simple with OpenFaaS
PDF
Enabling Microservices @Orbitz - DockerCon 2015
PDF
Dev ops with smell v1.2
PDF
Rundeck's History and Future
PDF
Learning chef
PPTX
London Community Summit - Chef at SkyBet
PDF
Using SaltStack to DevOps the enterprise
PDF
Performance Testing using Real Browsers with JMeter & Webdriver
PDF
Observability
PDF
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
PDF
Ansible introduction - XX Betabeers Galicia
PDF
Game of Codes: the Battle for CI
PDF
Code Reviews vs. Pull Requests
Leveraging Ansible for CI/CD
OpenFaaS 2019 Project Update
Chef Automate Workflow Demo
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
Ansible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Continuous Updating with VersionEye at code.talks 2014
Zero to Serverless - OpenFaaS at the Open Source Summit
Docker Cambridge: Serverless Functions Made Simple with OpenFaaS
Enabling Microservices @Orbitz - DockerCon 2015
Dev ops with smell v1.2
Rundeck's History and Future
Learning chef
London Community Summit - Chef at SkyBet
Using SaltStack to DevOps the enterprise
Performance Testing using Real Browsers with JMeter & Webdriver
Observability
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
Ansible introduction - XX Betabeers Galicia
Game of Codes: the Battle for CI
Code Reviews vs. Pull Requests
Ad

Similar to OpenWhisk (20)

PPTX
OpenWhisk: Event-driven Design
PPT
OpenWhisk Introduction
PDF
Openwhisk - Colorado Meetups
PPT
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
PPT
IBM Bluemix Openwhisk
PDF
ContainerDays NYC 2016: "OpenWhisk: A Serverless Computing Platform" (Rodric ...
PDF
OpenWhisk Deep Dive: the action container model
PDF
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
PDF
Serverless apps with OpenWhisk
PPTX
Serverless Apps with Open Whisk
PDF
OpenWhisk - Serverless Architecture
PPTX
IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...
PDF
Serverless Java on Kubernetes
PPTX
Going Serverless with OpenWhisk
ODP
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
ODP
Building serverless application on the Apache Openwhisk platform
PPTX
Your journey into the serverless world
PDF
Paasta: Application Delivery at Yelp
PDF
OpenWhisk - A platform for cloud native, serverless, event driven apps
PDF
Your Java Journey into the Serverless World
OpenWhisk: Event-driven Design
OpenWhisk Introduction
Openwhisk - Colorado Meetups
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
IBM Bluemix Openwhisk
ContainerDays NYC 2016: "OpenWhisk: A Serverless Computing Platform" (Rodric ...
OpenWhisk Deep Dive: the action container model
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
Serverless apps with OpenWhisk
Serverless Apps with Open Whisk
OpenWhisk - Serverless Architecture
IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...
Serverless Java on Kubernetes
Going Serverless with OpenWhisk
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
Building serverless application on the Apache Openwhisk platform
Your journey into the serverless world
Paasta: Application Delivery at Yelp
OpenWhisk - A platform for cloud native, serverless, event driven apps
Your Java Journey into the Serverless World
Ad

OpenWhisk