我让OpenWhisk通过helm安装在本地运行(minikube(:
helm install openwhisk-deploy-kube/helm/openwhisk
-n openwhisk
--namespace openwhisk
--set whisk.ingress.apiHostName="$(minikube ip)"
当尝试使用指向minikube ip
的环境CLOUDANT_HOST
绑定云(CouchDB(时:
wsk package bind /whisk.system/cloudant contactdb
-p username $(CLOUDANT_USER)
-p password $(CLOUDANT_PASS)
-p host $(CLOUDANT_HOST)
-p dbname contactdb
并向contactdb/write
发送操作调用:
wsk action invoke contactdb/write
-b
-p dbname contactdb
-p doc '{"name":"Bruno Wego","email":"brunowego@gmail.com"}'
-r
-i
它返回以下问题:
{
"error": {
"code": "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
"description": "unable to verify the first certificate",
"errid": "request",
"message": "error happened in your connection",
"name": "Error",
"scope": "socket",
"stack": "Error: unable to verify the first certificaten at Error (native)n at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)n at emitNone (events.js:86:13)n at TLSSocket.emit (events.js:185:7)n at TLSSocket._finishInit (_tls_wrap.js:609:8)n at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:439:38)",
"stacktrace": [
"Error: unable to verify the first certificate",
" at Error (native)",
" at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)",
" at emitNone (events.js:86:13)",
" at TLSSocket.emit (events.js:185:7)",
" at TLSSocket._finishInit (_tls_wrap.js:609:8)",
" at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:439:38)"
]
}
}
我不知道在OpenWhisk的内部安装中指向host
的地址。
看完这里,我使用没有 ssl 的 url 参数,它可以工作:
wsk package bind /whisk.system/cloudant contactdb
-p url 'http://whisk_admin:some_passw0rd@openwhisk-couchdb.openwhisk.svc.cluster.local:5984'
-p dbname contactdb
-i
-v