diff options
author | aosull01 <adrian.osullivan@huawei.com> | 2020-03-25 12:16:57 +0000 |
---|---|---|
committer | aosull01 <adrian.osullivan@huawei.com> | 2020-03-25 12:16:57 +0000 |
commit | efb32d082a5b8463377ba91752dc25280d4b1cd4 (patch) | |
tree | 86d23efb0d481218da478dbcd517bdd335d53e07 | |
parent | c4b865137354f422efb46f0f6efa846d1353239d (diff) |
Add JAVA_OPTS, SERVER_PORT and NBI_URL environment variable
Issue-ID: EXTAPI-417
Signed-off-by: aosull01 <adrian.osullivan@huawei.com>
Change-Id: Ie8e65f65ea1a23ca27f0965a59a523dda70a4476
-rw-r--r-- | .env | 5 | ||||
-rw-r--r-- | Dockerfile | 21 | ||||
-rw-r--r-- | docker-compose.yml | 3 | ||||
-rw-r--r-- | src/main/resources/certificate/AAF_RootCA.cer | 46 | ||||
-rw-r--r-- | src/main/resources/certificate/aai.api.simpledemo.openecomp.org | 38 |
5 files changed, 6 insertions, 107 deletions
@@ -18,8 +18,7 @@ NBI_VERSION=v4 # APPLICATION SERVER_CONTEXTPATH=/nbi/api/v4 -SERVER_PORT=8443 -HTTP_PORT=8080 +SERVER_PORT=8080 # ONAP ONAP_LCPCLOUDREGIONID= @@ -28,7 +27,7 @@ ONAP_CLOUDOWNER= NEXUS_DOCKER_REPO=nexus3.onap.org:10001 # NBI -NBI_URL=https://localhost:8443/nbi/api/v4 +NBI_URL=http://localhost:${SERVER_PORT}/nbi/api/v4 NBI_CALLFORVNF=false # SDC @@ -16,19 +16,6 @@ FROM registry.gitlab.com/onap-integration/docker/onap-java -USER root -COPY src/main/resources/certificate /certs -ARG CERT_PASS=changeit -RUN for cert in $(ls -d /certs/*); do \ - echo "adding $cert to java keystore..."; \ - keytool -import \ - -file "$cert" \ - -storepass "${CERT_PASS}" \ - -keystore $JAVA_HOME/lib/security/cacerts \ - -alias "$(basename $cert)" \ - --noprompt; \ - done - USER onap ARG SERVER_PORT @@ -38,10 +25,8 @@ ADD target/$PKG_FILENAME /opt/onap/app.jar RUN mkdir temptoscafile && chown onap:onap temptoscafile/ -ENV SERVER_PORT=${SERVER_PORT:-8443} -ENV HTTP_PORT=${HTTP_PORT:-8080} -ENV JAVA_OPTS="-Dspring.profiles.active=ssl -Djava.security.egd=file:/dev/./urandom" +ENV SERVER_PORT=${SERVER_PORT:-8080} +ENV JAVA_OPTS=${JAVA_OPTS:--Djava.security.egd=file:/dev/./urandom} EXPOSE $SERVER_PORT -EXPOSE $HTTP_PORT -ENTRYPOINT java -XX:+UseContainerSupport $JAVA_OPTS -jar /opt/onap/app.jar +ENTRYPOINT exec java -XX:+UseContainerSupport $JAVA_OPTS -jar /opt/onap/app.jar diff --git a/docker-compose.yml b/docker-compose.yml index 8f21efa..e74453f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,8 +37,7 @@ services: nbi: image: ${NEXUS_DOCKER_REPO}/onap/externalapi/nbi:${DOCKER_IMAGE_VERSION:-latest} ports: - - 8080:8080 - - 8443:8443 + - ${SERVER_PORT}:${SERVER_PORT} env_file: - .env environment: diff --git a/src/main/resources/certificate/AAF_RootCA.cer b/src/main/resources/certificate/AAF_RootCA.cer deleted file mode 100644 index fbd12d8..0000000 --- a/src/main/resources/certificate/AAF_RootCA.cer +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2018 Orange -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ------BEGIN CERTIFICATE----- -MIIFPjCCAyagAwIBAgIJAJ6u7cCnzrWdMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV -BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA0MDUx -NDE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khpXimuYsZOFQi5blr/u+v4mIbsgbmi9 -7j+cUHDP0zLycvSvxKHty51LwmaX9a4wkJl5zBU4O1sd/H9tWcEmwJ39ltKoBKBx -c94Zc3iMm5ytRWGj+0rKzLDAXEWpoZ5bE5PLJauA6UDCxDLfs3FwhbS7uDggxYvf -jySF5FCNET94oJ+m8s7VeHvoa8iPGKvXrIqdd7XDHnqJJlVKr7m9S0fMbyEB8ci2 -RtOXDt93ifY1uhoEtEykn4dqBSp8ezvNMnwoXdYPDvTd9uCAFeWFLVreBAWxd25h -PsBTkZA5hpa/rA+mKv6Af4VBViYr8cz4dZCsFChuioVebe9ighrfjB//qKepFjPF -CyjzKN1u0JKm/2x/ORqxkTONG8p3uDwoIOyimUcTtTMv42bfYD88RKakqSFXE9G+ -Z0LlaKABqfjK49o/tsAp+c5LoNlYllKhnetO3QAdraHwdmC36BhoghzR1jpX751A -cZn2VH3Q4XKyp01cJNCJIrua+A+bx6zh3RyW6zIIkbRCbET+UD+4mr8WIcSE3mtR -ZVlnhUDO4z9//WKMVzwS9Rh8/kuszrGFI1KQozXCHLrce3YP6RYZfOed79LXaRwX -dYY= ------END CERTIFICATE----- diff --git a/src/main/resources/certificate/aai.api.simpledemo.openecomp.org b/src/main/resources/certificate/aai.api.simpledemo.openecomp.org deleted file mode 100644 index 31a9389..0000000 --- a/src/main/resources/certificate/aai.api.simpledemo.openecomp.org +++ /dev/null @@ -1,38 +0,0 @@ -#
-# Copyright (c) 2018 Orange
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
------BEGIN CERTIFICATE-----
-MIIDyzCCArMCCQDrA8zzZKXznDANBgkqhkiG9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