From 9bec848ff9fc2c421f25bd0f998f67685f8b53aa Mon Sep 17 00:00:00 2001 From: Taka Cho Date: Mon, 18 Feb 2019 14:31:27 -0500 Subject: [PATCH] make ansible container backward compatible Due to failure on docker-compose in APPC heat and k8s in APPC pod. I made this change backward compatible Change-Id: I9f4bb7b4a6d75cfdc7e3272b3382474342fb142c Issue-ID: APPC-1441 Signed-off-by: Taka Cho --- ansible-server/pom.xml | 20 ++++++++++++++++++++ ansible-server/src/main/Dockerfile | 6 ++++-- .../src/main/ansible-server/startAnsibleServer.sh | 6 ++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 ansible-server/src/main/ansible-server/startAnsibleServer.sh diff --git a/ansible-server/pom.xml b/ansible-server/pom.xml index 662864cb..0b440d23 100644 --- a/ansible-server/pom.xml +++ b/ansible-server/pom.xml @@ -97,6 +97,26 @@ + + change shell permissions + process-sources + + exec + + + /usr/bin/find + + ${basedir}/target/docker-stage/ansible-server + -name + *.sh + -exec + chmod + +x + {} + ; + + + diff --git a/ansible-server/src/main/Dockerfile b/ansible-server/src/main/Dockerfile index e0abb04a..4a9c4147 100644 --- a/ansible-server/src/main/Dockerfile +++ b/ansible-server/src/main/Dockerfile @@ -7,7 +7,9 @@ WORKDIR /opt/ COPY ansible-server/requirements.txt ansible-server/requirements.txt -RUN apk add --no-cache py2-pip \ +RUN apk add --no-cache curl \ + bash \ + py2-pip \ python2 &&\ apk add --no-cache --virtual .build-deps build-base \ libffi-dev \ @@ -26,4 +28,4 @@ RUN mkdir /opt/onap ; ln -s /opt/ansible-server /opt/onap/ccsdk EXPOSE 8000 -ENTRYPOINT ["python2", "RestServer.py"] +##ENTRYPOINT ["python2", "RestServer.py"] diff --git a/ansible-server/src/main/ansible-server/startAnsibleServer.sh b/ansible-server/src/main/ansible-server/startAnsibleServer.sh new file mode 100644 index 00000000..193fe77f --- /dev/null +++ b/ansible-server/src/main/ansible-server/startAnsibleServer.sh @@ -0,0 +1,6 @@ +#!/bin/bash +exec &> >(tee -a "/var/log/ansible-server.log") + +cd /opt/onap/ccsdk +exec /usr/bin/python RestServer.py + -- 2.16.6