-
A library which wraps functions as OpenWhisk services (based on dockerSkeleton).
-
An example using split docker images:
- Build phase: based on
haskell:7.10.3
image - Deploy phase: uses
haskell-scratch
image
- Build phase: based on
-
Write the logic of your service, which should be a function with type
Value -> IO (Maybe Value)
myService :: Value -> IO (Maybe Value) -- consumes and produces JSON objects myService = pure . Right . id -- service logic, e.g. this echoes input data
-
Wrap your service with
openwhiskWrapper
function (seeNetwork.OpenWhisk
module)main :: IO () main = openwhiskWrapper myService
-
Create docker image (see
Dockerfile
andmake-image.sh
script) -
Upload the image to docker hub
-
Use
wsk
utility in order to instantiate an action with your image.wsk action update --docker action-name docker-hub-user/docker-hub-image