This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-devtools.git


The following commit(s) were added to refs/heads/master by this push:
     new 37fe643  Fix alarms and kafka provider installation. (#331)
37fe643 is described below

commit 37fe6438ed38f8adb7e92ce222adecd52dfe726d
Author: rodric rabbah <[email protected]>
AuthorDate: Sun Apr 11 15:19:12 2021 -0400

    Fix alarms and kafka provider installation. (#331)
    
    * Set bash shell.
    * Fix provider installation.
    * Fix Catalog install.
    * Increase retry count.
---
 docker-compose/Makefile | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index b03323a..4866851 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -15,6 +15,7 @@
 # limitations under the License.
 #
 
+SHELL:=/bin/bash
 UNAME_STR ?= $(shell uname)
 
 # detect local ip of host as this is needed within containers to find the 
OpenWhisk API container
@@ -87,7 +88,7 @@ download-src:
 download-catalog:
        if [ "$(OPENWHISK_CATALOG_HOME)" = "$(CURDIR)/openwhisk-catalog" ]; 
then \
            rm -rf $(CURDIR)/openwhisk-catalog*; \
-           curl -s -O ./openwhisk-catalog.tar.gz -L 
https://api.github.com/repos/apache/openwhisk-catalog/tarball/master > 
./openwhisk-catalog.tar.gz; \
+           curl -s --output ./openwhisk-catalog.tar.gz -L 
https://api.github.com/repos/apache/openwhisk-catalog/tarball/master; \
            mkdir openwhisk-catalog; \
            tar -xf ./openwhisk-catalog.tar.gz --strip 1 -C openwhisk-catalog; \
        else \
@@ -303,7 +304,7 @@ wait-for-docker-compose-up:
        echo "Waiting till all containers are powered up... ";
        sleep 1;
        @trycount=0; \
-       trycounttimeout=30; \
+       trycounttimeout=60; \
        up=`$(shell cat $(TMP_HOME)/tmp/openwhisk/local.env) docker-compose 
--project-name openwhisk ps | grep Up -c`; \
        servicescount=`$(shell cat $(TMP_HOME)/tmp/openwhisk/local.env) 
docker-compose -f $(DOCKER_COMPOSE_FILE) config --services | wc -l | xargs`; \
        docker_ps() { \
@@ -484,7 +485,7 @@ $(addprefix download-package-,$(PACKAGES)):
        echo "Downloading package" $(PACKAGE_NAME) "into" $(PACKAGE_HOME)
        rm -rf ./openwhisk-package-$(PACKAGE_NAME)*
        if [ "$(PACKAGE_HOME)" = "./openwhisk-package-$(PACKAGE_NAME)" ]; then \
-           curl -s -O ./openwhisk-package-$(PACKAGE_NAME).tar.gz -L 
https://api.github.com/repos/apache/openwhisk-package-$(PACKAGE_NAME)/tarball/master
 > ./openwhisk-package-$(PACKAGE_NAME).tar.gz; \
+           curl -s --output ./openwhisk-package-$(PACKAGE_NAME).tar.gz -L 
https://api.github.com/repos/apache/openwhisk-package-$(PACKAGE_NAME)/tarball/master;
 \
            mkdir openwhisk-package-$(PACKAGE_NAME); \
            tar -xf ./openwhisk-package-$(PACKAGE_NAME).tar.gz --strip 1 -C 
openwhisk-package-$(PACKAGE_NAME); \
        else \
@@ -496,7 +497,14 @@ $(addprefix install-package-,$(PACKAGES)):
        $(eval PACKAGE_NAME:= $(shell echo $(@) | cut -b 17-))
        $(eval PACKAGE_HOME := $(PACKAGE_$(shell echo $(PACKAGE_NAME) |  tr 
'a-z' 'A-Z')_HOME))
        cd $(PACKAGE_HOME) && \
-       $(shell cat $(TMP_HOME)/tmp/openwhisk/providers.env) 
./installCatalogUsingWskdeploy.sh $(realpath 
$(OPENWHISK_PROJECT_HOME))/ansible/files/auth.whisk.system $(DOCKER_HOST_IP) 
"http://$(DOCKER_HOST_IP):5984" $(OPEN_WHISK_DB_PREFIX) $(DOCKER_HOST_IP)
+       $(shell cat $(TMP_HOME)/tmp/openwhisk/providers.env) 
./installCatalog.sh $(realpath 
$(OPENWHISK_PROJECT_HOME))/ansible/files/auth.whisk.system $(DOCKER_HOST_IP) 
"http://$(DOCKER_HOST_IP):5984" $(OPEN_WHISK_DB_PREFIX) $(DOCKER_HOST_IP)
+
+### Separate target for alarms because the installation requires an additional 
parameter
+install-package-alarms:
+       $(eval PACKAGE_NAME:= $(shell echo $(@) | cut -b 17-))
+       $(eval PACKAGE_HOME := $(PACKAGE_$(shell echo $(PACKAGE_NAME) |  tr 
'a-z' 'A-Z')_HOME))
+       cd $(PACKAGE_HOME) && \
+       $(shell cat $(TMP_HOME)/tmp/openwhisk/providers.env) 
./installCatalog.sh $(realpath 
$(OPENWHISK_PROJECT_HOME))/ansible/files/auth.whisk.system $(DOCKER_HOST_IP) 
$(DOCKER_HOST_IP) "http://$(DOCKER_HOST_IP):5984" $(OPEN_WHISK_DB_PREFIX) 
$(DOCKER_HOST_IP) \
 
 .PHONY: $(addprefix start-provider-,$(PACKAGES))
 $(addprefix start-provider-,$(PACKAGES)):

Reply via email to