OpenWhisk is a Function-as-a-Service (FaaS) platform that allows the execution of code in a serverless and scalable environment. One of the usecases of the OpenWhisk platform is in the developing and running of serverless Mobile backend code. Learn more about OpenWhisk platform on Bluemix here.
Mobile Foundation adapters are used perform any necessary server-side logic, and to transfer and retrieve information from back-end systems to client applications and cloud services. Mobile Foundation now provides an adapter for OpenWhisk functions.
IBM Mobile Foundation starting with iFix 126.96.36.199-MFPF-IF20170710-1834 provides an OpenWhisk adapter. This adapter is available to be downloaded and deployed from the Download Center in the Mobile Foundation Console.
After you download and deploy the adapter, you should configure it to connect to OpenWhisk.
Configure adapter to connect to OpenWhisk
To configure the adapter to connect to OpenWhisk, go to the Adapter Configuration page and provide the username and password from the authorization key of OpenWhisk. The username and password for OpenWhisk can be obtained by running the following OpenWhisk CLI command:
./wsk property get --auth KEY
The above command returns the authorization key separated by a colon, to the left of the colon is the username and to the right of the colon is the password.
The username and password obtained as above should be provided in the OpenWhisk adapter configuration page, and the configuration should be saved. The client apps can now call the adapter API to invoke the OpenWhisk back-end code.
To modify the OpenWhisk adapter the adapter source code can be downloaded from this Github Repo.