You should have a basic understanding of the Apache OpenWhisk programming model. If not, try the action, trigger, and rule demo first.
Also, you'll need an IBM Cloud account and the latest OpenWhisk command line tool (wsk
) installed and on your PATH.
As an alternative to this end-to-end example, you might also consider the more basic "building block" version of this sample.
- Provision dependency service
- Create Cloud Functions and mappings
- Delete actions and mappings
- Recreate deployment manually
Log into the IBM Cloud and provision a Service instance.
Copy template.local.env
to a new file named local.env
and update the SERVICE_HOSTNAME
, SERVICE_USERNAME
, SERVICE_PASSWORD
and SERVICE_DATABASE
for your MySQL instance.
Or use the built in service credential injection...
deploy.sh
is a convenience script reads the environment variables from local.env
and creates the Cloud Functions and API mappings on your behalf. Later you will run these commands yourself.
./deploy.sh --install
Note: If you see any error messages, refer to the Troubleshooting section below. You can also explore Alternative deployment methods.
Use deploy.sh
again to tear down the OpenWhisk actions and mappings. You will recreate them step-by-step in the next section.
./deploy.sh --uninstall
This section provides a deeper look into what the deploy.sh
script executes so that you understand how to work with OpenWhisk triggers, actions, rules, and packages in more detail.
Lorem ipsum.
lorem ipsum
Lorem ipsum.
lorem ipsum
Check for errors first in the OpenWhisk activation log. Tail the log on the command line with wsk activation poll
or drill into details visually with the monitoring console on the IBM Cloud.
If the error is not immediately obvious, make sure you have the latest version of the wsk
CLI installed. If it's older than a few weeks, download an update.
wsk property get --cliversion