Difficulty: beginner
Estimated Time: 5 minutes

Apache OpenWhisk on OpenShift

In this scenario we will see how to deploy Apache OpenWhisk to the OpenShift Container Platform. The scenario also helps to learn in setting up the OpenWhisk CLI to work with Apache OpenWhisk. Finally we will write a simple Javascript function, deploy it on to Apache OpenWhisk to verify our validation.

Additional Resources


We have now learnt:

  • How to setup Apache OpenWhisk on OpenShift ?
  • Write a simple JavaScript function
  • Deploy the function to Apache OpenWhisk
  • Invoke the function and see the results

Please take sometime to play with other related scenarios that are available to get yourself familiarized with various serverless concepts on Apache OpenWhisk. Good Luck!

Additional Resources

Getting Started with OpenWhisk on OpenShift

Step 1 of 3

Step 1


OpenShift Container Platform

Red Hat OpenShift Container Platform is based on Kubernetes which is probably the most used Orchestrator for containers running in production. OpenShift is currently the only container platform based on Kuberenetes that offers multitenancy. This means that developers can have their own personal, isolated projects to test and verify application before committing to a shared code repository.

Apache OpenWhisk(Incubating)

Apache OpenWhisk(Incubating) is a serverless, open source cloud platform that executes functions in response to events in any scale.

2. Create project

Let's create a project that you will use to house the Apache OpenWhisk.

oc new-project faas --display-name="FaaS- Apache OpenWhisk"

3. Add developer as admin to faas project

Since we will be using the user called developer throught this scenario it will be ideal to add admin role to the user developer to peform required tasks without switching user.

oc adm policy add-role-to-user admin developer -n faas

4. Open the OpenShift Web Console

OpenShift ships with a web-based console that will allow users to perform various tasks via a browser. To get a feel for how the web console works, click on the "OpenShift Console" tab next to the "Local Web Browser" tab.

OpenShift Console Tab

The first screen you will see is the authentication screen. Enter your username and password and then login, the default credentials is developer/developer:

Web Console Login

After you have authenticated to the web console, you will be presented with a list of projects that your user has permission to view.

Web Console Projects

Click on your new project name to be taken to the project overview page which will list all of the routes, services, deployments, and pods that you have created as part of your project.


You have now prepared OpenShift environment for deploying ApacheOpenWhisk.

In next step of this scenario, we will deploy Apache OpenWhisk to the OpenShift Container Platform.

Local Web Browser
OpenShift Console