make ansible container backward compatible 01/78701/1
authorTaka Cho <takamune.cho@att.com>
Mon, 18 Feb 2019 19:31:27 +0000 (14:31 -0500)
committerTaka Cho <takamune.cho@att.com>
Mon, 18 Feb 2019 19:33:53 +0000 (14:33 -0500)
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 <takamune.cho@att.com>
ansible-server/pom.xml
ansible-server/src/main/Dockerfile
ansible-server/src/main/ansible-server/startAnsibleServer.sh [new file with mode: 0644]

index 662864c..0b440d2 100644 (file)
                                                        </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>
index e0abb04..4a9c414 100644 (file)
@@ -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 (file)
index 0000000..193fe77
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+exec &> >(tee -a "/var/log/ansible-server.log")
+
+cd /opt/onap/ccsdk
+exec /usr/bin/python RestServer.py
+

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use