These instructions assume you are using Minishift 1.0.1 or newer as your OpenShift installation.
You'll also need a wsk
binary in your $PATH
to interact with
OpenWhisk after it's deployed. Download the latest version for your OS
from https://github.com/apache/incubator-openwhisk-cli/releases/
First, start minishift and fix a networking bug in current releases:
minishift start
minishift ssh -- sudo ip link set docker0 promisc on
eval $(minishift oc-env)
Then, deploy OpenWhisk:
oc new-project openwhisk
oc create -f https://raw.githubusercontent.com/projectodd/incubator-openwhisk-deploy-kube/simplify-deployment-openshift/configure/openwhisk_openshift.yml
watch "oc get all"
Make sure all pods enter the Running state before moving on. If not, something is broken and start troubleshooting by looking in the logs of the failing pods.
The install-openwhisk-catalog-xxxxx
and
preload-openwhisk-runtimes-xxxxx
pods should transition from Running
to Completed as they finish installing the default OpenWhisk catalog
of packages and pulling the default OpenWhisk runtime container
images.
Then, wait until the controller recognizes the invoker as healthy:
oc logs -f $(oc get pods | grep controller | awk '{print $1}') | grep "invoker status changed"
You're looking for a message like invoker status changed to invoker0: Healthy
. Once you see that message, OpenWhisk is running and you need
to configure the client authentication to your controller:
export AUTH_SECRET=$(oc get configmap openwhisk-config -o yaml | grep 'AUTH_WHISK_SYSTEM=' | awk -F '=' '{print $2}')
export API_HOST=http://$(oc get route/controller --template={{.spec.host}})
wsk property set --auth $AUTH_SECRET --apihost $API_HOST
Finally, you're ready to test actions:
wsk list
wsk action invoke /whisk.system/utils/echo -p message hello -b
Now you can follow along with the OpenWhisk docs on creating actions.
Helllo,
i have this issue while i am deploying the project any suggestions?
Back-off pulling image "ip is here:5000/openwhiskpoc/action-nodejs-6@sha256:bd3176824ead9191cbdd4b87ab2ec594c14f9b86cf37f7bab4d254a19792ef1
Failed to pull image "ip is here:5000/openwhiskpoc/action-nodejs-6@sha256:bd3176824ead9191cbdd4b87ab2ec594c14f9b86cf37f7bab4d254a19792ef16": rpc error: code = 2 desc = error parsing HTTP 404 response body: json: cannot unmarshal number 26127387204478855749579231745064946906907528528017493594637314555907791619576171082385394356139169755107133986033749473388559359577965310236560793842159672352998188275733121329782977925539432178979272640459280859543041674529812834306640225314670576908231309421139564022006283384566200877614403769736240219800704419296356645172000983359470201919082469532030168768547885052410857206563020118476060577598701564392773871103296920341043357522881165179972992633580357026796423084574537495002909781564206812286457301786760873597074845531321156438191111716172772245757406247360161871964480950056880533135625953557884008555797 into Go struct field Error.detail of type float64: "{"errors":[{"code":"MANIFEST_UNKNOWN","message":"manifest unknown","detail":{"… See All2 times in the last 6 minutes
4:14:31 PM | Normal | Pulling | pulling image "ip is here:5000/openwhiskpoc/action-nodejs-6@sha256:bd3176824ead9191cbdd4b87ab2ec594c14f9b86cf37f7bab4d254a19792ef16"
Thanks