diff options
author | Avinash S <avinash.s@huawei.com> | 2018-02-12 14:14:29 +0000 |
---|---|---|
committer | Avinash S <avinash.s@huawei.com> | 2018-02-12 14:14:29 +0000 |
commit | ad6c30a5bb8f9be36392d67a383b5ce274fd5d97 (patch) | |
tree | a30feca198f138e07de476c55156cc2d35573248 | |
parent | 18702e090e6e7858a15cb071527149de74ed12b7 (diff) |
Fixing nginx provisioning issues for https
Issue-ID: VNFSDK-199
Change-Id: I28bf3e5bfddd2b5b4efde131716f07e20111a81e
Signed-off-by: Avinash S <avinash.s@huawei.com>
3 files changed, 13 insertions, 10 deletions
diff --git a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile index 87114c93..209cfea1 100644 --- a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile +++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile @@ -19,16 +19,15 @@ ENV JAVA_HOME /usr/lib/jvm/jre WORKDIR /service # 20-mysq.txt -RUN yum install epel-release -RUN yum install nginx && \ +RUN yum -y install epel-release +RUN yum -y install nginx && \ mkdir -p /etc/nginx/ssl COPY nginx.conf /etc/nginx/nginx.conf COPY certgen.sh . -CMD chmod +x ./certgen.sh && \ - ./certgen.sh -COPY example.key example.cert /etc/nginx/ssl/ -#CMD service nginx start - +CMD chmod +x ./certgen.sh +RUN ./certgen.sh +# && systemctl start nginx + # 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 @@ -38,7 +37,7 @@ COPY init-mysql.sh . # 30-tomcat.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY # Set up tomcat -RUN wget -q http://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-8/v8.5.23/bin/apache-tomcat-8.5.23.tar.gz && tar --strip-components=1 -xf apache-tomcat-8.5.23.tar.gz && rm -f apache-tomcat-8.5.23.tar.gz && rm -rf webapps && mkdir -p webapps/ROOT +RUN wget -q http://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-8/v8.5.27/bin/apache-tomcat-8.5.27.tar.gz && tar --strip-components=1 -xf apache-tomcat-8.5.27.tar.gz && rm -f apache-tomcat-8.5.27.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 diff --git a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh index 1108c719..796d5777 100644..100755 --- a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh +++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh @@ -1,2 +1,6 @@ -#/bin/sh +#!/bin/sh openssl req -nodes -newkey rsa:2048 -keyout example.key -out example.csr -subj "/C=IN/ST=Bangalore/L=Bangalore/O=Global Security/OU=ONAP/CN=example.com" +openssl x509 -req -in example.csr -signkey example.key -out cert.crt +cp -p cert.crt /etc/nginx/ssl/ +systemctl enable nginx + diff --git a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf index 34c4c367..e55f6a8a 100644 --- a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf +++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf @@ -1,6 +1,6 @@ daemon off; -pid /run/nginx.pid +#pid /run/nginx.pid; events { worker_connections 500; |