diff options
author | 2024-08-15 11:08:57 +0100 | |
---|---|---|
committer | 2024-08-15 11:10:39 +0100 | |
commit | 88744c04a7cfed3a4227bc2137102ff5fe69895f (patch) | |
tree | 5865844183729aed07f06dd2f94e4940e7ff80f1 /packages | |
parent | f6d8e60eb75733cf9996bffb3c6ecb586f377da6 (diff) |
PostgreSQL support for Drools
- moved all sql related management to db-migrator
- any hardcoded variable related to database is configurable
Issue-ID: POLICY-5107
Change-Id: I789895773ba8737651f68a0b494f72f947a147d1
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/base/src/files/bin/policy | 8 | ||||
-rw-r--r-- | packages/docker/src/main/docker/Dockerfile | 6 | ||||
-rw-r--r-- | packages/docker/src/main/docker/pdpd-entrypoint.sh | 22 | ||||
-rw-r--r-- | packages/docker/src/main/docker/suse.Dockerfile | 3 |
4 files changed, 4 insertions, 35 deletions
diff --git a/packages/base/src/files/bin/policy b/packages/base/src/files/bin/policy index 690fe1e5..c5ec37fa 100644 --- a/packages/base/src/files/bin/policy +++ b/packages/base/src/files/bin/policy @@ -4,6 +4,7 @@ # ONAP # ================================================================================ # Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -72,13 +73,6 @@ function policy_status() { echo echo "[features]" features status - - local databases=$(ls -d "${POLICY_HOME}"/etc/db/migration/*/ 2>/dev/null) - if [ -n "${databases}" ]; then - echo "[migration]" - db-migrator -s ALL -o ok - fi - } function policy_start() { diff --git a/packages/docker/src/main/docker/Dockerfile b/packages/docker/src/main/docker/Dockerfile index a3d013d4..d263ba71 100644 --- a/packages/docker/src/main/docker/Dockerfile +++ b/packages/docker/src/main/docker/Dockerfile @@ -2,7 +2,7 @@ # Dockerfile # ============LICENSE_START======================================================= # Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright (C) 2022-2023 Nordix Foundation. +# Modifications Copyright (C) 2022-2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,9 +52,7 @@ ENV http_proxy $http_proxy USER root RUN apk update && \ - apk add --no-cache mariadb-client \ - file \ - maven \ + apk add --no-cache file maven \ net-tools netcat-openbsd sudo less vim openssl \ && python3 -m pip install --no-cache-dir --upgrade setuptools http-prompt \ && python3 -m pip install --no-cache-dir httpie diff --git a/packages/docker/src/main/docker/pdpd-entrypoint.sh b/packages/docker/src/main/docker/pdpd-entrypoint.sh index 2caca628..c2e3f020 100644 --- a/packages/docker/src/main/docker/pdpd-entrypoint.sh +++ b/packages/docker/src/main/docker/pdpd-entrypoint.sh @@ -138,26 +138,6 @@ function serverConfig { done } -function db { - if [ "${DEBUG}" = "y" ]; then - echo "-- db --" - set -x - fi - - if [ -z "${SQL_HOST}" ]; then - return 0 - fi - - if [ -z "${SQL_PORT}" ]; then - export SQL_PORT=3306 - fi - - echo "Waiting for ${SQL_HOST}:${SQL_PORT} ..." - timeout 120 sh -c 'until nc -vz -w 20 "${SQL_HOST}" "${SQL_PORT}"; do echo -n "."; sleep 1; done' - - "${POLICY_HOME}"/bin/db-migrator -s ALL -o upgrade -} - function inspect { if [ "${DEBUG}" = "y" ]; then echo "-- inspect --" @@ -209,7 +189,6 @@ function configure { fi reload - db } function vmBoot { @@ -219,7 +198,6 @@ function vmBoot { fi reload - db start scripts "post.sh" } diff --git a/packages/docker/src/main/docker/suse.Dockerfile b/packages/docker/src/main/docker/suse.Dockerfile index e6bf9dbd..c83a5cc6 100644 --- a/packages/docker/src/main/docker/suse.Dockerfile +++ b/packages/docker/src/main/docker/suse.Dockerfile @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------- # Dockerfile # ============LICENSE_START======================================================= -# Copyright (C) 2022 Nordix Foundation. +# Copyright (C) 2022, 2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -56,7 +56,6 @@ RUN zypper -n -q install --no-recommends \ gzip \ java-17-openjdk-devel \ maven \ - mariadb-client \ netcat-openbsd \ python3 \ python3-pip \ |