summaryrefslogtreecommitdiffstats
path: root/huawei
diff options
context:
space:
mode:
Diffstat (limited to 'huawei')
-rw-r--r--huawei/pom.xml4
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/deployment/pom.xml2
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/docker/Dockerfile56
-rwxr-xr-xhuawei/vnfmadapter/VnfmadapterService/docker/build_image.sh2
-rwxr-xr-xhuawei/vnfmadapter/VnfmadapterService/docker/docker-entrypoint.sh4
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/docker/docker-env-config.sh69
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/pom.xml4
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/pom.xml4
-rw-r--r--huawei/vnfmadapter/pom.xml4
9 files changed, 85 insertions, 64 deletions
diff --git a/huawei/pom.xml b/huawei/pom.xml
index 6ac8f218..3946f7aa 100644
--- a/huawei/pom.xml
+++ b/huawei/pom.xml
@@ -18,12 +18,12 @@
<parent>
<groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm</groupId>
<artifactId>vfc-nfvo-driver-vnfm-svnfm</artifactId>
- <version>1.3.5-SNAPSHOT</version>
+ <version>1.3.6-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei</groupId>
<artifactId>vfc-nfvo-driver-vnfm-svnfm-huawei</artifactId>
- <version>1.3.5-SNAPSHOT</version>
+ <version>1.3.6-SNAPSHOT</version>
<packaging>pom</packaging>
<name>vfc-nfvo-driver-vnfm-svnfm-huawei</name>
<description>vfc-nfvo-driver-vnfm-svnfm-huawei</description>
diff --git a/huawei/vnfmadapter/VnfmadapterService/deployment/pom.xml b/huawei/vnfmadapter/VnfmadapterService/deployment/pom.xml
index 30c7e8e9..2cc3f18d 100644
--- a/huawei/vnfmadapter/VnfmadapterService/deployment/pom.xml
+++ b/huawei/vnfmadapter/VnfmadapterService/deployment/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter</groupId>
<artifactId>vnfmadapter-service-root</artifactId>
- <version>1.3.5-SNAPSHOT</version>
+ <version>1.3.6-SNAPSHOT</version>
</parent>
<artifactId>hw-vnfmadapter-deployment</artifactId>
diff --git a/huawei/vnfmadapter/VnfmadapterService/docker/Dockerfile b/huawei/vnfmadapter/VnfmadapterService/docker/Dockerfile
index 56b9c30a..a257f9e5 100644
--- a/huawei/vnfmadapter/VnfmadapterService/docker/Dockerfile
+++ b/huawei/vnfmadapter/VnfmadapterService/docker/Dockerfile
@@ -1,62 +1,14 @@
-#
-# This file was auto-generated by gen-all-dockerfiles.sh; do not modify manually.
-#
-# nfvo-driver-vnfm-huawei/target/Dockerfile
-#
-
-# 10-basebuild.txt
-
FROM centos:7
ARG PKG_VERSION
-
-RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
-RUN sed -i 's|#baseurl=http://mirror.centos.org/centos|baseurl=http://mirrors.ocf.berkeley.edu/centos|' /etc/yum.repos.d/*.repo
-RUN yum update -y
-
-RUN yum install -y wget unzip socat java-1.8.0-openjdk-headless
-RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/jre/lib/security/java.security
ENV JAVA_HOME /usr/lib/jvm/jre
-
+ENV CATALINA_HOME /service
+ADD . /service
WORKDIR /service
-
-# 20-mysq.txt
-
-# Set up mysql
-RUN wget -q http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && rpm -ivh mysql-community-release-el7-5.noarch.rpm && rm -f mysql-community-release-el7-5.noarch.rpm
-RUN yum -y update
-RUN yum -y install -y mysql-server
-RUN mysql_install_db --user=mysql --datadir=/var/lib/mysql
-
+RUN bash docker-env-config.sh
VOLUME /var/lib/mysql
-COPY init-mysql.sh .
-# 30-tomcat.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY
-# Set up tomcat
-RUN wget -q https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.tar.gz && tar --strip-components=1 -xf apache-tomcat-8.5.30.tar.gz && rm -f apache-tomcat-8.5.30.tar.gz && rm -rf webapps && mkdir -p webapps/ROOT
-RUN echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh
-ENV CATALINA_HOME /service
-
-# 50-microservice.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY
-
-# Set up microservice
-
-RUN wget -q -O nfvo-driver-vnfm-huawei.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter&a=hw-vnfmadapter-deployment&v=${PKG_VERSION}-SNAPSHOT&e=zip" && unzip -q -o -B nfvo-driver-vnfm-huawei.zip && rm -f nfvo-driver-vnfm-huawei.zip
-# Set permissions
-RUN find . -type d -exec chmod o-w {} \;
-RUN find . -name "*.sh" -exec chmod +x {} \;
EXPOSE 8482
-
-# 90-entrypoint.txt
-
-RUN yum clean all
-
-COPY instance-config.sh .
-COPY instance-init.sh .
-COPY instance-run.sh .
-COPY instance-workaround.sh .
-COPY docker-entrypoint.sh .
+USER onap
ENTRYPOINT /service/docker-entrypoint.sh
-
-COPY LICENSE ./ONAP_LICENSE
diff --git a/huawei/vnfmadapter/VnfmadapterService/docker/build_image.sh b/huawei/vnfmadapter/VnfmadapterService/docker/build_image.sh
index 15d89e94..8cdb9b22 100755
--- a/huawei/vnfmadapter/VnfmadapterService/docker/build_image.sh
+++ b/huawei/vnfmadapter/VnfmadapterService/docker/build_image.sh
@@ -6,7 +6,7 @@ cd ${DOCKER_BUILD_DIR}
BUILD_ARGS="--no-cache"
ORG="onap"
-VERSION="1.3.5"
+VERSION="1.3.6"
PROJECT="vfc"
IMAGE="nfvo/svnfm/huawei"
DOCKER_REPOSITORY="nexus3.onap.org:10003"
diff --git a/huawei/vnfmadapter/VnfmadapterService/docker/docker-entrypoint.sh b/huawei/vnfmadapter/VnfmadapterService/docker/docker-entrypoint.sh
index 1d235f61..e61bbd19 100755
--- a/huawei/vnfmadapter/VnfmadapterService/docker/docker-entrypoint.sh
+++ b/huawei/vnfmadapter/VnfmadapterService/docker/docker-entrypoint.sh
@@ -36,7 +36,7 @@ echo
# Wait for MSB initialization
echo Wait for MSB initialization
-for i in {1..10}; do
+for i in {1..5}; do
curl -sS -m 1 $MSB_ADDR > /dev/null && break
sleep $i
done
@@ -47,7 +47,7 @@ echo
./instance-config.sh
# Start mysql
-su mysql -c /usr/bin/mysqld_safe &
+/usr/bin/mysqld_safe &
# Perform one-time config
if [ ! -e init.log ]; then
diff --git a/huawei/vnfmadapter/VnfmadapterService/docker/docker-env-config.sh b/huawei/vnfmadapter/VnfmadapterService/docker/docker-env-config.sh
new file mode 100644
index 00000000..94d71f2a
--- /dev/null
+++ b/huawei/vnfmadapter/VnfmadapterService/docker/docker-env-config.sh
@@ -0,0 +1,69 @@
+#!/bin/bash
+add_user(){
+
+ useradd onap
+}
+
+set_up_mysql_jdk(){
+
+ sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
+ sed -i 's|#baseurl=http://mirror.centos.org/centos|baseurl=http://mirrors.ocf.berkeley.edu/centos|' /etc/yum.repos.d/*.repo
+ yum -y update
+
+ yum -y install wget unzip socat java-1.8.0-openjdk-headless
+ sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/jre/lib/security/java.security
+
+ # Set up mysql
+ wget -q http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && \
+ rpm -ivh mysql-community-release-el7-5.noarch.rpm && \
+ rm -f mysql-community-release-el7-5.noarch.rpm
+ yum -y update
+ yum -y install mysql-server
+ mysql_install_db --user=onap --datadir=/var/lib/mysql
+ chown onap:onap -R /var/run/mysqld
+ chmod g+s /var/run/mysqld
+ setfacl -d --set u:onap:rwx /var/run/mysqld
+ chown onap:onap /var/log/mysqld.log
+ chmod g+s /var/log/mysqld.log
+ chown onap:onap -R /var/lib/mysql-files
+ chmod g+s /var/lib/mysql-files
+ setfacl -d --set u:onap:rwx /var/lib/mysql-files
+ chown onap:onap /etc/my.cnf
+}
+
+set_up_tomcat(){
+
+ # Set up tomcat
+ wget -q https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.tar.gz && \
+ tar --strip-components=1 -xf apache-tomcat-8.5.30.tar.gz && \
+ rm -f apache-tomcat-8.5.30.tar.gz && \
+ rm -rf webapps && \
+ mkdir -p webapps/ROOT
+ echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh
+
+ # Set up microservice
+ wget -q -O nfvo-driver-vnfm-huawei.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter&a=hw-vnfmadapter-deployment&v=${PKG_VERSION}-SNAPSHOT&e=zip" && \
+ unzip -q -o -B nfvo-driver-vnfm-huawei.zip && \
+ rm -f nfvo-driver-vnfm-huawei.zip
+
+ # Set permissions
+ find . -type d -exec chmod o-w {} \;
+ find . -name "*.sh" -exec chmod +x {} \;
+
+ chown onap:onap -R /service
+ chmod g+s /service
+ setfacl -d --set u:onap:rwx /service
+}
+
+
+clean_sf_cache(){
+
+ yum clean all
+}
+
+add_user
+set_up_mysql_jdk
+wait
+set_up_tomcat
+wait
+clean_sf_cache
diff --git a/huawei/vnfmadapter/VnfmadapterService/pom.xml b/huawei/vnfmadapter/VnfmadapterService/pom.xml
index c44cca42..c869402b 100644
--- a/huawei/vnfmadapter/VnfmadapterService/pom.xml
+++ b/huawei/vnfmadapter/VnfmadapterService/pom.xml
@@ -19,10 +19,10 @@
<parent>
<groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter</groupId>
<artifactId>vnfmadapter</artifactId>
- <version>1.3.5-SNAPSHOT</version>
+ <version>1.3.6-SNAPSHOT</version>
</parent>
<artifactId>vnfmadapter-service-root</artifactId>
- <version>1.3.5-SNAPSHOT</version>
+ <version>1.3.6-SNAPSHOT</version>
<name>vfc/nfvo/drivers/vnfm/svnfm/huawei/vnfmadapter/VnfmadapterService</name>
<packaging>pom</packaging>
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/pom.xml b/huawei/vnfmadapter/VnfmadapterService/service/pom.xml
index 383ea069..51db3044 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/pom.xml
+++ b/huawei/vnfmadapter/VnfmadapterService/service/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter</groupId>
<artifactId>vnfmadapter-service-root</artifactId>
- <version>1.3.5-SNAPSHOT</version>
+ <version>1.3.6-SNAPSHOT</version>
</parent>
<artifactId>vnfmadapter-service</artifactId>
@@ -219,7 +219,7 @@
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
- <version>1.12</version>
+ <version>1.19.4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
diff --git a/huawei/vnfmadapter/pom.xml b/huawei/vnfmadapter/pom.xml
index f3f82b44..2f871949 100644
--- a/huawei/vnfmadapter/pom.xml
+++ b/huawei/vnfmadapter/pom.xml
@@ -18,12 +18,12 @@
<parent>
<groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei</groupId>
<artifactId>vfc-nfvo-driver-vnfm-svnfm-huawei</artifactId>
- <version>1.3.5-SNAPSHOT</version>
+ <version>1.3.6-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter</groupId>
<artifactId>vnfmadapter</artifactId>
- <version>1.3.5-SNAPSHOT</version>
+ <version>1.3.6-SNAPSHOT</version>
<packaging>pom</packaging>
<name>vfc-nfvo-driver-vnfm-svnfm</name>
<description>nfvo vnfmadapter</description>