From 396486f87d3053c26aeaede5e395ae1c85a70abb Mon Sep 17 00:00:00 2001 From: yangyan Date: Wed, 4 Mar 2020 21:06:28 +0800 Subject: Fix typo error and timeout error Change-Id: Ie01c1b20d1cb84b74a486a767e51c9553e7014d3 Issue-ID: VFC-1626 Signed-off-by: yangyan --- docker/docker-entrypoint.sh | 2 +- docker/docker-env-config.sh | 63 ++++++++++++++++++++++----------------------- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 07ba258..4b0d6af 100644 --- a/docker/docker-entrypoint.sh +++ b/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 diff --git a/docker/docker-env-config.sh b/docker/docker-env-config.sh index 19e25db..557fbc1 100644 --- a/docker/docker-env-config.sh +++ b/docker/docker-env-config.sh @@ -1,46 +1,45 @@ #!/bin/bash install_sf(){ - 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 update -y - - yum install -y 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 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-multivimproxy.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.multivimproxy&a=vfc-nfvo- -multivimproxy-deployment&v=LATEST&e=zip" && \ - unzip -q -o -B nfvo-multivimproxy.zip && \ - rm -f nfvo-multivimproxy.zip - - # Set permissions - find . -type d -exec chmod o-w {} \; - find . -name "*.sh" -exec chmod +x {} \; + 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 update -y + + yum install -y 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 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-multivimproxy.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.multivimproxy&a=vfc-nfvo-multivimproxy-deployment&v=LATEST&e=zip" && \ + unzip -q -o -B nfvo-multivimproxy.zip && \ + rm -f nfvo-multivimproxy.zip + + # Set permissions + find . -type d -exec chmod o-w {} \; + find . -name "*.sh" -exec chmod +x {} \; } add_user(){ - useradd onap - yum -y install sudo - chmod u+x /etc/sudoers - sed -i '/Same thing without a password/a\onap ALL=(ALL:ALL) NOPASSWD:ALL' /etc/sudoers - chmod u-x /etc/sudoers - chown onap:onap -R /service + useradd onap + yum -y install sudo + chmod u+x /etc/sudoers + sed -i '/Same thing without a password/a\onap ALL=(ALL:ALL) NOPASSWD:ALL' /etc/sudoers + chmod u-x /etc/sudoers + chown onap:onap -R /service } clean_sf_cache(){ - - yum clean all + + yum clean all } install_sf -- cgit 1.2.3-korg