summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryufei_zhou <yufei.zhou@nokia-sbell.com>2017-10-23 23:54:31 +0800
committeryufei_zhou <yufei.zhou@nokia-sbell.com>2017-10-24 07:52:31 +0800
commit3ca6992f0d792495cfb70c683c7795c1a2fa2b0e (patch)
tree46229f41c4d5d2eeb15b2f99c39de07da23f83c9
parentc6656665846db4f383a6d5a639a368ed870723d3 (diff)
Add log to docker part
Change-Id: I3b7b37070bd60e548f82cec7a3cc1147cd9addd6 Issue-ID: VFC-544 Signed-off-by: yufei_zhou <yufei.zhou@nokia-sbell.com>
-rw-r--r--nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml10
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile1
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/docker-entrypoint.sh15
-rwxr-xr-xnokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh7
4 files changed, 25 insertions, 8 deletions
diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml
index f0c4df7f..9cc4ffc1 100644
--- a/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml
+++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml
@@ -69,12 +69,16 @@
"${deployUnzip}/logs")
System.out.println("******** start copying from ${basedir}/src/main/release to ${deployUnzip}. ************")
-
+
ant.copy(todir: "${deployUnzip}") {
fileset(dir: "${basedir}/src/main/release"){
exclude(name: "**/.gitignore")
}
-
+ }
+ ant.copy(todir: "${deployUnzip}/docker") {
+ fileset(dir: "${basedir}/../docker"){
+ exclude(name: "**/.gitignore")
+ }
}
System.out.println("******** start copying from ${project.build.directory}/../../vfcadaptor/target/${package.name}-${project.version} to ${deployUnzip}/webapps/ROOT. ************")
@@ -95,11 +99,9 @@
</execution>
</executions>
</plugin>
-
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>3.0.0</version>
<executions>
<execution>
<id>attach-artifacts</id>
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile b/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile
index 05d261a9..61c19ce8 100755
--- a/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/Dockerfile
@@ -25,6 +25,7 @@ RUN wget -q http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && rp
RUN yum -y update
RUN yum -y install -y mysql-server
RUN mysql_install_db --user=mysql --datadir=/var/lib/mysql
+RUN chown mysql:mysql /var/lib/mysql -R
EXPOSE 3306
RUN sed -i "s|bind-address.*|# bind-address = 127.0.0.1|" /etc/my.cnf
COPY init-mysql.sh .
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/docker-entrypoint.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/docker-entrypoint.sh
index 92a16283..99ccc16f 100755
--- a/nokia/vnfmdriver/vfcadaptorservice/docker/docker-entrypoint.sh
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/docker-entrypoint.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Copyright 2017, Nokia Corporation
#
@@ -42,8 +42,19 @@ echo
# Configure service based on docker environment variables
./instance-config.sh
+function start_mysql {
+ echo "start mysql ... "
+ systemctl start mysql.service > myout_docker_enctrypoint.file 2>&1
+ cat myout_docker_enctrypoint.file
+ systemctl status mysql.service > myout_docker_enctrypoint_mysql_status.file 2>&1
+ cat myout_docker_enctrypoint_mysql_status.file
+ sleep 5
+}
+
# Start mysql
-su mysql -c /usr/bin/mysqld_safe &
+# su mysql -c /usr/bin/mysqld_safe &
+#service mysql start
+start_mysql
# Perform one-time config
if [ ! -e init.log ]; then
diff --git a/nokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh
index d1be95c1..96e1145a 100755
--- a/nokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh
+++ b/nokia/vnfmdriver/vfcadaptorservice/docker/instance-init.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Copyright 2017, Nokia Corporation
#
@@ -18,7 +18,10 @@
function start_mysql {
echo "start mysql ... "
- service mysql start
+ systemctl start mysql.service > myout_instance_init.file 2>&1
+ cat myout_instance_init.file
+ systemctl status mysql.service > myout_instance_init_mysql_status.file 2>&1
+ cat myout_instance_init_mysql_status.file
sleep 5
}