Skip to content

Commit 37fe643

Browse files
authored
Fix alarms and kafka provider installation. (#331)
* Set bash shell. * Fix provider installation. * Fix Catalog install. * Increase retry count.
1 parent c2113b5 commit 37fe643

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docker-compose/Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# limitations under the License.
1616
#
1717

18+
SHELL:=/bin/bash
1819
UNAME_STR ?= $(shell uname)
1920

2021
# detect local ip of host as this is needed within containers to find the OpenWhisk API container
@@ -87,7 +88,7 @@ download-src:
8788
download-catalog:
8889
if [ "$(OPENWHISK_CATALOG_HOME)" = "$(CURDIR)/openwhisk-catalog" ]; then \
8990
rm -rf $(CURDIR)/openwhisk-catalog*; \
90-
curl -s -O ./openwhisk-catalog.tar.gz -L https://api.github.com/repos/apache/openwhisk-catalog/tarball/master > ./openwhisk-catalog.tar.gz; \
91+
curl -s --output ./openwhisk-catalog.tar.gz -L https://api.github.com/repos/apache/openwhisk-catalog/tarball/master; \
9192
mkdir openwhisk-catalog; \
9293
tar -xf ./openwhisk-catalog.tar.gz --strip 1 -C openwhisk-catalog; \
9394
else \
@@ -303,7 +304,7 @@ wait-for-docker-compose-up:
303304
echo "Waiting till all containers are powered up... ";
304305
sleep 1;
305306
@trycount=0; \
306-
trycounttimeout=30; \
307+
trycounttimeout=60; \
307308
up=`$(shell cat $(TMP_HOME)/tmp/openwhisk/local.env) docker-compose --project-name openwhisk ps | grep Up -c`; \
308309
servicescount=`$(shell cat $(TMP_HOME)/tmp/openwhisk/local.env) docker-compose -f $(DOCKER_COMPOSE_FILE) config --services | wc -l | xargs`; \
309310
docker_ps() { \
@@ -484,7 +485,7 @@ $(addprefix download-package-,$(PACKAGES)):
484485
echo "Downloading package" $(PACKAGE_NAME) "into" $(PACKAGE_HOME)
485486
rm -rf ./openwhisk-package-$(PACKAGE_NAME)*
486487
if [ "$(PACKAGE_HOME)" = "./openwhisk-package-$(PACKAGE_NAME)" ]; then \
487-
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; \
488+
curl -s --output ./openwhisk-package-$(PACKAGE_NAME).tar.gz -L https://api.github.com/repos/apache/openwhisk-package-$(PACKAGE_NAME)/tarball/master; \
488489
mkdir openwhisk-package-$(PACKAGE_NAME); \
489490
tar -xf ./openwhisk-package-$(PACKAGE_NAME).tar.gz --strip 1 -C openwhisk-package-$(PACKAGE_NAME); \
490491
else \
@@ -496,7 +497,14 @@ $(addprefix install-package-,$(PACKAGES)):
496497
$(eval PACKAGE_NAME:= $(shell echo $(@) | cut -b 17-))
497498
$(eval PACKAGE_HOME := $(PACKAGE_$(shell echo $(PACKAGE_NAME) | tr 'a-z' 'A-Z')_HOME))
498499
cd $(PACKAGE_HOME) && \
499-
$(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)
500+
$(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)
501+
502+
### Separate target for alarms because the installation requires an additional parameter
503+
install-package-alarms:
504+
$(eval PACKAGE_NAME:= $(shell echo $(@) | cut -b 17-))
505+
$(eval PACKAGE_HOME := $(PACKAGE_$(shell echo $(PACKAGE_NAME) | tr 'a-z' 'A-Z')_HOME))
506+
cd $(PACKAGE_HOME) && \
507+
$(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) \
500508

501509
.PHONY: $(addprefix start-provider-,$(PACKAGES))
502510
$(addprefix start-provider-,$(PACKAGES)):

0 commit comments

Comments
 (0)