You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/01/25 07:57:07 UTC

[GitHub] ddragosd closed pull request #82: Add Makefile targets for adding catalog

ddragosd closed pull request #82: Add Makefile targets for adding catalog
URL: https://github.com/apache/incubator-openwhisk-devtools/pull/82
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index 69d73dd..ac5c895 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -15,6 +15,7 @@ DOCKER_HOST_IP ?= $(shell echo ${DOCKER_HOST} | grep -o "[0-9]\{1,3\}\.[0-9]\{1,
 DOCKER_REGISTRY ?= ""
 DOCKER_IMAGE_PREFIX ?= openwhisk
 PROJECT_HOME ?= ./openwhisk-master
+CATALOG_HOME ?= ./openwhisk-catalog
 WSK_CLI ?= $(PROJECT_HOME)/bin/wsk
 
 OPEN_WHISK_DB_PREFIX ?= local_
@@ -38,6 +39,8 @@ endif
 #   To stop and cleanup the environment use: make destroy
 quick-start: download download-cli run quick-start-pause hello-world quick-start-info
 
+add-catalog: download-catalog init-catalog
+
 .PHONY: download
 download:
 	rm -rf ./openwhisk-master*
@@ -49,6 +52,17 @@ download:
 	     echo "Skipping downloading the code from git as PROJECT_HOME is not default:" $(PROJECT_HOME); \
 	fi
 
+.PHONY: download-catalog
+download-catalog:
+	rm -rf ./openwhisk-catalog*
+	if [ "$(CATALOG_HOME)" = "./openwhisk-catalog" ]; then \
+	    curl -O ./openwhisk-catalog.tar.gz -L https://api.github.com/repos/apache/incubator-openwhisk-catalog/tarball/master > ./openwhisk-catalog.tar.gz; \
+	    mkdir openwhisk-catalog; \
+	    tar -xf ./openwhisk-catalog.tar.gz --strip 1 -C openwhisk-catalog; \
+	else \
+	     echo "Skipping downloading the code from git as CATALOG_HOME is not default:" $(CATALOG_HOME); \
+	fi
+
 .PHONY: quick-start-pause
 quick-start-pause:
 	echo "waiting for the Whisk invoker to come up ... "
@@ -167,6 +181,14 @@ init-whisk-cli:
 	echo "initializing CLI ... "
 	$(WSK_CLI) -v property set --namespace guest --auth `cat $(PROJECT_HOME)/ansible/files/auth.guest` --apihost $(DOCKER_HOST_IP):443 -i
 
+
+.PHONY: init-catalog
+init-catalog:
+	OPENWHISK_HOME=$(PROJECT_HOME) $(CATALOG_HOME)/packages/installCatalog.sh \
+	  `cat $(PROJECT_HOME)/ansible/files/auth.whisk.system` \
+	  $(DOCKER_HOST_IP):443 \
+	  $(WSK_CLI)
+
 .PHONY: destroy
 destroy: stop rm
 	echo "cleaning other openwhisk containers started by the invoker ... "


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services