Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.12.1
-
None
-
None
Description
To make the docker image run on K8S and make the information stored resilient to restarts and redeploy, some the configurations are needed. Here is a patch file for the start.sh
diff --git a/nifi-docker/dockerhub/sh/start.sh b/nifi-docker/dockerhub/sh/start.sh index e4bc79a1d..e0d9524b9 100755 --- a/nifi-docker/dockerhub/sh/start.sh +++ b/nifi-docker/dockerhub/sh/start.sh @@ -63,6 +63,10 @@ prop_replace 'nifi.analytics.connection.model.implementation' "${NIFI_ANALYTIC prop_replace 'nifi.analytics.connection.model.score.name' "${NIFI_ANALYTICS_MODEL_SCORE_NAME:-rSquared}" prop_replace 'nifi.analytics.connection.model.score.threshold' "${NIFI_ANALYTICS_MODEL_SCORE_THRESHOLD:-.90}" +prop_replace 'nifi.database.directory' "${NIFI_DATABASE_DIRECTORY}" +prop_replace 'nifi.flow.configuration.archive.dir' "${NIFI_FLOW_CONFIGURATION_ARCHIVE_DIR}" +prop_replace 'nifi.flow.configuration.file' "${NIFI_FLOW_CONFIGURATION_FILE}" + . "${scripts_dir}/update_cluster_state_management.sh" # Check if we are secured or unsecured
diff --git a/nifi-docker/dockerhub/sh/common.sh b/nifi-docker/dockerhub/sh/common.sh index f3ea43580..90b69b190 100755 --- a/nifi-docker/dockerhub/sh/common.sh +++ b/nifi-docker/dockerhub/sh/common.sh @@ -19,8 +19,10 @@ # 3 - file to perform replacement inline prop_replace () { target_file=${3:-${nifi_props_file}} - echo 'replacing target file ' ${target_file} - sed -i -e "s|^$1=.*$|$1=$2|" ${target_file} + key=$1 + val=$2 + echo 'replacing the value of ${key} with ${val} in target file ' ${target_file} + sed -i -e "s|^${key}=.*$|${key}=${val}|" ${target_file} } uncomment() {