summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-02-19 15:38:43 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-19 15:38:43 +0000
commita794b4f8e543361e237f70aeae6bca2347f8dfee (patch)
tree9d7666e370df97db14e0bc40b525911c6a8d9caa
parentf8d4769f3aa39c5dd2c22f97bb31dbc4f7a8dee7 (diff)
parent9bec848ff9fc2c421f25bd0f998f67685f8b53aa (diff)
Merge "make ansible container backward compatible"
-rw-r--r--ansible-server/pom.xml20
-rw-r--r--ansible-server/src/main/Dockerfile6
-rw-r--r--ansible-server/src/main/ansible-server/startAnsibleServer.sh6
3 files changed, 30 insertions, 2 deletions
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 @@
</arguments>
</configuration>
</execution>
+ <execution>
+ <id>change shell permissions</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>/usr/bin/find</executable>
+ <arguments>
+ <argument>${basedir}/target/docker-stage/ansible-server</argument>
+ <argument>-name</argument>
+ <argument>*.sh</argument>
+ <argument>-exec</argument>
+ <argument>chmod</argument>
+ <argument>+x</argument>
+ <argument>{}</argument>
+ <argument>;</argument>
+ </arguments>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
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
+