You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dr...@apache.org on 2018/09/26 04:31:48 UTC

[incubator-openwhisk-devtools] branch master updated: Clean up Makefile (#154)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 293779b  Clean up Makefile (#154)
293779b is described below

commit 293779b781e8c53423b04165eb96659e506280b3
Author: Justin Halsall <Ju...@users.noreply.github.com>
AuthorDate: Wed Sep 26 00:31:44 2018 -0400

    Clean up Makefile (#154)
    
    * cleanup Makefile output
    * deprecate commands with _ in favor of commands with -
---
 docker-compose/Makefile | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index ef9d116..b7d199b 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -1,6 +1,6 @@
 UNAME_STR ?= $(shell uname)
 
-# detect local ip of host as this is needed within containers to find the openwhisk API container
+# detect local ip of host as this is needed within containers to find the OpenWhisk API container
 ifeq ("$(UNAME_STR)","Linux")
 	LOCAL_IP=$(shell route | grep default | tr -s " " | cut -d " " -f 8 | xargs /sbin/ifconfig | grep "inet addr:" | cut -d ":" -f 2 | cut -d " " -f 1)
 	# inet addr: not present, trying with inet.
@@ -39,7 +39,8 @@ endif
 #   2. then it starts all components using docker-compose
 #   3. it runs a sample hello-world function
 #   To stop and cleanup the environment use: make destroy
-quick-start: download-src download-cli docker_pull run quick-start-pause hello-world quick-start-info
+
+quick-start: download-src download-cli docker-pull run quick-start-pause hello-world quick-start-info
 
 add-catalog: download-catalog init-catalog
 
@@ -76,26 +77,46 @@ download-catalog:
 quick-start-pause:
 	echo "waiting for the Whisk invoker to come up ... "
 	until $$(curl --output /dev/null --silent --head --fail http://$(DOCKER_HOST_IP):8085/ping); do printf '.'; sleep 5; done
+	echo " ... OK"
 	sleep 30
 
 .PHONY: quick-start-info
 quick-start-info:
 	echo "$$(tput setaf 2)To invoke the function again use: $$(tput setaf 4)make hello-world$$(tput sgr0)"
-	echo "$$(tput setaf 2)To stop openwhisk use: $$(tput setaf 4)make destroy$$(tput sgr0)"
+	echo "$$(tput setaf 2)To stop OpenWhisk use: $$(tput setaf 4)make destroy$$(tput sgr0)"
 
+# deprecated commands
+.PHONY: docker_build
 docker_build:
-	echo "building the openwhisk core docker images ... "
+	echo "$$(tput setaf 2)ERROR: command deprecated"
+	echo "$$(tput setaf 2)please use $$(tput setaf 3)$$ $$(tput setaf 4)make docker-build$$(tput sgr0)"
+
+.PHONY: docker_pull
+docker_pull:
+	echo "$$(tput setaf 2)ERROR: command deprecated"
+	echo "please use $$(tput setaf 3)$$ $$(tput setaf 4)make docker-pull$$(tput sgr0)"
+
+.PHONY: docker_pull_full
+docker_pull_full:
+	echo "$$(tput setaf 2)ERROR: command deprecated"
+	echo "please use $$(tput setaf 3)$$ $$(tput setaf 4)make docker-pull-full$$(tput sgr0)"
+
+.PHONY: docker-build
+docker-build:
+	echo "building the OpenWhisk core docker images ... "
 	cd $(OPENWHISK_PROJECT_HOME) && \
 		./gradlew distDocker -PdockerImagePrefix=$(DOCKER_IMAGE_PREFIX)
 
-docker_pull:
+.PHONY: docker-pull
+docker-pull:
 	echo "pulling the docker images short list... "
 	docker pull $(DOCKER_IMAGE_PREFIX)/controller
 	docker pull $(DOCKER_IMAGE_PREFIX)/invoker
 	docker pull $(DOCKER_IMAGE_PREFIX)/nodejs6action
 	docker pull $(DOCKER_IMAGE_PREFIX)/dockerskeleton
 
-docker_pull_full:
+.PHONY: docker-pull-full
+docker-pull-full:
 	echo "pulling the docker images full list ... "
 	docker pull $(DOCKER_IMAGE_PREFIX)/controller
 	docker pull $(DOCKER_IMAGE_PREFIX)/invoker
@@ -191,7 +212,9 @@ setup:
 	cp -r ./apigateway/* ~/tmp/openwhisk/api-gateway-config/api-gateway/
 	cp -r ./apigateway/rclone ~/tmp/openwhisk
 	$(shell cat ~/tmp/openwhisk/local.env) docker-compose --project-name openwhisk up minio 2>&1 > ~/tmp/openwhisk/setup.log &
+	echo "pinging minio..."
 	until (curl --silent http://$(DOCKER_HOST_IP):9001/); do printf '.'; sleep 5; done
+	echo " ... OK"
 	docker run --rm -v ~/tmp/openwhisk/rclone:/root/.config/rclone \
 					--link="openwhisk_minio_1:minio.docker" --network=openwhisk_default \
 					--entrypoint=rclone openwhisk/apigateway mkdir minio:api-gateway
@@ -284,7 +307,7 @@ init-catalog:
 
 .PHONY: destroy
 destroy: stop rm
-	echo "cleaning other openwhisk containers started by the invoker ... "
+	echo "cleaning other OpenWhisk containers started by the invoker ... "
 	docker ps | grep whisk | awk '{print $$1}' | xargs docker stop | xargs docker rm
 	echo "cleaning dangling docker volumes ... "
 	docker volume ls -qf dangling=true | xargs docker volume rm