summaryrefslogtreecommitdiffstats
path: root/zte
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-09-06 09:16:38 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-09-06 09:28:15 +0800
commitfffdb97fc96ef9c3db58af72d81c675c1cd24a1e (patch)
treed8b5e4e69807507f734d0c2ea581c69e29ce2482 /zte
parent9067e161cf629f48011bae1fb3f59c27ee5d0ddc (diff)
Add svnfm-driver requirements
Add install requirements in svnfm zte vmanager driver dockerfile. Change-Id: I6f9da0de6415acc6749e259759a7ab774145ef9a Issue-ID: VFC-283 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'zte')
-rw-r--r--zte/vmanager/docker/Dockerfile9
-rw-r--r--zte/vmanager/docker/build_image.sh8
-rw-r--r--zte/vmanager/docker/docker-entrypoint.sh2
-rw-r--r--zte/vmanager/docker/instance_init.sh7
4 files changed, 9 insertions, 17 deletions
diff --git a/zte/vmanager/docker/Dockerfile b/zte/vmanager/docker/Dockerfile
index fcc126bc..b0248074 100644
--- a/zte/vmanager/docker/Dockerfile
+++ b/zte/vmanager/docker/Dockerfile
@@ -6,9 +6,6 @@ ARG HTTPS_PROXY=${HTTPS_PROXY}
ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
-RUN echo "mysql-server mysql-server/root_password password root" | debconf-set-selections
-RUN echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections
-
RUN apt-get update && \
apt-get install -y python-virtualenv && \
apt-get install -y python-setuptools && \
@@ -20,8 +17,7 @@ RUN apt-get update && \
apt-get install -y curl && \
apt-get install -y build-essential && \
apt-get install -y libssl-dev && \
- apt-get install -y libffi-dev && \
- yes | pip install cryptography
+ apt-get install -y libffi-dev
ADD . /service
WORKDIR /service
@@ -31,6 +27,9 @@ RUN wget -q -O vfc-nfvo-driver-vnfm-svnfm-zte-vmanager.zip 'https://nexus.onap.o
unzip vfc-nfvo-driver-vnfm-svnfm-zte-vmanager.zip && \
rm -rf vfc-nfvo-driver-vnfm-svnfm-zte-vmanager.zip
+WORKDIR /service/vfc/nfvo/driver/vnfm/svnfm/zte/vmanager
+RUN pip install -r requirements.txt
+
EXPOSE 8410
WORKDIR /service
diff --git a/zte/vmanager/docker/build_image.sh b/zte/vmanager/docker/build_image.sh
index af8a6373..9bf3b60a 100644
--- a/zte/vmanager/docker/build_image.sh
+++ b/zte/vmanager/docker/build_image.sh
@@ -19,16 +19,16 @@ if [ $HTTPS_PROXY ]; then
BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
fi
-function build_ztevmanagerdriver {
+function build_image {
echo "Start build docker image: ${IMAGE_NAME}"
docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest .
}
-function push_ztevmanagerdriver {
+function push_image {
echo "Start push docker image: ${IMAGE_NAME}"
docker push ${IMAGE_NAME}:${VERSION}
docker push ${IMAGE_NAME}:latest
}
-build_ztevmanagerdriver
-push_ztevmanagerdriver
+build_image
+push_image
diff --git a/zte/vmanager/docker/docker-entrypoint.sh b/zte/vmanager/docker/docker-entrypoint.sh
index c843b486..ef779a44 100644
--- a/zte/vmanager/docker/docker-entrypoint.sh
+++ b/zte/vmanager/docker/docker-entrypoint.sh
@@ -13,7 +13,7 @@ echo "MSB_ADDR=$MSB_ADDR"
# Wait for MSB initialization
echo "Wait for MSB initialization"
-for i in {1..20}; do
+for i in {1..5}; do
curl -sS -m 1 $MSB_ADDR > /dev/null && break
sleep $i
done
diff --git a/zte/vmanager/docker/instance_init.sh b/zte/vmanager/docker/instance_init.sh
index 163fa813..a9bf588e 100644
--- a/zte/vmanager/docker/instance_init.sh
+++ b/zte/vmanager/docker/instance_init.sh
@@ -1,8 +1 @@
#!/bin/bash
-
-function install_python_libs {
- cd /service/vfc/gvnfm/vnfres/res/
- pip install -r requirements.txt
-}
-
-install_python_libs