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/incubator-openwhisk-devtools.git


The following commit(s) were added to refs/heads/master by this push:
     new d0c6314  Allow users to use their own certificates for the gateway 
(#166)
d0c6314 is described below

commit d0c6314162d7a81166d7389f677c176f42ecccfe
Author: Alvaro Lopez Garcia <[email protected]>
AuthorDate: Sat Feb 16 19:15:10 2019 +0000

    Allow users to use their own certificates for the gateway (#166)
    
    If the users provides their own certificates, lets do not create
    self-signed ones, but rather use the provided ones.
---
 docker-compose/Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index f9c447c..15dd0b1 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -221,7 +221,15 @@ setup:
        $(shell cat ~/tmp/openwhisk/local.env) docker-compose --project-name 
openwhisk run --rm --no-deps apigateway rclone copy --exclude .git 
/etc/api-gateway/ minio:api-gateway/
        # $(shell cat ~/tmp/openwhisk/local.env) docker-compose --project-name 
openwhisk stop minio
        # $(shell cat ~/tmp/openwhisk/local.env) docker-compose --project-name 
openwhisk rm -f minio
-       $(OPENWHISK_PROJECT_HOME)/ansible/files/genssl.sh $(DOCKER_HOST_IP) 
server $(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files
+       
+       # Check if the user has provided SSL certificates, if not generate them
+       if [ -f 
"$(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files/openwhisk-server-key.pem" 
] && \
+               [ -f 
"$(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files/openwhisk-server-cert.pem" 
]; then \
+                       echo "using certificates present in 
$(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files/"; \
+       else \
+               $(OPENWHISK_PROJECT_HOME)/ansible/files/genssl.sh 
$(DOCKER_HOST_IP) server $(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files; \
+       fi;
+       mkdir -p ~/tmp/openwhisk/api-gateway-ssl
        cp $(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files/*.pem 
~/tmp/openwhisk/api-gateway-ssl
 
 .PHONY: gw

Reply via email to