Fix alarms and kafka provider installation. (#331)
* Set bash shell.
* Fix provider installation.
* Fix Catalog install.
* Increase retry count.
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-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 @@
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 @@
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 @@
$(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)):