rabbah closed pull request #131: Simplify routemgmt container
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/131
 
 
   

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/routemgmt/Dockerfile b/docker/routemgmt/Dockerfile
index cc8d632..2c79510 100644
--- a/docker/routemgmt/Dockerfile
+++ b/docker/routemgmt/Dockerfile
@@ -3,13 +3,7 @@ from ubuntu:latest
 RUN apt-get -y update && apt-get -y install \
   git \
   wget \
-  zip \
-  python-dev \
-  python-pip
-
-RUN pip install --upgrade setuptools
-RUN pip install argcomplete
-RUN pip install ansible==2.3.0.0
+  zip
 
 COPY init.sh /init.sh
 RUN chmod +X /init.sh
diff --git a/docker/routemgmt/init.sh b/docker/routemgmt/init.sh
index 0f69067..342ed3e 100755
--- a/docker/routemgmt/init.sh
+++ b/docker/routemgmt/init.sh
@@ -16,14 +16,23 @@ pushd bin
   tar xzf OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz
 popd
 
-# Generate whisk.properties.
-# TODO: Refactor upstream ansible/roles/routemgmt/files/installRouteMgmt.sh to 
enable
-# override of apigw values from environment so we don't have to bother running
-# ansible here to generate whisk.properties just so the script can extract 3 
values.
-pushd ansible
-  ansible-playbook setup.yml
-  ansible-playbook properties.yml -e apigw_host_v2=$WHISK_API_GATEWAY_HOST_V2
-popd
+# Setup env for installRouteMgmt.sh
+if [ "$WHISK_API_GATEWAY_USER" ]; then
+    export GW_USER=$WHISK_API_GATEWAY_USER
+else
+    export GW_USER=' '
+fi
+if [ "$WHISK_API_GATEWAY_PASSWORD" ]; then
+    export GW_PWD=$WHISK_API_GATEWAY_PASSWORD
+else
+    export GW_PWD=' '
+fi
+if [ "$WHISK_API_GATEWAY_HOST_V2" ]; then
+    export GW_HOST_V2=$WHISK_API_GATEWAY_HOST_V2
+else
+    echo "Must provide a value for WHISK_API_GATEWAY_HOST_V2"
+    exit 1
+fi
 
 # Run installRouteMgmt.sh
 pushd ansible/roles/routemgmt/files


 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to