Closed mimy2001 closed 3 years ago
For the host, if you're using ubuntu
, ie the local
environment, the host is 172.17.0.1
and for a port pick an available port eg 12345
For mac, use the dockerhost IP 192.168.99.100
for example.
It took me a while to look through the code and some trial and error but I finally managed to have the container up and running and able to get the alarms going. I think there should be more explicit documentation on how to get this up and running or else this should be packaged into the catalog for open whisk.
For reference, this is how to install it into the OpenWhisk Vagrant VM:
$ vagrant ssh
$ git clone git@github.com:openwhisk/openwhisk-package-alarms.git
$ cd openwhisk-package-alarms/
$ export AUTH_KEY=`cat ansible/files/auth.whisk.system`
$ export COUCHDB_HOST=`awk -F "=" '/db_host/ {print $2}' ~/openwhisk/ansible/db_local.ini`
$ export COUCHDB_PORT=`awk -F "=" '/db_port/ {print $2}' ~/openwhisk/ansible/db_local.ini`
$ export API_HOST=${COUCHDB_HOST}:${COUCHDB_PORT}
$ export API_PORT=11001
$ ./installCatalog.sh $AUTH_KEY $API_HOST $API_HOST $API_PORT
$ ./gradlew :distDocker
$ mkdir -p /home/vagrant/wsklogs/alarmsTrigger
Running it:
$ export COUCHDB_PROTOCOL=`awk -F "=" '/db_protocol/ {print $2}' ~/openwhisk/ansible/db_local.ini`
$ export COUCHDB_HOST=`awk -F "=" '/db_host/ {print $2}' ~/openwhisk/ansible/db_local.ini`
$ export COUCHDB_PORT=`awk -F "=" '/db_port/ {print $2}' ~/openwhisk/ansible/db_local.ini`
$ export COUCHDB_USER=`awk -F "=" '/db_username/ {print $2}' ~/openwhisk/ansible/db_local.ini`
$ export COUCHDB_PWD=`awk -F "=" '/db_password/ {print $2}' ~/openwhisk/ansible/db_local.ini`
$ docker run -it -p 11001:8080 -v /home/vagrant/wsklogs/alarmsTrigger:/logs \
-e PORT=8080 -e ROUTER_HOST=172.17.0.1 \
-e DB_PREFIX=whisk_alarms -e DB_USERNAME=${COUCHDB_USER} \
-e DB_PASSWORD=${COUCHDB_PWD} -e DB_HOST=${COUCHDB_HOST}:${COUCHDB_PORT} \
-e DB_PROTOCOL=${COUCHDB_PROTOCOL} whisk/catalog_alarms
Note that the choice of AUTH_KEY
determines which namespace you install into. i.e you could set AUTH_KEY
to wsk property get --auth | rev | cut -f1 | rev
to install into the guest
namespace
Thanks for the instructions, @akrabat Everything worked for me after making just two minor changes:
$ export AUTH_KEY=`cat ~/openwhisk/ansible/files/auth.whisk.system`
$ export API_HOST=${COUCHDB_HOST}
@akrabat thanks, the steps helped me, but I got the APIHOST from
$ wsk property get
whisk auth ******
whisk API host http://172.17.0.1:10001
whisk API version v1
whisk namespace _
whisk CLI version 2017-04-23T10:37:37+00:00
whisk API build 2017-05-01T10:14:38Z
whisk API build number latest
The directions from @akrabat above still work for building the docker image and running it with the latest code, but no longer work for installing the actions. The input parameters for installCatalog.sh have changed. They are now installCatalog.sh <authkey> <edgehost> <dburl> <dbprefix> <apihost>
I am on a local ubuntu setup. Can you outline what each parameter to the installCatalog script mean or how to find them out?. this is what I used:
authkey = cat ansible/files/auth.guest
dburl = http://10.23.233.195:5984 (not sure what this should be?)
dbprefix = whisk
api_host = 10.23.233.195:5984
edgehost = $API_HOST
I get the api host using: "wsk property get" whisk auth 23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP whisk API host http://10.23.233.195:10001 whisk API version v1 whisk namespace _ whisk CLI version 2017-07-21T16:42:25+00:00
Next: gradlew :distDocker (works)
wsk trigger create every-20-seconds (works)
BUT wsk trigger create every-20-seconds --feed /whisk.system/alarms/alarm results in an error. wsk avtivation poll output: Activation: alarm (087ada02d9454e55a85cf10a9affcb24) [ "2017-08-01T12:28:42.096738658Z stdout: alarm: Error invoking whisk action: { Error: tunneling socket could not be established, cause=socket hang up", "2017-08-01T12:28:42.096768284Z stdout: at ClientRequest.onError (/nodejsAction/node_modules/tunnel-agent/index.js:176:17)", "2017-08-01T12:28:42.096775005Z stdout: at ClientRequest.g (events.js:291:16)", "2017-08-01T12:28:42.096780437Z stdout: at emitOne (events.js:96:13)", "2017-08-01T12:28:42.096785546Z stdout: at ClientRequest.emit (events.js:188:7)", "2017-08-01T12:28:42.096790724Z stdout: at TLSSocket.socketErrorListener (_http_client.js:310:9)", "2017-08-01T12:28:42.09679563Z stdout: at emitOne (events.js:96:13)", "2017-08-01T12:28:42.096800828Z stdout: at TLSSocket.emit (events.js:188:7)", "2017-08-01T12:28:42.096805641Z stdout: at emitErrorNT (net.js:1276:8)", "2017-08-01T12:28:42.096810624Z stdout: at _combinedTickCallback (internal/process/next_tick.js:74:11)", "2017-08-01T12:28:42.096815518Z stdout: at process._tickCallback (internal/process/next_tick.js:98:9) code: 'ECONNRESET' }" ]
@abaruni is currently working on creating an ansible script that will install the alarms actions for you as well pull the latest alarms docker image and start the container for you.
@hsane2001 - until the official script is done you can try a script I had created: https://github.com/jasonpet/openwhisk/commit/176efb5f0d606d537692abd1548631942af2e9b9
To install the actions and deploy it you would run the providers.yml playbook.
Thanks jsaonpet - will give it a try. So I dont have to go through the install process above? Just "ansible-playbook provider.yml" should do it all? Let me know when the official script is ready.
yes, it will do it all.
I rebuilt openwhisk (resolving a proxy issue https://github.com/apache/incubator-openwhisk/issues/2221 ) and succesfully installed the alarms with your scripts. I have catalog-alarm container running. Trying to trigger with feed (wsk trigger create every-20-seconds --feed /whisk.system/alarms/alarm --param cron '/20 ' --param maxTriggers 15 -v) and get this error:
"error": "could not find the trigger in the database"
Am I missing some step?
Nevermind - tried it the second time and worked magically :)
I have a local kubernetes based Openwhisk installation and I am able to create and invoke actions correctly. However I am unable to create a periodic trigger using alarms. The following command is resulting in the following error:
"error": { "error": "Trigger authentication request failed.", "message": "Unknown Error From API: connect ECONNREFUSED 127.0.0.1:31001" }
wsk -i trigger create five-mins-data --feed /whisk.system/alarms/alarm --param cron "*/5 * * * *" --param trigger_payload "{\"tags\": [\"test_key\",\"test_value\"]}"
@rredhatt -- one possible problem is that the actions used to create the triggers can't communicate with the couchdb instance. Take a look at https://github.com/apache/incubator-openwhisk-deploy-kube/blob/master/docs/configurationChoices.md#deploying-event-providers and see if this might be your problem.
@dgrove-oss, I am currently using the kubernetes container factory as specified in the 3rd alternative in the link you provided.
Something I have noticed, is that as part of the 'trigger create', multiple requests are done, a put request on the default namespace which is successful, and a post request on the whisk.system namespace which fails with a 502
[PUT] - https://localhost:31001/api/v1/namespaces/_/triggers/every-20-seconds?overwrite=false
response code : 502
response body :
{"activationId":"5539a77f1e704db1b9a77f1e70cdb13e","annotations":[{"key":"limits","value":{"concurrency":1,"logs":10,"memory":256,"timeout":60000}},{"key":"path","value":"whisk.system/alarms/alarm"},{"key":"kind","value":"nodejs:6"},{"key":"waitTime","value":68}],"duration":3204,"end":1545801173860,"logs":[],"name":"alarm","namespace":"guest","publish":false,"response":{"result":{"error":{"error":"Trigger authentication request failed.","message":"Unknown Error From API: connect ECONNREFUSED 127.0.0.1:31001"}},"status":"application error","success":false},"start":1545801170656,"subject":"guest","version":"0.0.1"}
fwiw, I don't believe you missed a step. I did a fresh install onto a Docker for Mac kube cluster and was able to execute your command
wsk -i trigger create five-mins-data --feed /whisk.system/alarms/alarm --param cron "*/5 * * * *" --param trigger_payload "{\"tags\": [\"test_key\",\"test_value\"]}"
successfully without doing anything else first.
Could you do wsk -i action get /whisk.system/alarms/alarm
to verify that the alarm action was installed correctly into the system namespace?
looks like the alarms package is installed correctly as well.
ok: got action alarms/alarm { "namespace": "whisk.system/alarms", "name": "alarm", "version": "0.0.1", "exec": { "kind": "nodejs:6", "binary": true }, "annotations": [ { "key": "feed", "value": true }, { "key": "description", "value": "Fire trigger when alarm occurs" }, { "key": "parameters", "value": [ { "name": "cron", "required": true }, { "name": "startDate", "required": false }, { "name": "stopDate", "required": false } ] }, { "key": "exec", "value": "nodejs:6" } ], "parameters": [ { "key": "apihost", "value": "192.168.65.3:31001" }, { "key": "trigger_payload", "value": "" } ], "limits": { "timeout": 60000, "memory": 256, "logs": 10 }, "publish": false }
@rredhatt -- next thing to check is to make sure the alarmprovider was actually deployed correctly. Do kubectl get pods -n openwhisk
and look for a pod called alarmprovider-SOMEUID
. If it exists, try getting its logs with kubectl logs <POD_NAME> -n openwhisk
and see if it managed to create the alarm database correctly. The start of the log file should look something like:
[2019-01-02T22:39:37.881Z] [INFO] [??] [alarmsTrigger] [createDatabase] creating the trigger database
[2019-01-02T22:39:37.916Z] [INFO] [??] [alarmsTrigger] [server.listen] Express server listening on port 8080
[2019-01-02T22:39:38.022Z] [INFO] [??] [alarmsTrigger] [createDatabase] created trigger database: almalarmservice
[2019-01-02T22:39:38.107Z] [INFO] [??] [alarmsTrigger] [initAllTriggers] resetting system from last state
[2019-01-02T22:42:49.841Z] [INFO] [??] [alarmsTrigger] [setupFollow] got change for trigger xxxxxxxx/guest/five-mins-data
[2019-01-02T22:42:49.845Z] [INFO] [??] [alarmsTrigger] [scheduleCronAlarm] xxxxxxxx/guest/five-mins-data starting cron job
[2019-01-02T22:42:49.891Z] [INFO] [??] [alarmsTrigger] [setupFollow] xxxxxxxx/guest/five-mins-data created successfully
[2019-01-02T22:45:00.005Z] [INFO] [??] [alarmsTrigger] [fireTrigger] Alarm fired for xxxxxxxx/guest/five-mins-data attempting to fire trigger
[2019-01-02T22:45:00.058Z] [INFO] [??] [alarmsTrigger] [postTrigger] xxxxxxxx/guest/five-mins-data http post request, STATUS: 204
[2019-01-02T22:45:00.058Z] [INFO] [??] [alarmsTrigger] [postTrigger] fired xxxxxxxx/guest/five-mins-data
(You probably won't have the lines about the five-mins-data trigger...this log is from my openwhisk where the trigger create worked as expected).
Alarm provider pods seems to be in a running state and the alarm provider logs seems to have stopped at the initialisation phase, i.e. I cannot see any attempts for alarm configuration.
kubectl get pods -n openwhisk
NAME READY STATUS RESTARTS AGE alarmprovider-7856c8d5b9-p4plh 1/1 Running 0 21d
kubectl logs alarmprovider-7856c8d5b9-p4plh -n openwhisk
[2018-12-26T20:42:14.647Z] [INFO] [??] [alarmsTrigger] [createDatabase] creating the trigger database [2018-12-26T20:42:14.898Z] [INFO] [??] [alarmsTrigger] [server.listen] Express server listening on port 8080 [2018-12-26T20:42:15.040Z] [INFO] [??] [alarmsTrigger] [initAllTriggers] resetting system from last state
@rredhatt - sorry I have been on vacation for the last two weeks and just seeing this now. The issue is not with the alarms provider but seems to be with the alarms web action when trying to do a get trigger REST API call to verify that the user has access to the trigger. The provider will not have any work to do unless the web action completes successfully on a trigger create. I see the following error in your comments above: Trigger authentication request failed.","message":"Unknown Error From API: connect ECONNREFUSED 127.0.0.1:31001"
Looks to me like it is having an issue talking to the API Host.
Yes @jasonpet seem to be like a connection issue whilst posting on (https://localhost:31001/api/v1/namespaces/whisk.system/actions/alarms/alarm?blocking=true&result=false) .... will investigate this issue further.
I am also facing the same issue. Seems like it is openend since long!!!
I am using docker-compose environment and running my complete system in single ubuntu:16.04 machine
ubuntu@ip-172-31-90-113:~$ docker logs openwhisk_alarmsprovider_1 [2019-12-12T14:30:34.248Z] [INFO] [??] [alarmsTrigger] [createDatabase] creating the trigger database [2019-12-12T14:30:34.279Z] [INFO] [??] [alarmsTrigger] [server.listen] Express server listening on port 8080 [2019-12-12T14:30:34.321Z] [INFO] [??] [alarmsTrigger] [createDatabase] created trigger database: local_alarmservice [2019-12-12T14:30:34.499Z] [INFO] [??] [alarmsTrigger] [initActiveHost] redis hset local_alarmservice_worker0 active host0 [2019-12-12T14:30:34.504Z] [INFO] [??] [alarmsTrigger] [initAllTriggers] resetting system from last state
===================================================== ubuntu@ip-172-31-90-113:~$ wsk -i action get /whisk.system/alarms/alarm ok: got action alarms/alarm { "namespace": "whisk.system/alarms", "name": "alarm", "version": "0.0.1", "exec": { "kind": "nodejs:6", "binary": true }, "annotations": [ { "key": "description", "value": "Fire trigger when alarm occurs" }, { "key": "provide-api-key", "value": false }, { "key": "feed", "value": true }, { "key": "exec", "value": "nodejs:6" }, { "key": "parameters", "value": [ { "name": "cron", "required": true }, { "name": "timezone", "required": false }, { "name": "startDate", "required": false }, { "name": "stopDate", "required": false } ] } ], "parameters": [ { "key": "apihost", "value": "172.31.90.113:4430" }, { "key": "trigger_payload", "value": "" } ], "limits": { "timeout": 60000, "memory": 256, "logs": 10, "concurrency": 1 }, "publish": false } ubuntu@ip-172-31-90-113:~$
==========================================================
ubuntu@ip-172-31-90-113:~$ wsk trigger create interval --feed /whisk.system/alarms/interval --param minutes 2 --param trigger_payload "{\"name\":\"Odin\",\"place\":\"Asgard\"}" --param stopDate "2020-01-31T23:59:00.000Z" -i { "activationId": "5b9097c002724a609097c002722a60d8", "annotations": [ { "key": "path", "value": "whisk.system/alarms/interval" }, { "key": "waitTime", "value": 149 }, { "key": "kind", "value": "nodejs:6" }, { "key": "timeout", "value": false }, { "key": "limits", "value": { "concurrency": 1, "logs": 10, "memory": 256, "timeout": 60000 } } ], "duration": 183, "end": 1576164853752, "logs": [], "name": "interval", "namespace": "guest", "publish": false, "response": { "result": { "error": { "error": "Trigger authentication request failed." } }, "status": "application error", "success": false }, "start": 1576164853569, "subject": "guest", "version": "0.0.1" } { "activationId": "c81a6c8395a5464c9a6c8395a5664cb1", "annotations": [ { "key": "path", "value": "whisk.system/alarms/interval" }, { "key": "waitTime", "value": 15 }, { "key": "kind", "value": "nodejs:6" }, { "key": "timeout", "value": false }, { "key": "limits", "value": { "concurrency": 1, "logs": 10, "memory": 256, "timeout": 60000 } } ], "duration": 64, "end": 1576164853848, "logs": [], "name": "interval", "namespace": "guest", "publish": false, "response": { "result": { "error": { "error": "Trigger authentication request failed." } }, "status": "application error", "success": false }, "start": 1576164853784, "subject": "guest", "version": "0.0.1" } ok: deleted trigger interval
can anyone please tell me how to install this package in windows machine. I started openwhisk using below command java -jar openwhisk-standalone.jar --all --data-dir D:\whisk -v
.
everything started correctly and working fine, but could not find any whisk packages. could any one let me know how to install those packages in windows machine locally.
@hsane2001 , @markusborg , did you guys figure out what the problem was? I am trying to do the same and facing the same issue of not being able to deploy the trigger
The command I am trying to run
wsk -vi trigger create once-per-min --feed /whisk.system/alarms/alarm --param cron "*/1 * * * *"
The output for above command is: -
REQUEST:
[PUT] https://localhost:4430/api/v1/namespaces/_/triggers/once-per-min?overwrite=false
Req Headers
{
"Authorization": [
"Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
],
"Content-Type": [
"application/json"
],
"User-Agent": [
"OpenWhisk-CLI/1.0 (2019-08-10T00:47:48.313+0000) linux amd64"
]
}
Req Body
{"name":"once-per-min","annotations":[{"key":"feed","value":"/whisk.system/alarms/alarm"}]}
RESPONSE:Got response with code 200
Resp Headers
{
"Access-Control-Allow-Headers": [
"Authorization, Origin, X-Requested-With, Content-Type, Accept, User-Agent"
],
"Access-Control-Allow-Methods": [
"GET, DELETE, POST, PUT, HEAD"
],
"Access-Control-Allow-Origin": [
"*"
],
"Connection": [
"keep-alive"
],
"Content-Length": [
"197"
],
"Content-Type": [
"application/json"
],
"Date": [
"Mon, 25 Dec 2023 14:19:20 GMT"
],
"Server": [
"nginx/1.19.10"
],
"X-Request-Id": [
"tVBHVj4o73yEDsHyh6CZR1Dzs20ty0rs"
]
}
Response body size is 197 bytes
Response body received:
{"annotations":[{"key":"feed","value":"/whisk.system/alarms/alarm"}],"limits":{},"name":"once-per-min","namespace":"guest","parameters":[],"publish":false,"updated":1703513960734,"version":"0.0.1"}
REQUEST:
[POST] https://localhost:4430/api/v1/namespaces/whisk.system/actions/alarms/alarm?blocking=true&result=false
Req Headers
{
"Authorization": [
"Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
],
"Content-Type": [
"application/json"
],
"User-Agent": [
"OpenWhisk-CLI/1.0 (2019-08-10T00:47:48.313+0000) linux amd64"
]
}
Req Body
{"authKey":"23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP","cron":"*/1 * * * *","lifecycleEvent":"CREATE","triggerName":"/_/once-per-min"}
RESPONSE:Got response with code 502
Resp Headers
{
"Access-Control-Allow-Headers": [
"Authorization, Origin, X-Requested-With, Content-Type, Accept, User-Agent"
],
"Access-Control-Allow-Methods": [
"GET, DELETE, POST, PUT, HEAD"
],
"Access-Control-Allow-Origin": [
"*"
],
"Connection": [
"keep-alive"
],
"Content-Length": [
"601"
],
"Content-Type": [
"application/json"
],
"Date": [
"Mon, 25 Dec 2023 14:19:21 GMT"
],
"Server": [
"nginx/1.19.10"
],
"X-Openwhisk-Activation-Id": [
"55671e37772b4f67a71e37772b3f6787"
],
"X-Request-Id": [
"cJMHlm7imbky4pk3b6vFs1EQWWqJ3HU3"
]
}
Response body size is 601 bytes
Response body received:
{"activationId":"55671e37772b4f67a71e37772b3f6787","annotations":[{"key":"path","value":"whisk.system/alarms/alarm"},{"key":"waitTime","value":140},{"key":"kind","value":"nodejs:10"},{"key":"timeout","value":false},{"key":"limits","value":{"concurrency":1,"logs":10,"memory":256,"timeout":60000}},{"key":"initTime","value":68}],"duration":993,"end":1703513961882,"logs":[],"name":"alarm","namespace":"guest","publish":false,"response":{"result":{"error":"error creating alarm trigger."},"size":87,"status":"application error","success":false},"start":1703513960889,"subject":"guest","version":"0.0.1"}
{
"activationId": "55671e37772b4f67a71e37772b3f6787",
"annotations": [
{
"key": "path",
"value": "whisk.system/alarms/alarm"
},
{
"key": "waitTime",
"value": 140
},
{
"key": "kind",
"value": "nodejs:10"
},
{
"key": "timeout",
"value": false
},
{
"key": "limits",
"value": {
"concurrency": 1,
"logs": 10,
"memory": 256,
"timeout": 60000
}
},
{
"key": "initTime",
"value": 68
}
],
"duration": 993,
"end": 1703513961882,
"logs": [],
"name": "alarm",
"namespace": "guest",
"publish": false,
"response": {
"result": {
"error": "error creating alarm trigger."
},
"size": 87,
"status": "application error",
"success": false
},
"start": 1703513960889,
"subject": "guest",
"version": "0.0.1"
}
REQUEST:
[GET] https://localhost:4430/api/v1/namespaces/_/triggers/once-per-min
Req Headers
{
"Authorization": [
"Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
],
"User-Agent": [
"OpenWhisk-CLI/1.0 (2019-08-10T00:47:48.313+0000) linux amd64"
]
}
RESPONSE:Got response with code 200
Resp Headers
{
"Access-Control-Allow-Headers": [
"Authorization, Origin, X-Requested-With, Content-Type, Accept, User-Agent"
],
"Access-Control-Allow-Methods": [
"GET, DELETE, POST, PUT, HEAD"
],
"Access-Control-Allow-Origin": [
"*"
],
"Connection": [
"keep-alive"
],
"Content-Length": [
"197"
],
"Content-Type": [
"application/json"
],
"Date": [
"Mon, 25 Dec 2023 14:19:21 GMT"
],
"Server": [
"nginx/1.19.10"
],
"X-Request-Id": [
"y7yy3pE0p2SXFOdxLWgnbY3OYMa31GFD"
]
}
Response body size is 197 bytes
Response body received:
{"annotations":[{"key":"feed","value":"/whisk.system/alarms/alarm"}],"limits":{},"name":"once-per-min","namespace":"guest","parameters":[],"publish":false,"updated":1703513960734,"version":"0.0.1"}
REQUEST:
[POST] https://localhost:4430/api/v1/namespaces/whisk.system/actions/alarms/alarm?blocking=true&result=false
Req Headers
{
"Authorization": [
"Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
],
"Content-Type": [
"application/json"
],
"User-Agent": [
"OpenWhisk-CLI/1.0 (2019-08-10T00:47:48.313+0000) linux amd64"
]
}
Req Body
{"authKey":"23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP","cron":"*/1 * * * *","lifecycleEvent":"DELETE","triggerName":"/_/once-per-min"}
RESPONSE:Got response with code 502
Resp Headers
{
"Access-Control-Allow-Headers": [
"Authorization, Origin, X-Requested-With, Content-Type, Accept, User-Agent"
],
"Access-Control-Allow-Methods": [
"GET, DELETE, POST, PUT, HEAD"
],
"Access-Control-Allow-Origin": [
"*"
],
"Connection": [
"keep-alive"
],
"Content-Length": [
"597"
],
"Content-Type": [
"application/json"
],
"Date": [
"Mon, 25 Dec 2023 14:19:21 GMT"
],
"Server": [
"nginx/1.19.10"
],
"X-Openwhisk-Activation-Id": [
"46faf17462414e98baf1746241be988f"
],
"X-Request-Id": [
"WoN4pUUCnpwmnLAJkEH1jldS0gSo68Ip"
]
}
Response body size is 597 bytes
Response body received:
{"activationId":"46faf17462414e98baf1746241be988f","annotations":[{"key":"path","value":"whisk.system/alarms/alarm"},{"key":"waitTime","value":7},{"key":"kind","value":"nodejs:10"},{"key":"timeout","value":false},{"key":"limits","value":{"concurrency":1,"logs":10,"memory":256,"timeout":60000}}],"duration":46,"end":1703513961946,"logs":[],"name":"alarm","namespace":"guest","publish":false,"response":{"result":{"error":"could not find trigger /guest/once-per-min in the database"},"size":70,"status":"application error","success":false},"start":1703513961900,"subject":"guest","version":"0.0.1"}
{
"activationId": "46faf17462414e98baf1746241be988f",
"annotations": [
{
"key": "path",
"value": "whisk.system/alarms/alarm"
},
{
"key": "waitTime",
"value": 7
},
{
"key": "kind",
"value": "nodejs:10"
},
{
"key": "timeout",
"value": false
},
{
"key": "limits",
"value": {
"concurrency": 1,
"logs": 10,
"memory": 256,
"timeout": 60000
}
}
],
"duration": 46,
"end": 1703513961946,
"logs": [],
"name": "alarm",
"namespace": "guest",
"publish": false,
"response": {
"result": {
"error": "could not find trigger /guest/once-per-min in the database"
},
"size": 70,
"status": "application error",
"success": false
},
"start": 1703513961900,
"subject": "guest",
"version": "0.0.1"
}
REQUEST:
[DELETE] https://localhost:4430/api/v1/namespaces/_/triggers/once-per-min
Req Headers
{
"Authorization": [
"Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
],
"User-Agent": [
"OpenWhisk-CLI/1.0 (2019-08-10T00:47:48.313+0000) linux amd64"
]
}
RESPONSE:Got response with code 200
Resp Headers
{
"Access-Control-Allow-Headers": [
"Authorization, Origin, X-Requested-With, Content-Type, Accept, User-Agent"
],
"Access-Control-Allow-Methods": [
"GET, DELETE, POST, PUT, HEAD"
],
"Access-Control-Allow-Origin": [
"*"
],
"Connection": [
"keep-alive"
],
"Content-Length": [
"197"
],
"Content-Type": [
"application/json"
],
"Date": [
"Mon, 25 Dec 2023 14:19:21 GMT"
],
"Server": [
"nginx/1.19.10"
],
"X-Request-Id": [
"8l8hOTvqSbZNE7Ye8T22yQ0fOKVkcKDy"
]
}
Response body size is 197 bytes
Response body received:
{"annotations":[{"key":"feed","value":"/whisk.system/alarms/alarm"}],"limits":{},"name":"once-per-min","namespace":"guest","parameters":[],"publish":false,"updated":1703513960734,"version":"0.0.1"}
ok: deleted trigger once-per-min
I tried to use the installCatalog.sh to install this package but I'm not sure what to put for the alarm trigger host and port. I tried using the same ip as my api host and tried a bunch of values for the ports (whatever I found running as a tcp port with docker-proxy) but it's not working. How can I get this package to work for me? The README.md doesn't explain how to install this package. I also tried ./gradlew distDocker which did installs the docker image but doesn't have instructions on how to get the container running.