apache / openwhisk-package-alarms

Apache OpenWhisk package that can be used to create periodic, time-based alarms.
https://openwhisk.apache.org/
Apache License 2.0
24 stars 49 forks source link

can not compile successfully #81

Closed zhy989 closed 7 years ago

zhy989 commented 7 years ago

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. at docker_7r8ejptnt4f4tnx46yncyk4ag.run(/home/zhy/iot/incubator-openwhisk-package-alarms/gradle/docker.gradle:43)

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 1.51 secs

jasonpet commented 7 years ago

You need to set the OPENWHISK_HOME env variable and run gradlew distdocker as gradlew :distdocker

zhy989 commented 7 years ago

@jasonpet I set the OPENWHISK_HOME env variable in file /etc/profile, but the error is still there:

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 11.0 secs

zhy989 commented 7 years ago

@jasonpet I download the openwhisk code to /home/zhy/incubator-openwhisk

and add "OPENWHISK_HOME=/home/zhy/incubator-openwhisk" at the end of the file /etc/profile

"source /etc/porfile"

then I run "./gradlew distDocker", the error is the same as before.

zhy989 commented 7 years ago

@jasonpet I delete the line "compile project(':whisktests').sourceSets.test.output" in the file "incubator-openwhisk-package-alarms/tests/build.gradle" and build the docker image "catalog_alarms " successfully. then I try to run sample helloworld with alarm trigger . After I create the action trigger and rule successfully,then run the cli "wsk -i activation pull", there is no result to output to the screen

How do I check the reason for no result to print out to the screen?

jasonpet commented 7 years ago

I assume you meant activation poll. Did you use the --feed parameter when creating your 20 second trigger? Did you start the "catalog_alarms" docker container after building it?

jasonpet commented 7 years ago

Please see https://github.com/apache/incubator-openwhisk-package-alarms/issues/51 if you need help with installing the alarms actions or starting up the alarms container. This issue can be closed. The compilation issue is due to the fact that your OPENWHISK_HOME variable is not set correctly. If you are not trying to run tests then removing the line you mentioned above is fine.

zhy989 commented 7 years ago

@jasonpet thanks

I run this script to start up the alarms container

WSK_HOME=/openwhisk DB_PROTOCOL=awk -F "=" '/db_protocol/ {print $2}' $WSK_HOME/ansible/db_local.ini DB_HOST=awk -F "=" '/db_host/ {print $2}' $WSK_HOME/ansible/db_local.ini DB_PORT=awk -F "=" '/db_port/ {print $2}' $WSK_HOME/ansible/db_local.ini DB_USER=awk -F "=" '/db_username/ {print $2}' $WSK_HOME/ansible/db_local.ini DB_PWD=awk -F "=" '/db_password/ {print $2}' $WSK_HOME/ansible/db_local.ini DB_PREFIX=test

docker run -d -p 32691:8080 -v $HOME/wsklogs/alarms:/logs \ -e PORT=8080 -e ROUTER_HOST=172.17.0.1 \ -e DB_PREFIX=${DB_PREFIX} -e DB_USERNAME=${DB_USER} \ -e DB_PASSWORD=${DB_PWD} -e DB_HOST=${DB_HOST}:${DB_PORT} \ -e DB_PROTOCOL=${DB_PROTOCOL} whisk/catalog_alarms

jasonpet commented 7 years ago

@csantanapr - can you please close this?