diff options
Diffstat (limited to 'vnfmarket-be/deployment')
5 files changed, 65 insertions, 12 deletions
diff --git a/vnfmarket-be/deployment/docker/docker-postgres/pom.xml b/vnfmarket-be/deployment/docker/docker-postgres/pom.xml index ef01bc52..e4c8d5ab 100644 --- a/vnfmarket-be/deployment/docker/docker-postgres/pom.xml +++ b/vnfmarket-be/deployment/docker/docker-postgres/pom.xml @@ -67,11 +67,6 @@ </build> </image> </images> - <buildArgs> - <http_proxy>${HTTP_PROXY}</http_proxy> - <https_proxy>${HTTPS_PROXY}</https_proxy> - <no_proxy>localhost,127.0.0.1</no_proxy> - </buildArgs> </configuration> <executions> <execution> diff --git a/vnfmarket-be/deployment/docker/docker-refrepo/pom.xml b/vnfmarket-be/deployment/docker/docker-refrepo/pom.xml index 3272d9f3..347ae06c 100644 --- a/vnfmarket-be/deployment/docker/docker-refrepo/pom.xml +++ b/vnfmarket-be/deployment/docker/docker-refrepo/pom.xml @@ -45,7 +45,7 @@ <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> - <version>0.4.11</version> + <version>1.0.0</version> <configuration> <verbose>true</verbose> <imageName>onap/refrepo</imageName> @@ -60,11 +60,6 @@ </includes> </resource> </resources> - <buildArgs> - <http_proxy>${HTTP_PROXY}</http_proxy> - <https_proxy>${HTTPS_PROXY}</https_proxy> - <no_proxy>localhost,127.0.0.1</no_proxy> - </buildArgs> </configuration> <executions> 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 437fcd28..35657181 100644 --- a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile +++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile @@ -19,7 +19,15 @@ ENV JAVA_HOME /usr/lib/jvm/jre WORKDIR /service # 20-mysq.txt - +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 +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 @@ -35,6 +43,7 @@ ENV CATALINA_HOME /service # 50-microservice.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY + # Set up microservice ADD ./STAGE /service RUN yum install -y gcc-c++ make && curl -sL https://rpm.nodesource.com/setup_6.x | bash - @@ -44,6 +53,7 @@ RUN cd /service/webapps/onapui/vnfmarket && npm install phantomjs-prebuilt@2.1. # https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vnfsdk.refrepo.marketplace&a=vnf-sdk-marketplace-deployment&e=zip&c=&v=LATEST # RUN wget -q -O vnf-sdk-marketplace-1.0.0.zip "https://nexus.onap.org/service/local/repositories/snapshots/content/org/onap/vnfsdk/refrepo/vnf-sdk-marketplace-deployment/1.0.0/vnf-sdk-marketplace-deployment-1.0.0-20170515.020618-24.zip" && unzip -q -o -B vnf-sdk-marketplace-1.0.0.zip && rm -f vnf-sdk-marketplace-1.0.0.zip EXPOSE 8702 +EXPOSE 8703 # RUN echo ONAP vnf-sdk-marketplace 1.0.0 "https://nexus.onap.org/service/local/repositories/snapshots/content/org/openo/vnfsdk/refrepo/vnf-sdk-marketplace-deployment/1.0.0/vnf-sdk-marketplace-deployment-1.0.0-20170515.020618-24.zip" > ONAP_VERSION 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 new file mode 100755 index 00000000..796d5777 --- /dev/null +++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh @@ -0,0 +1,6 @@ +#!/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 new file mode 100644 index 00000000..e55f6a8a --- /dev/null +++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf @@ -0,0 +1,47 @@ +daemon off; + +#pid /run/nginx.pid; + +events { + worker_connections 500; + # multi_accept on; +} +http { + + ## + # Basic Settings + ## + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + server { + listen *:8703 ssl; + server_name + ssl on; + ssl_certificate /etc/nginx/ssl/cert.crt; + ssl_certificate_key /etc/nginx/ssl/cert.key; + ssl_session_cache builtin:1000 shared:SSL:80m; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5; + ssl_prefer_server_ciphers on; + ssl_session_timeout 10m; + keepalive_timeout 70; + + location / { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_pass http://localhost:8702; + proxy_read_timeout 90; + proxy_redirect off; + } + } +} |