diff options
author | 2024-07-03 09:31:01 -0400 | |
---|---|---|
committer | 2024-07-17 10:21:28 -0400 | |
commit | 1cd99ed17a0d034ef8e54a7ac3dc059871dc7a1a (patch) | |
tree | 4654defdb1459041925568be88081ca224a181b3 /ms/gra/gra-docker/src | |
parent | 3f9e2b6c2bcbaa0b3804e6a9b96e8f7f37ea952a (diff) |
Resolve build issuesmontreal
Build was failing due to issues missed in port to java 17. Updated
sdnc/apps to change dependencies from javax.* to jakarta.* - required
for Java 17. Also, latest version of snakeyaml cannot handle size of
yaml based SDNC swagger, so replaced that with JSON based version.
Issue-ID: SDNC-1843
Change-Id: I4df872481c56aea496de0d2b9cc349799ff6b60c
Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/gra/gra-docker/src')
-rw-r--r-- | ms/gra/gra-docker/src/main/docker/Dockerfile | 28 | ||||
-rw-r--r-- | ms/gra/gra-docker/src/main/resources/README-custom-certs.md | 3 | ||||
-rw-r--r-- | ms/gra/gra-docker/src/main/resources/application.properties | 2 | ||||
-rw-r--r-- | ms/gra/gra-docker/src/main/resources/data.sql (renamed from ms/gra/gra-docker/src/main/resources/data-demo.sql) | 0 | ||||
-rw-r--r-- | ms/gra/gra-docker/src/main/resources/dblib.properties | 2 | ||||
-rw-r--r-- | ms/gra/gra-docker/src/main/resources/schema.sql (renamed from ms/gra/gra-docker/src/main/resources/schema-demo.sql) | 0 | ||||
-rw-r--r-- | ms/gra/gra-docker/src/main/resources/startGra.sh | 2 |
7 files changed, 29 insertions, 8 deletions
diff --git a/ms/gra/gra-docker/src/main/docker/Dockerfile b/ms/gra/gra-docker/src/main/docker/Dockerfile index 54e8c1a..f17405b 100644 --- a/ms/gra/gra-docker/src/main/docker/Dockerfile +++ b/ms/gra/gra-docker/src/main/docker/Dockerfile @@ -2,6 +2,7 @@ ## START OF STAGE0 ## FROM @base.image.name@:@base.image.version@ AS stage0 + ENV LOG_PATH /var/log/onap/sdnc ENV SDNC_CONFIG_DIR /opt/sdnc/gra/config ENV TRUSTSTORE @truststore.file@ @@ -14,6 +15,7 @@ COPY opt /opt # Install certificates RUN keytool -importkeystore -srckeystore ${SDNC_CONFIG_DIR}/${TRUSTSTORE} -srcstorepass changeit -destkeystore ${JAVA_SECURITY_DIR}/cacerts -deststorepass changeit -noprompt + ## END OF STAGE0 ## @@ -27,17 +29,31 @@ ENV SDNC_CONFIG_DIR /opt/sdnc/gra/config ENV GRA_JAR @sdnc.gra.jar@ ENV SDNC_UID @sdnc.uid@ ENV SVCLOGIC_PROPERTIES /opt/sdnc/gra/config/svclogic.properties -ENV SVCLOGIC_DIR /opt/sdnc/gra/service-logic/graphs +ENV SVCLOGIC_DIR /opt/sdnc/gra/svclogic/graphs ENV LOG_PATH /var/log/onap/sdnc USER root +ARG httpProxy +ARG httpsProxy +ARG noProxy + +ENV http_proxy=$httpProxy +ENV https_proxy=$httpsProxy +ENV no_proxy=$noProxy + +# Copy any certs +COPY *.md *.pem /etc/ssl/certs/ + +# Install certs +RUN update-ca-certificates + # Install sudo, IP utilities and openjdk 11 -RUN export http_proxy=http://sub.proxy.att.com:8080 \ - && export https_proxy=http://sub.proxy.att.com:8080 \ - && apk update && apk --no-cache add bash curl mysql-client sudo iputils openssl \ - && unset http_proxy \ - && unset https_proxy +RUN export http_proxy=$http_proxy +RUN export https_proxy=$https_proxy +RUN echo "http_proxy = $http_proxy" && echo "https_proxy = $https_proxy" && echo "no_proxy = $no_proxy" + +RUN apk update && apk --no-cache add bash curl mysql-client sudo iputils openssl # Enable wheel group RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers diff --git a/ms/gra/gra-docker/src/main/resources/README-custom-certs.md b/ms/gra/gra-docker/src/main/resources/README-custom-certs.md new file mode 100644 index 0000000..ac414c1 --- /dev/null +++ b/ms/gra/gra-docker/src/main/resources/README-custom-certs.md @@ -0,0 +1,3 @@ +Any .pem files in this directory will be copied to /etc/ssl/certs on the +docker container and installed prior to running apk. This might be needed, +for example, for docker builds to work properly behind a corporate firewall. diff --git a/ms/gra/gra-docker/src/main/resources/application.properties b/ms/gra/gra-docker/src/main/resources/application.properties index 30f5077..32f86a9 100644 --- a/ms/gra/gra-docker/src/main/resources/application.properties +++ b/ms/gra/gra-docker/src/main/resources/application.properties @@ -22,6 +22,8 @@ spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.Im spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.database=mysql +spring.sql.init.mode=always + cadi.properties.path=${SDNC_CONFIG_DIR}/cadi.properties swagger-ui.host=${SDNNFT_HOST:localhost} swagger-ui.title=SDN-NFT: GRA microservice diff --git a/ms/gra/gra-docker/src/main/resources/data-demo.sql b/ms/gra/gra-docker/src/main/resources/data.sql index 763d0cb..763d0cb 100644 --- a/ms/gra/gra-docker/src/main/resources/data-demo.sql +++ b/ms/gra/gra-docker/src/main/resources/data.sql diff --git a/ms/gra/gra-docker/src/main/resources/dblib.properties b/ms/gra/gra-docker/src/main/resources/dblib.properties index 5c14341..4c3a6b2 100644 --- a/ms/gra/gra-docker/src/main/resources/dblib.properties +++ b/ms/gra/gra-docker/src/main/resources/dblib.properties @@ -23,7 +23,7 @@ org.onap.ccsdk.sli.dbtype=jdbc org.onap.ccsdk.sli.jdbc.hosts=dbhost -org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://${MYSQL_DB_HOST}:3306/${MYSQL_DATABASE} +org.onap.ccsdk.sli.jdbc.url=jdbc:mariadb://${MYSQL_DB_HOST}:3306/${MYSQL_DATABASE} org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver org.onap.ccsdk.sli.jdbc.database=${MYSQL_DATABASE} org.onap.ccsdk.sli.jdbc.user=${MYSQL_USER} diff --git a/ms/gra/gra-docker/src/main/resources/schema-demo.sql b/ms/gra/gra-docker/src/main/resources/schema.sql index ddd3217..ddd3217 100644 --- a/ms/gra/gra-docker/src/main/resources/schema-demo.sql +++ b/ms/gra/gra-docker/src/main/resources/schema.sql diff --git a/ms/gra/gra-docker/src/main/resources/startGra.sh b/ms/gra/gra-docker/src/main/resources/startGra.sh index 66dd721..b9cdec2 100644 --- a/ms/gra/gra-docker/src/main/resources/startGra.sh +++ b/ms/gra/gra-docker/src/main/resources/startGra.sh @@ -22,7 +22,7 @@ ### export SDNC_HOME=${SDNC_HOME:-/opt/sdnc/gra} -export SVCLOGIC_DIR=${SVCLOGIC_DIR:-/opt/sdnc/gra/service-logic/graphs} +export SVCLOGIC_DIR=${SVCLOGIC_DIR:-/opt/sdnc/gra/svclogic/graphs} export LOG_PATH=${LOG_PATH:-/var/log/sdnc} export SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/sdnc/gra/config} export SVCLOGIC_PROPERTIES=${SVCLOGIC_PROPERTIES:-${SDNC_CONFIG_DIR}/svclogic.properties} |